- Adding new `StepTimeProvider` that will advance time based on a
desired custom evaluator.
- Live trading `Options`, `Futures` and `Coarse` data will use a
`FrontierAwareEnumerator` + `StepTimeProvider`. This will allow to hold
the selection data until its the desired time
- `Universe.CanRemoveMember` will round the members time in the universe
based on the `UniverseSettings.MinimumTimeInUniverse`
- Adding `LazyToUpper()` implementation, that will avoid the call to
`ToUpper` if the string is already upper.
- Reduce the timezone conversions at `Time.EachTradeableDayInTimeZone`
- `TotalPortfolioValue` will iterate over all securities once
- Adding new `SecurityIdentifier` cache, significant impact for
algorithms using coarse/fine data
- When subscribing to `Coarse` data the `LiveTradingDataFeed` will use
the normalized `CoarseFundamental Universe Symbol` for that market ->
not using the random GUID
- Adding unit tests which reproduce issue.
Implements `DataNormalizationMode` field in `UniverseSettings` to enable the settings of a desired `DataNormalizationMode` to the securities that are chosen in Universe Selection.
Adds constructor overload that accepts a PyObject representing a `Func<DateTime, Symbol[]>` object to `ScheduledUniverse`. With this overload, we are able to create a `ScheduledUniverse` with a selector defined in a python script.
- Implementing `QCAlgorithm.AddUniverseSelectionModel`
- Adding C#/Py regression algorithms using the new API
- Modifying `ManualUniverSelectionModels` symbol, adding hash of
the selected `Symbol.Values`
- Modifying `Coarse` and `Fine` symbol, adding random GUID
- Adding `NullUniverseSelectionModel`
In a few places SubscriptionDataReader was incorrectly assuming the TradeableDates were in ExchangeTimeZone instead of DataTimeZone.
This issue was found specifically with CFD assets which have the exchange time zone ahead of the data time zone.
- After removing a `Subscription` entirely, we will now also remove the
matching `SubscriptionDataConfig` from the `SubscriptionManager`
- Adding a new regression test, which fails in `master`
- Fixing previous PR change that removed `Trace` logging when adding
and removing a `Subscription`
- Fixing a bug in the `UserDefinedUniverse` where calling `RemoveMember`
would cause the `SubscriptionDataConfig` to be re added to the
`SubscriptionManager` (not the `DF`). Found this through added
regression test.
- The class `Subscription` will internally track each `Universe`
`SubscriptionRequest` added or removed
- Adding regression test in which two different `Universe` request the
same `SubscriptionDataConfig` and one of them removes/adds it in a
toggle fashion (fails on current master)
- `UniverseSelection` pending removals will also be tracked by
`Universe`
- `UniverseDecorator` will overwrite the `Universe` member of
`SubscriptionsRequests` at `GetSubscriptionRequests()`. This is due to
`this != this,Universe`
- Adding `Subscription` unit tests covering expected behavior
- Extracting pending removals logic from `UniverseSelection` class into
a new helper class `PendingRemovalsManager`. This new class will keep
track of the `universes` requesting to remove a security. Adding unit tests
- 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
- Some formatting, comments changes
- Removing SubscriptionManager from new FuturesChainUniverse constructor
- Making Option and Future properties in FutureChainUniverse and
OptionChainUniverse
- Adding new and obsoleting old constructors which received
SecurityInitializer as a parameter.
- Extracting the setting of Underlying security at UniverseSelection for
Option and Future chain universes.
- 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 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.
- 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 previous implementation had some issues and introduced undue
complexity. This implementation follows established patterns of
having the algorithm manager apply changes to the algorithm that
result from universe selection.
Fetches the unique set of securities that are currently members of at least one
universe. This is the set of active/tradable securities that are currently receiving
data. It does not guarantee that we've received pricing data, but does guarantee that
the security is a member of the universe and we've minimally added a subscription for
data and have not yet removed that subscription (although it is possible for the sub
to end before the security is removed -- very rare/unlikely scenario though).
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.
Provides a common abstraction for UserDefinedUniverse and the
yet-to-be-impemented ScheduledUniverse. Categorized by the fact
that they don't operate on data, but instead a fixed schedule and
any data required is fetched through external means, such as a
web request.
This reverts commit 0df445c9a8, reversing
changes made to b2095907fd.
Memory instability was reported during live trading. Internal feed defaulting to false
is suspected cause.
In backtesting with universe selection, when symbols are be added and removed the next day, we have experienced slightly different backtesting results for the same algorithm. This was caused by invalid factors applied to equities due to the sharing of a SubscriptionDataConfig instance between two threads.
The issue was solved by calling the SubscriptionDataConfig copy constructor in Universe.GetSubscriptionRequests.
Previously, removal of option contracts from the option chain universe was allowed only on date change (in both live and backtesting).
Now, in order to reduce market data subscriptions in live mode, removal is allowed intraday if the contract has been in the universe for at least 15 minutes. When backtesting, behavior is unchanged.
This method is used by both Future and OptionsChainUniverse. This method is useful, espeically in the SecurityManager. It will eventually be used there.