These times were being set AFTER they were copied, so the insights sent into
the portfolio construction model were the originals (uncopied) and then copies
that are sent into the event are then piped to the insight manager/alpha handler
for scoring, so interestingly, the scoring remained the same so regression tests
continued to pass because no types were written with a dependency on that data
other than the scoring, which as mentioned, got the copies with the correct times.
A recent change made use of this time and showcases this heinous bug in all its
glory.
This refactoring overrides the event invocator and seals the method to force
derived types to use the event handler, thereby guaranteeing that the event is
always invoked AFTER the generated/close times are properly set, also ensuring
that the copy is performed after the times are set as well.
Since we're moving towards better support of multiple universes,
it's important that we check that child subscriptions aren't in
those other universes before removing the security.
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.
Launcher project is packed as `QuantConnect.Lean`but as a mean ot having all Lean features just calling one package.
In the same sense, `QuantConnect.Algorithm.CSharp` is included as package and added as dependecy in the `QuantConnect.Lean` package just to have a working example aailable out-of-the-box.
This type is just used as a container for generatd insights. Renaming in
preparation for a new InsightCollection to mirror the PortfolioTargetCollection
VWAP will submit market orders while the current price is more favorable than VWAP.
STD will submit market orders while the current price is a configured number of
standard deviations away from the mean in the favorable direction.
GetSymbolsFromPyObject now returns IEnumerable<Symbol> and throws if its argument is not Symbol or Symbol[] object and if the Symbol has not been added to the Securities object.
We had an issue with the data feed picking up universe/security changes
too quickly, thereby preventing user code from being able to configure the
security object properly. Specifically, users were having an issue setting
the data normalization mode of options and underlying equity securities. By
the time the user code had set the data mode, the data feed had already
created a subscription and began processing it, so the changes were never
seen in the data feed.
This change moves all security/universe changes into pending lists and at
the end of the time step applies those changes. Security objects are still
added directly to the SecurityManager for instance access, but we delay in
adding the security to the universe and the universe to the UniverseManager.
Once added to the universe manager, an event is fired and the data feed will
process the new subscriptions.
When creating a CRL type in runtime to represent a python custom data class, we need define `DynamicData` as its parent class so that it passes the `IsAssignableFrom` condition in `SubscriptionManager.AddConsolidator`
Finalizes implementation of alpha framework, including alpha.spanner updates, many name changes, and harmonizes insight serialization with alpha streams API
The term 'alpha' is used to describe the entire algorithm. Therefore, 'alpha'
produces insights. From this we have things like IAlphaModel, which is the model
defining how insights are produced. We have IAlphaHandler, which defines how the
insights from a single 'alpha' (the algorithm) are managed, analyzed, and stored.
Types closer to the individual prediction level, such as InsightDirection, or
InsightScore relate directly to exactly 1 insight. The distinction between the
two became more clear as we developed the insights API, and from that effort it
was decided to harmonize alpha/insight terminology across the various QC systems.
The check for Lean indicators was testing for `Indicator`, `BarIndicator` and `TradeBarIndicator` types where it should check for `IndicatorBase<T>` which includes `WindowIndicator<T>`.
The engine defines securities for each universe to properly track them within
the data feed. These securities are not tradable and have no price data associated
with them, and as such, we should not be sending history requests for these symbols.
This change removes all universe symbols from history requests.
NOTE: Requests made directly to the history provider are not filtered out, as the
filtering happens within the QCAlgorithm implementation.
In order to access the custom data classes, the module containing them was added to the ObjectActivator. This was unnecessary if it wasn't a custom data algorithm.
Also, this operation would not be taken into account if the custom data class were defined after the algorithm was created: this is the case for QuantBook.
We refactor how custom data is handled: a new class was added to provide a instance creation factory that creates an instance of each python custom type.
When buying power models return a zero quantity for an order, a flag can be set to indicate if it's an error condition, so CalculateOrderQuantity will show the error to the user.
For cases where implicit conversion to decimal from indicator was not properly handled by pythonnet, we expliticly get `Current.Value` and redirect to `Plot(string,decimal)` overload.
The HasSufficientBuyingPowerForOrder method has been updated to return a result object including the reason the order cannot be executed.
The SetHoldings method has also been updated to display a message if CalculateOrderQuantity returns zero.
- Adds log to display the python version the algorithm is using.
- Fixes python algorithms that were failing because of small subtleties
like leading zeroes.
- Updates pythonnet with a version compiled with python 3.6 flags
- Changes in DockerfileFoundation: we now use miniconda to manage the python
environment.
- Took the opportunity to add NTLK (#1349), Tensorforce (#1369) and
PyTorch/Pyro (#1385).
- Changes readme in Algorithm.Python to show steps to install miniconda
This setting forced the data feed and algorithm threads to synchronize every day
at midnight. The changes to the regression values are due to losing the benchmark
sample at midnight