stable/freqtrade
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
..
commands Automatically export hyperopt parameters 2021-06-29 20:51:25 +02:00
configuration Automatically export hyperopt parameters 2021-06-29 20:51:25 +02:00
data unexpected docstring params 2021-06-25 23:56:16 +05:30
edge spell corrections 2021-06-25 22:10:04 +05:30
enums Small style improvements (no empty line at start) 2021-06-10 06:21:10 +02:00
exchange Reduce verbosity of getting sell-rate from orderbook 2021-06-26 20:09:52 +02:00
mixins Improve wording, fix bug 2020-12-07 15:48:06 +01:00
optimize add daily_profit_list 2021-07-04 14:38:17 +02:00
persistence "/profit N" command should print best pair for the same period of time, not for all trades 2021-06-28 23:42:09 +03:00
plot Plotting: Fix hover mode options after plotly update 2021-06-30 20:11:11 +02:00
plugins unexpected docstring params 2021-06-25 23:56:16 +05:30
resolvers Load parameters from file 2021-06-29 07:07:34 +02:00
rpc "/profit N" command should print best pair for the same period of time, not for all trades 2021-06-28 23:42:09 +03:00
strategy Merge pull request #5219 from freqtrade/hyperopt_paramfile 2021-07-04 13:56:52 +02:00
templates Move strategy-override signals to top-level of the config 2021-06-26 16:06:13 +02:00
vendor Apply isort to freqtrade codebase 2020-09-28 19:40:46 +02:00
__init__.py Remove encode/decode for hyperopt 2021-05-01 17:01:52 +02:00
__main__.py Remove support for 3.6 2020-12-14 19:18:54 +01:00
constants.py Catch trying to read faulty parameter file 2021-06-29 20:51:29 +02:00
exceptions.py spell corrections 2021-06-25 22:10:04 +05:30
freqtradebot.py Move strategy-override signals to top-level of the config 2021-06-26 16:06:13 +02:00
loggers.py Fix double logging 2020-11-25 14:31:34 +01:00
main.py Remove support for 3.6 2020-12-14 19:18:54 +01:00
misc.py unexpected docstring params 2021-06-25 23:56:16 +05:30
wallets.py Move state enums to enums package 2021-06-08 21:20:35 +02:00
worker.py spell corrections 2021-06-25 22:10:04 +05:30