-
Updates SPY Market Data (#5493)
发布于
2021-04-19 16:31:01 +00:00 | 2431 次提交 在此版本后已推送到 master- Fixes Double to Decimal Cast in GetAnnualPerformance
GetAnnualPerformanceraises an exception if theAnnualPerformancecalculation returns a double that cannot be cast to decimal (smaller thandecimal.MinValueor bigger thandecimal.MaxValue).
SeeProbabilisticSharpeRatiowhere the same solution was applied.- Updates SPY Market Data
SPY is a key asset since it is the default benchmark, and any change can lead to different
AlphaandBeta-
Updates Unit Tests to Reflect Data Update
-
Updates Regression Tests to Reflect Data Update I
Most of the regression tests change because of updated data (market and factors) of SPY (default benchmark) while the total trade remain the same.
- Updates Regression Tests to Reflect Data Update II
The following regression tests were changed to adapt to adjusted prices and keep the total trades:
BacktestingBrokerageRegressionAlgorithmLimitIfTouchedRegressionAlgorithmPortfolioRebalanceOnCustomFuncRegressionAlgorithmSetAccountCurrencySecurityMarginModelRegressionAlgorithmStopLossOnOrderEventRegressionAlgorithmTimeInForceAlgorithm
The following regression tests have more trades since adjusted prices allowed more 1-2 shares trades that were rounded down to zero before:
FreePortfolioValueRegressionAlgorithm2 -> 3PortfolioRebalanceOnDateRulesRegressionAlgorithm291 -> 298TrailingStopRiskFrameworkAlgorithm5 -> 7
Especial cases:
AutoRegressiveIntegratedMovingAverageRegressionAlgorithm65 -> 52- ARIMA model sensibility
BlackLittermanPortfolioOptimizationFrameworkAlgorithm18 -> 19- BLM model sensibility
ExtendedMarketHoursHistoryRegressionAlgorithm20 -> 18- Less minute bars before market opens
- Addresses Peer-Review
Fix
BacktestingBrokerageRegressionAlgorithmto useCalculateOrderQuantityand round downquantityto an even number to pass a value assertion and update the expected value from 50 to 52.
The quantity calculated byCalculateOrderQuantityhas changed from 50 to 53 because of factor file update.下载附件