- Remove unrequired `GetBuyingPower`
- Making `BuyingPowerModel.GetMaintenanceMarginRequirement` protected
instead of public
- Adding `GetMaximumOrderQuantityForDeltaBuyingPower` to replace
public `GetMaintenanceMarginRequirement` and improve API experience for
consumers like the `DefaultMarginCallModel`
- Adding new unit tests
- Adding `FreePortfolioValue` to be set after algorithm initialize based
on the `TotalPortfolioValue` and the `FreePortfolioValuePercentage`
- Updating regression tests
- Adding new regression test
- Adding check for minimum order value at `BuyingPowerModel`
This flag indicates whether or not the local regression test system,
via RegressionTests.AlgorithmStatisticsRegression should run a given
IRegressionAlgorithmDefinition
It's important that we keep the factor files consistent with respect to
the date that they were generated. This enables us to run the regression
algorithms in the cloud and get the same results by using the factor files
from the correct date.
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.
In order to test the GDAX FillModel and FeeModel that respects both lot size, the fractionalQuantityRegressionModel was changed to use the GDAX Brokerage. This drastically changed the regression statistics for the regression test. These statistics have been updated
Decreasing the fractional quantity of the gdax lot sizes required test corrections for BrokerageTransactionHandlerTests specifically RoundOff_LessThanLotSize_Fractional_Orders, RoundOff_Short_Fractional_Orders, RoundOff_Long_Fractional_Orders order. The quantity of the test orders needed to be reduced in order to comply with the updated lot order sizes
Also needed to change the FractionalQuantityRegressionAlgorithm - which is supposed to have one order fail because the quantity is too small. This order needed a smaller quantity in order to fail with the new lot sizes
Updated FactionionalQuantityRegressionAlgorithm tests
- Update quantity to decimal in OptionExerciseOrder
- Update FractionalQuantityRegressionAlgorithm to use QuoteBarConsolidator
- Update FractionalQuantityRegressionAlgorithm stats
- Truncate order quantity to int in IB exerciseOptions
- Truncate order quantity to int in FuzzyInferenceAlgorithm