freqtrade_origin/freqtrade/optimize
octaviusgus 4aa2ae37bd
add daily_profit_list
added extra key daily_profit in return of optimize_reports.generate_daily_stats
this allows us to analyze and plot a daily profit chart / equity line using snippet below inside jupyter notebook

```
# Plotting equity line (starting with 0 on day 1 and adding daily profit for each backtested day)

from freqtrade.configuration import Configuration
from freqtrade.data.btanalysis import load_backtest_data, load_backtest_stats
import plotly.express as px
import pandas as pd

# strategy = 'Strat'
# config = Configuration.from_files(["user_data/config.json"])
# backtest_dir = config["user_data_dir"] / "backtest_results"

stats = load_backtest_stats(backtest_dir)
strategy_stats = stats['strategy'][strategy]

equity = 0
equity_daily = []
for dp in strategy_stats['daily_profit']:
    equity_daily.append(equity)
    equity += float(dp)

dates = pd.date_range(strategy_stats['backtest_start'], strategy_stats['backtest_end'])

df = pd.DataFrame({'dates':dates,'equity_daily':equity_daily})

fig = px.line(df, x="dates", y="equity_daily")
fig.show()

```
2021-07-04 14:38:17 +02:00
..
space Use 3 decimals for ROI space 2021-04-15 21:38:20 +02:00
__init__.py Small adjustments for moved commands 2020-01-26 13:46:01 +01:00
backtesting.py Improve formatting to avoid backslash newlines 2021-07-03 08:22:21 +02:00
default_hyperopt_loss.py Don't use profit_percent for backtesting results anymore 2021-01-24 08:58:41 +01:00
edge_cli.py Allow edge to use dynamic pairlists 2021-03-30 20:20:24 +02:00
hyperopt_auto.py Don't use _set_value for autoOpt-Spaces 2021-04-10 09:53:48 +02:00
hyperopt_interface.py Use 3 decimals for ROI space 2021-04-15 21:38:20 +02:00
hyperopt_loss_interface.py Provide full backtest-statistics to Hyperopt loss functions 2021-07-04 10:15:19 +02:00
hyperopt_loss_onlyprofit.py Update onlyprofit loss should use absolute profit 2021-05-28 08:38:46 +02:00
hyperopt_loss_sharpe_daily.py Don't use profit_percent for backtesting results anymore 2021-01-24 08:58:41 +01:00
hyperopt_loss_sharpe.py Don't use profit_percent for backtesting results anymore 2021-01-24 08:58:41 +01:00
hyperopt_loss_sortino_daily.py Don't use profit_percent for backtesting results anymore 2021-01-24 08:58:41 +01:00
hyperopt_loss_sortino.py Don't use profit_percent for backtesting results anymore 2021-01-24 08:58:41 +01:00
hyperopt_tools.py Fix np.bool_ not outputting correctly 2021-07-02 20:52:25 +02:00
hyperopt.py Merge pull request #5219 from freqtrade/hyperopt_paramfile 2021-07-04 13:56:52 +02:00
optimize_reports.py add daily_profit_list 2021-07-04 14:38:17 +02:00