Styling fixes

This commit is contained in:
Matthias 2021-10-21 07:42:19 +02:00
parent 7b5346b984
commit e458c9867a
3 changed files with 8 additions and 5 deletions

View File

@ -23,7 +23,8 @@ ARGS_COMMON_OPTIMIZE = ["timeframe", "timerange", "dataformat_ohlcv",
ARGS_BACKTEST = ARGS_COMMON_OPTIMIZE + ["position_stacking", "use_max_market_positions", ARGS_BACKTEST = ARGS_COMMON_OPTIMIZE + ["position_stacking", "use_max_market_positions",
"enable_protections", "dry_run_wallet", "timeframe_detail", "enable_protections", "dry_run_wallet", "timeframe_detail",
"strategy_list", "export", "exportfilename", "backtest_breakdown"] "strategy_list", "export", "exportfilename",
"backtest_breakdown"]
ARGS_HYPEROPT = ARGS_COMMON_OPTIMIZE + ["hyperopt", "hyperopt_path", ARGS_HYPEROPT = ARGS_COMMON_OPTIMIZE + ["hyperopt", "hyperopt_path",
"position_stacking", "use_max_market_positions", "position_stacking", "use_max_market_positions",

View File

@ -228,10 +228,10 @@ def generate_periodic_breakdown_stats(trade_list: List, period: str) -> List[Dic
if len(results) == 0: if len(results) == 0:
return [] return []
results['close_date'] = to_datetime(results['close_date'], utc=True) results['close_date'] = to_datetime(results['close_date'], utc=True)
resample = _get_resample_from_period(period) resample_period = _get_resample_from_period(period)
period = results.resample(resample, on='close_date') resampled = results.resample(resample_period, on='close_date')
stats = [] stats = []
for name, day in period: for name, day in resampled:
profit_abs = day['profit_abs'].sum().round(10) profit_abs = day['profit_abs'].sum().round(10)
wins = sum(day['profit_abs'] > 0) wins = sum(day['profit_abs'] > 0)
draws = sum(day['profit_abs'] == 0) draws = sum(day['profit_abs'] == 0)

View File

@ -15,7 +15,9 @@ from freqtrade.edge import PairInfo
from freqtrade.enums import SellType from freqtrade.enums import SellType
from freqtrade.optimize.optimize_reports import (_get_resample_from_period, generate_backtest_stats, from freqtrade.optimize.optimize_reports import (_get_resample_from_period, generate_backtest_stats,
generate_daily_stats, generate_edge_table, generate_daily_stats, generate_edge_table,
generate_pair_metrics, generate_periodic_breakdown_stats, generate_sell_reason_stats, generate_pair_metrics,
generate_periodic_breakdown_stats,
generate_sell_reason_stats,
generate_strategy_comparison, generate_strategy_comparison,
generate_trading_stats, store_backtest_stats, generate_trading_stats, store_backtest_stats,
text_table_bt_results, text_table_sell_reason, text_table_bt_results, text_table_sell_reason,