Skip to content

Commit

Permalink
Update cloud optimize statistics indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmerle committed Jul 21, 2021
1 parent 62ccdc3 commit a5431a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
4 changes: 2 additions & 2 deletions lean/commands/cloud/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ def _get_backtest_statistic(backtest: QCOptimizationBacktest, target: str) -> fl
:return: the value of the target statistic on the backtest
"""
if target == "TotalPerformance.PortfolioStatistics.SharpeRatio":
return backtest.statistics[14]
return backtest.statistics[15]
elif target == "TotalPerformance.PortfolioStatistics.CompoundingAnnualReturn":
return backtest.statistics[6]
elif target == "TotalPerformance.PortfolioStatistics.ProbabilisticSharpeRatio":
return backtest.statistics[12]
return backtest.statistics[13]
elif target == "TotalPerformance.PortfolioStatistics.Drawdown":
return backtest.statistics[7]
else:
Expand Down

0 comments on commit a5431a7

Please sign in to comment.