Skip to content

Commit

Permalink
chore: Add benchmark option to backtest function
Browse files Browse the repository at this point in the history
  • Loading branch information
saleh-mir committed Aug 5, 2024
1 parent c1a3d92 commit 46d51c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jesse/research/backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def backtest(
generate_quantstats: bool = False,
generate_hyperparameters: bool = False,
generate_equity_curve: bool = False,
benchmark: bool = False,
generate_csv: bool = False,
generate_json: bool = False,
generate_logs: bool = False,
Expand Down Expand Up @@ -64,6 +65,7 @@ def backtest(
generate_csv=generate_csv,
generate_json=generate_json,
generate_equity_curve=generate_equity_curve,
benchmark=benchmark,
generate_hyperparameters=generate_hyperparameters,
generate_logs=generate_logs,
fast_mode=fast_mode,
Expand All @@ -84,6 +86,7 @@ def _isolated_backtest(
generate_csv: bool = False,
generate_json: bool = False,
generate_equity_curve: bool = False,
benchmark: bool = False,
generate_hyperparameters: bool = False,
generate_logs: bool = False,
fast_mode: bool = False,
Expand Down Expand Up @@ -150,6 +153,7 @@ def _isolated_backtest(
generate_csv=generate_csv,
generate_json=generate_json,
generate_equity_curve=generate_equity_curve,
benchmark=benchmark,
generate_hyperparameters=generate_hyperparameters,
generate_logs=generate_logs,
fast_mode=fast_mode,
Expand Down
1 change: 1 addition & 0 deletions jesse/services/charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def equity_curve(benchmark: bool = False) -> list:

return result


def portfolio_vs_asset_returns(study_name: str = None) -> str:
if jh.is_unit_testing():
return 'charts'
Expand Down

0 comments on commit 46d51c2

Please sign in to comment.