In this example, the custom data Time was set to Datetime.Now and it was not passing the FrontierAwareEnumerator. Now, EndTime is set to the current time of the default exchange.
The algorithm had two issues:
1. the LINQ query for contract selection was not including the option right (Put or Call)
2. the algorithm was submitting two extra orders at the end of the day (when market closed)
A helper method was also added in QCAlgorithm to determine if the market is open for a given symbol at the current time.
In the advanced build settings, Language version was also upgraded from C# 5.0 to C# 6.0. The minimum Visual Studio version required will now be VS2015.
On June 30, 2017, GOOG and YAHOO databases have been deleted from the Quandl site, so now History requests for these symbols are returning empty lists and regression test is failing.
The HistoryAlgorithm has been updated to use the CHRIS/CME_SP1 ticker instead of YAHOO/INDEX_SPY.
- Reverted some changes to algorithms
- Changed UpdateOrderCommand.Quantity from int to decimal
- Fixed DefaultMarginCallModel for decimals and LotSize
- Update quantity to decimal in OptionExerciseOrder
- Update FractionalQuantityRegressionAlgorithm to use QuoteBarConsolidator
- Update FractionalQuantityRegressionAlgorithm stats
- Truncate order quantity to int in IB exerciseOptions
- Truncate order quantity to int in FuzzyInferenceAlgorithm
This update implemented implicit conversion.
From now on, python algorithms will be able to use string object instead of Symbol object when a method overload requires Symbol.
This new pythonnet package makes available the latest version from pythonnet master branch and includes modifications to enable charting in Lean for python.
The dockerfile to create images for the cloud is updated to reflect the package update and adds keras and tensorflow
sed -i -e 's/UCS2/UCS4/' Common/QuantConnect.csproj
sed -i -e 's/UCS2/UCS4/' Algorithm/QuantConnect.Algorithm.csproj
sed -i -e 's/UCS2/UCS4/' Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj
sed -i -e 's/UCS2/UCS4/' AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj
In some examples, we have been using Portfolio.Cash to calculate the quantity of shares in orders. This is a bad advice for users, since Portfolio.Cash does not account loses in other positions and its use can lead to invalid orders due to insufficient capital. Instead, users should use Portfolio.MarginRemaining.
FuzzyInferenceAlgorithm and LiveFeaturesAlgorithm had minor changes to perform backtests with available data
Currently, calling SetBrokerageModel after AddSecurity, AddForex, etc. has no effect, the security initializer has already been initialized and its models have been set to their default implementations.
For example, Forex backtests using OandaBrokerageModel will report fees calculated with the default fee model (Oanda fees are spread-based, so they should always be reported as zero).
In this PR, SetBrokerageModel now calls SecurityInitializer.Initialize on all securities added before SetBrokerageModel is called.
Fees will be calculated using the correct fee models and the order of the calls in algorithm Initialize is now irrelevant.
In this example, the algorithm buys a ES futures contract when an up trend is defined by a EMA Cross in SPY. When the contract expires, another one if bought.