- Adding new `SetAccountCurrency()` for backtesting. Has to be called
before adding any `Security` or calling `SetCash()`, else will throw.
- Adding new Non account currency unit tests for `CashBuyingPower`,
`SecurityPortfolioModel`, `SecurityMarginModel`,
`SecurityPortfolioManager`, `Future/OptionMarginBuyingPowerModels`
- Adding new C# regression test using `SetAccountCurrency()`, one for
`CashBuyingPowerModel` and one for `SecurityMarginModel`
- Adding new Py and C# basic regression algorithms using
`SetAccountCurrency()`
- `Options` and `Futures` will use not use `AccountCurrency` as quote
Cash.
- `SecurityBenchmark` value will be in account currency
- Adding check at `AlgorithmManager.ProcessSplitSymbols()`, will skip
splits from removed securities.
- Adding regression test which reproduces original issue in master.
- Requires a new PythonNet 1.0.5.15 package where the different `.dll` are in a
specific folder: `\win` `\linux` and `\osx`
- Removed not present `decimal.py` from `Algorithm.Python` project. It
was moved into `Common`.
- Replace `xbuild` for `msbuild` required for using the `System.Runtime.InteropServices`.
Also note the `xbuild` on travis prints:
> >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
In the new package:
- C# decimal conversion will use C# double and python float due to the big performance impact of converting C# decimal to python decimal;
- `UniverseSelection` class will now keep track and remove internal
currency subscriptions through the usage of new class
`CurrencySubscriptionDataConfigManager`
- Modifying existing regression tests to assert bug 2773.
- Adding new regression test that fixes the case where a new cash is set
after initialization. This could happen during cash sync performed by
the `BrokerageTransactionHandler`.
- Adding new `CashAdded` event for the `CashBook` to solve the
issue.
- Moving `UniverseSelection.EnsureCurrencyDataFeeds` call into the
`IResultHandler` implementation through usage of the new `SetupHandlerHelper`
class, that will also set an initial conversion rate if none present.
- Adding regression test, that reproduces original issue
- `AlgorithmManager` will call `EnsureCurrencyDataFeeds()` before the
history requests are created so the conversion rate securities are also
updated during warmup.
- `EnsureCurrencyDataFeeds()` will add new `SubscriptionDataConfigs` to
the `_addedCurrencySubscriptionDataConfigs` hash set. This hash set will
be used during `UniverseSelection()` to add the subscriptions.
- Wont trigger a `UniverseSelection()` before warmup. This was causing
the data to be fetched twice and for consolidators to be updated with
old data.
- Adding a new regression test and adding new checks to existing
regression tests.
- `CashBook[NullCurrency] { get; }` will throw an exception
- Revert `Currencies.USD` changes in user facing algorithms
- Improve some documentation
- Revert some format changes
- Adding more asserts for regression test
- Adding new regression tests using a custom fee model which returns
`OrderFee.Zero`
- Adding a non-usd account currency test to the cash book tests
- Adding some unit tests for `NullCurrency` and `OrderFee.Zero`
- Replacing `decimal` for `OrderFee` at the `OrderEvent`.
- Adding `FeeModelNotUsingAccountCurrency` regression test
- Adding unit tests for `CashBuyingPowerModel` and `SecurityMarginModel`
with non account currency fees
- 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
- In some cases, for Resolution.Daily, application of splits were
up to one day behind the data. Causing the 'early' data to use a
wrong factor value
- Updating regression test affected by issue
- Adding new regression test
Restructured
Update message
Added removal of trailing highs for unnecessary securities
Add logging message
Improvements
Rename
Add regression Algorithm
Changed to use TradeBar values instead of only current price
Cleaned msg layout
Update Regression test
- The algorithm has been renamed to CoarseFundamentalTop3Algorithm and updated to select the Top 3 instead of Top 5.
- The only new data required is daily, map and factor file for FB and has been added (map and factor files are dated 6/4/2018, as required by all regression tests).
- The coarse fundamental open source data has been updated.
- The expected regression statistics for the algorithm have been updated.
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.
Move delisting date estimation to the constructor
Using `MarketHoursDatabase` for option delisting date estimation instead USHolidays
Adding file header.
Regression algorithm added.
Use of `ExchangeHours.IsDateOpen` instead `ExchangeHours.IsDateOpen.Holidays`.
Extract values from `symbol.ID` into a local variable.
Improved Regression test
A mechanical refactoring was performed to make algorithms currently used in
regression algorithms to implement IRegressionAlgorithmDefinition, which allows
algorithms to define their own expected statistics and what languages should be
run as part of regression. The type name of the C# type is used to determine the
file/model name for python. This was for simplicity, but if needed, could later be
refactored to expose more information, but for now the convention of keeping names
the same makes sense and just works easily.
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.
Provides demonstration algorithm showing the steps required to convert a
QCAlgorithm into the framework with minimal code changes.
1. Subclass QCAlgorithmFrameworkBridge
2. Add EmitInsights calls to where orders are placed
3. Profit :)
Renames CoarseUniverseTop5DollarVolumeAlgorithm.cs to CoarseFundamentalTop5Algorithm.cs: fine name was unconsistent with class name (not a QuantConnect pattern).
Adds Log method calls to python algorithm that are present in C# example.