- Removing `using QCAlgorithmFramework = QuantConnect.Algorithm.QCAlgorithm`
- Removing `QCAlgorithmFrameworkBridge`
- Removing `IsFrameworkAlgorithm`
- Making `EmitInsightBasedOnFill` private. Adding new
`IOrderEventProvider` exposing an `event` to which `QCAlgorithm` will
subscribe.
- `AccountType.Cash` algorithms will be allowed to manually trade and
emight insights manually or with alpha model.
- ConstituentsQC500GeneratorAlgorithm:
- Change monthly flag to be consistent with Selection Model that cannot use Schedule events.
- Use a Dictionary keyed by `Symbol` instead of `string`.
- Selector functions return `Universe.Unchanged` instead of empty list;
-Refactoring and more informative logging.
- QC500UniverseSelectionModel
- SelectFine methods were performing all the logics every day and it should be only once per month
- Log and return `Universe.Unchanged` before division by zero if universe drops to zero members after filtering before selection by sector.
- Refactoring
- Adding new ISecurityService and its implementation SecurityService.
Expose by SecurityManager.
This class will expose a method for creating new securities. The
SecurityManager is exposing this new interface, calling _securityService
internally, so Future/OptionUniverseSelectionModel.cs can use it
- Replacing all usages of SecurityManager.CreateSecurity for new
ISecurityService
- Modifying `Cash.cs` and `CashBook.cs` `EnsureCurrencyDataFeeds()` to
return newly added `SubscriptionDataConfig` instead of `Security`. This
will avoid using `Security.Subscriptions` at call site.
- Moving old SecurityManager.CreateSecurity into new
SecurityServiceTests.cs
- Removed usages of algorithm.Securities.key as a parameter for the
`ManualUniverseSelectionModel()` since those securities, added through
`AddXXXX` calls will be managed by the `UserDefinedUniverse`. This was
causing for Universes to try to add the same subscription requests
- Adding new empty constructor for ManualUniverseSelectionModel,
required for Python
- ManualUniverse will return any existing SDC for the
symbol. This is for maintaining existing behavior and
preventing breaking changes: Specifically motivated by usages of
Algorithm.Securities.Keys as constructor parameter of the
ManualUniverseSelectionModel, since those Symbols added by Addxxx()
calls will already be managed by the UserDefinedUniverse
- Making some format modifications to aling with used Lean formatting
- Some formatting, comments changes
- Removing SubscriptionManager from new FuturesChainUniverse constructor
- Making Option and Future properties in FutureChainUniverse and
OptionChainUniverse
- Obsolete Universe.CreateSecurity, Universe.SetSecurityInitializer,
Universe.GetSubscriptionRequests(Security security, DateTime currentTimeUtc, DateTime maximumEndTimeUtc)
- Adding new GetSubscriptionRequests() overload that will receive
instance which implementes new ISubscriptionService
- UserDefinedUniverse will stop using Security.Subscriptions
This algorithm shows how to implement a futures strategy in a framework algorithm.
`FutureUniverseSelectionModel` portfolio selection model was implemented to provide a base class to help create other futures universe selection models.
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.
`UniverseSelectionModelPythonWrapper.CreateUniverses` method modifier should be `override` instead of `virtual`, since that class inherit from `UniverseSelectionModel`.
- This version serves two purposes: example of universe selection model and base class for other universe selection models, since the pythonnet doesn't deal well with inheritance of abstract classes.
- Adds PyObject overload to `CoarseFundamentalUniverse`.
The exception in ignored because the generator isn't closed until it is being deleted (automatically in this case, when Python exits); the generator __del__ handler closes the generator, which triggers an exception of there is one.
We add entries for custom data w/ symbol references, so the generic look
up being performed here never resolves and throws an exception. With
custom data we add the entry manually and that same pattern has been
repeated here for consistency.
This happens when users pass Securities.Keys into the manual model,
causing the SecurityChanges object to have references to the canonical
securities, thereby leading to indicators and other things being
done to them unknowningly.
The PyObject parameter is converted into selector function of `Func<T1,T2>` type so that the model can user universe selector methods defined in python algorithms.
The ScheduledUniverseSelectionModel wraps the new ScheduledUniverse.
ScheduledUniverse is similar to the UserDefinedUniverse we use to create
universes for dopbox/remote files w/ symbol listing. The new abstraction
that 'turns on' this no-data/scheduled based universe behavior is the
ITimeTriggeredUniverse, which exposes GetTriggerTimes which yields the
date/times your univese selection function will be called.
A regression algorithm was also added to cover the new feature.