- 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.
- ConstituentsQC500GeneratorAlgorithm:
- Change monthly flag to be consistent with Selection Model that cannot use Schedule events.
- Use a Dictionary keyed by `Symbol` instead of `string`.
- Selector functions return `Universe.Unchanged` instead of empty list;
-Refactoring and more informative logging.
- QC500UniverseSelectionModel
- SelectFine methods were performing all the logics every day and it should be only once per month
- Log and return `Universe.Unchanged` before division by zero if universe drops to zero members after filtering before selection by sector.
- Refactoring
`MaximumSectorExposureRiskModel` needs `IndustryTemplateCode` which is only found in Equity data with Fundamental data. Thus, we check whether all active securities have such information.
- Updates PythonNet to 1.0.5.17
- Improve performance by adding new `interop` `type` cache holding a `bool`, true if its an `exception`. And adding a `setter` and `getter` cache for the `propertyobject`. Closes#2925.
- Decimal parsing allows numeric string in exponential notation. Closes#2918#2919.
Closes#2929
- 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;
- This commit is related to PR 19 in QC/pythonnet
- C# decimal will be cast to C# double and converted into python
float
- Adding new `decimal.py` into the python algorithm project. This is
required for backwards compatibility with users performing operations
over expected decimal types (like `Price`)
- Updating two python regression test algorithms using custom python
execution models to be aware and ignore floating point precision errors
when handling order sizing.
The C# version was supposed to handle python modules, but when they inherit from a C# module, pythonnet send them as C# objects. Consequently, they are not wrapped and cannot be used. The python version of `CompositeRiskManagementModel` solves the issue.
- Implements python version of `MaximumUnrealizedProfitPercentPerSecurity`
- Updates `CompositeRiskManagementModelFrameworkAlgorithm` in order to use python risk model.
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
- 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
The CompositeRiskManagementModel aims to provide support for multiple
risk management models. In order to accomplish this, it must respect
the return values from each individual model. As previously written,
the composite model was allowing models run later to completely nuke
the targets produced by earlier models. This change performs the
composition of targets using the same technique as is used when over
laying the risk adjusted targets on top of the portfolio construction
model's targets. This approach gives preference, by symbol, to the
risk adjusted targets, but if there is no risk adjusted target, then
it uses the targets from the previous step. For example, if targets
for A, B, C, and D are produced by PCM, then risk model 1 adjusts to
zero targets for B and cuts the targets for C in half, these are then
piped to risk model 2 (A, C/2, D). Risk model 2 may return ZERO targets.
This doesn't mean we should remove all the targets, it simply means
that the risk model didn't adjust any and we should use the output
from risk model 1. Now, let's say risk model 2 zeroes out A and cuts
B in half again, the final result should (and now is) C/4, D. IOW,
risk models only return deltas, things to be changed, so returning
nothing means there are no changes.