Skip to content

Commit 958866a

Browse files
committed
Add html reporting
1 parent 14742ea commit 958866a

File tree

99 files changed

+59542
-6498
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+59542
-6498
lines changed

examples/resources/backtest_report/report.json

Lines changed: 58444 additions & 3410 deletions
Large diffs are not rendered by default.
File renamed without changes.

investing_algorithm_framework/__init__.py

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,27 @@
2222
PandasOHLCVBacktestMarketDataSource, PandasOHLCVMarketDataSource
2323
from .create_app import create_app
2424
from .download_data import download
25-
from .overfitting import create_ohlcv_shuffle_permutation, \
25+
from .reporting import create_ohlcv_shuffle_permutation, \
2626
create_ohlcv_shuffle_returns_and_reconstruct_permutation, \
2727
create_ohlcv_shuffle_block_permutation
28-
from .metrics import get_volatility, get_sortino_ratio, get_profit_factor, \
28+
from .metrics import get_annual_volatility, get_sortino_ratio, get_profit_factor, \
2929
get_cumulative_profit_factor_series, get_rolling_profit_factor_series, \
3030
get_sharpe_ratio, get_price_efficiency_ratio, get_equity_curve, \
3131
get_drawdown_series, get_max_drawdown, get_cagr, \
3232
get_standard_deviation_returns, get_standard_deviation_downside_returns, \
33-
get_max_drawdown_absolute, get_exposure_time, get_average_trade_duration, \
34-
get_net_profit, get_win_rate, get_win_loss_ratio, get_calmar_ratio, \
35-
get_trade_frequency
33+
get_max_drawdown_absolute, get_exposure, get_average_trade_duration, \
34+
get_win_rate, get_win_loss_ratio, get_calmar_ratio, \
35+
get_trade_frequency, get_total_return, get_max_drawdown_duration, \
36+
get_max_daily_drawdown, get_trades_per_day, get_trades_per_year, \
37+
get_percentage_winning_months, get_worst_month, get_worst_trade, \
38+
get_best_trade, get_best_month, get_best_year, get_average_loss, \
39+
get_average_gain, get_average_yearly_return, get_yearly_returns, \
40+
get_monthly_returns, get_average_monthly_return, get_worst_year, \
41+
get_best_trade_date, get_worst_trade_date, get_percentage_winning_years, \
42+
get_average_monthly_return_losing_months, get_rolling_sharpe_ratio, \
43+
get_average_monthly_return_winning_months
44+
from .reporting import generate_backtest_report
45+
3646

3747
__all__ = [
3848
"Algorithm",
@@ -111,18 +121,42 @@
111121
"create_ohlcv_shuffle_block_permutation",
112122
"PandasOHLCVBacktestMarketDataSource",
113123
"PandasOHLCVMarketDataSource",
114-
"get_volatility",
124+
"get_annual_volatility",
115125
"get_sortino_ratio",
116126
"get_cagr",
117127
"get_standard_deviation_returns",
118128
"get_standard_deviation_downside_returns",
119129
"SnapshotInterval",
120130
"get_max_drawdown_absolute",
121-
"get_exposure_time",
131+
"get_exposure",
122132
"get_average_trade_duration",
123-
"get_net_profit",
133+
"get_total_return",
124134
"get_win_rate",
125135
"get_win_loss_ratio",
126136
"get_calmar_ratio",
127137
"get_trade_frequency",
138+
"get_max_drawdown_duration",
139+
"get_max_daily_drawdown",
140+
"get_trades_per_day",
141+
"get_trades_per_year",
142+
"get_percentage_winning_months",
143+
"get_worst_month",
144+
"get_worst_trade",
145+
"get_best_trade",
146+
"get_best_month",
147+
"get_best_year",
148+
"get_worst_year",
149+
"get_average_loss",
150+
"get_average_gain",
151+
"get_average_yearly_return",
152+
"get_yearly_returns",
153+
"get_monthly_returns",
154+
"get_average_monthly_return",
155+
"get_best_trade_date",
156+
"get_worst_trade_date",
157+
"get_percentage_winning_years",
158+
"get_average_monthly_return_losing_months",
159+
"get_average_monthly_return_winning_months",
160+
"get_rolling_sharpe_ratio",
161+
"generate_backtest_report"
128162
]

investing_algorithm_framework/app/reporting/ascii.py

Whitespace-only changes.

investing_algorithm_framework/app/reporting/backtest_report.py

Whitespace-only changes.

investing_algorithm_framework/app/reporting/charts/__init__.py

Whitespace-only changes.

investing_algorithm_framework/app/reporting/charts/equity_curve_drawdown.py

Whitespace-only changes.

investing_algorithm_framework/app/reporting/charts/monthly_returns_heatmap.py

Whitespace-only changes.

investing_algorithm_framework/app/reporting/charts/rolling_sharp_ratio.py

Whitespace-only changes.

0 commit comments

Comments
 (0)