- 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.
- Adding new `IAlgorithm.AccountCurrency { get; }` that will point to the
`Portfolio.CashBook.AccountCurrency`. Setter will be added in a
following PR.
- Base `Brokerage` class will now have a `AccountCurrency { get }`
pointing to the `IAccountCurrencyProvider`. Will be used by the different
brokerages implementations.
Many logs were showing the name of the first algorithm on the line:
SetUp Backtesting: User: <uid> ProjectId: <pid> AlgoId: AddRemoveSecurityRegressionAlgorithm
Instead of the name of the running algorithm.
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 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.
When inspecting regression differences, the first thing that should be looked at
are the fills. Some of the regression algorithms log this data making it possible
to inspect whie others do not. In addition, for algorithms with many securities the
log can quickly become fills with noise from scheduled event logging.
This change aims to make it very easy to compare any regressions in orders/fills
against the most recent successful run of the specified regression algorithm.
When the algorithm finishes, the alpha statistics are merged with the backtest
result statistics. This keeps the regression testing pattern of alpha statistics
the same as the existing regular statistics.
This file is no longer written as part of the regresson test suit.
Regression logs files can now be found in the ./passed and ./regression
folders from the test's executing directory.
Often when implementing new features I find myself having to switch to master
in order to get a copy of a passing regression run log file. This change aims
to simplify that process by saving regression algorithm log files to their own
unique file and if they pass the regression test, copying that file to another
location to keep it while testing a potentially failing regression run.
The current run and most recent passed log files are placed in separate
directories to enable easy directory diffing to quickly find regression issues.
Current run:
./regression/<algorithm-name>.<language>.log
Most recent pass:
./passed/<algorithm-name>.<language>.log
ILeanManagement is meant to be a wrapper on the entire Lean engine and allow
command to be sent from ILeanManagement to the rest of Lean. In addition,
ILeanManagement can act as a hosting environment specific implementation for hosting Leaninstances.
The engine itself shouldn't concern itself with where jobs come from, so we pull the next job and acknowledge job logic out of Engine.Run
Add RamAllocation to AlgorithmNodePacket
Removed unused BaseDataFeed and IQFeedDataFeed
Add catch for NullReferenceException in stream store
ConsoleSetupHandler now throws on live jobs, use BrokerageSetupHandler
Renamed/moved FixedSizedQueue to Util\FixedSizeQueue
Adds EndTime to BaseData
Adds Period to TradeBar
Now filling data forward on days missing files/data
Some performance enhancements
Removed sorted dictonary in DataStream/AlgorithmManager
We round down fill forward data in the data stream since if we were to perform this in the data feed we would continually produce data at the same time and it would all go into the algorithm at once.
Includes RegressionTests.BasicTemplateAlgorithm
Also includes some lines to help produce the dictionary needed for asserting algorithm statistics in ConsoleResultHandler