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.
Adds method overload that accept a `PyObject` to `SetAlpha`, `SetExecution`, `SetPortfolioConstruction`, `SetPortfolioSelection` and `SetRiskManagement`. In these methods, a custom model written in python will be wrapped around the respective `PythonWrapper`.