It's important that we keep the factor files consistent with respect to
the date that they were generated. This enables us to run the regression
algorithms in the cloud and get the same results by using the factor files
from the correct date.
.net 4.7.2 added this extension method but we're on version 4.5.2,
but it appears that the mono version we run backtests under has the
method as well. This causes an ambiguous method error in the cloud
compiler, so this change removes the ambiguity by using the static
method invocation syntax instead of extension method syntax.
A mechanical refactoring was performed to make algorithms currently used in
regression algorithms to implement IRegressionAlgorithmDefinition, which allows
algorithms to define their own expected statistics and what languages should be
run as part of regression. The type name of the C# type is used to determine the
file/model name for python. This was for simplicity, but if needed, could later be
refactored to expose more information, but for now the convention of keeping names
the same makes sense and just works easily.
There's no good reason to use a finalizer here.
Regression algorithms should use the OnEndOfAlgorithm event to handle
checks/assertions following the algorithm's completion.
The ConfigureOptionChainSecurity method somewhat was overshadowing the security
initializer's responsibilities. This method has been trimmed down into a contract
filter function sub classes can use to define what option contracts they want to
select.
This change allows the universe selection model to select different universe
definitions as time proceeds. This enables the definition of a universe model
that, for example, could add option chains for securities selected by a different
universe model.
The BasicTemplateOptionsFrameworkAlgorithm was added to showcase and provide
regression for a universe model that selects different universes.
Adds the concept of universe disposal which is requested by an algorithm
through invocation of UniverseManager.Remove, which is invoked via
algorithm.RemoveSecurity. This instructs the data feed that the algorithm
has requested to completely remove the universe and any child subscriptions
from the feed. Security changes are fired for all removed securities.
Provides demonstration algorithm showing the steps required to convert a
QCAlgorithm into the framework with minimal code changes.
1. Subclass QCAlgorithmFrameworkBridge
2. Add EmitInsights calls to where orders are placed
3. Profit :)
If we pull data and on the same time step that security gets removed,
we can still get that data in OnData(Slice) even though it was removed.
This change filters out removed securities by tracking a reference to
the subscription's disposed flag. Another change was made to wait until
the end of the time step to dispose of subscriptions.
Add IDataFeed.GetSubscription(SubscriptionDataConfig)
Since we start Monday and end on a Friday we aren't properly covering the
edge cases. As it currently stands, if we start on a date then we receive
data for that date, so a daily algo starting on the 8th receives it's first
data point on the 9th at 00:00 (daily bar is 8th 00:00 to 9th 00:00). Like
wise, the requested end date is the 17th and we include data from the 17th,
so the last data point is the 18th at 00:00 (daily bar is 17th 00:00 to 18th
00:00).
Renames CoarseUniverseTop5DollarVolumeAlgorithm.cs to CoarseFundamentalTop5Algorithm.cs: fine name was unconsistent with class name (not a QuantConnect pattern).
Adds Log method calls to python algorithm that are present in C# example.
Subscribe to daily data instead of minute-resolution to be able to run tests locally. Also, liquidate the position in one of the event handlers to generate more trades.
- Adds regression test for that algorithm.