Export locks as part of backtesting
This commit is contained in:
parent
57a4044eb0
commit
5849d07497
@ -473,6 +473,7 @@ class Backtesting:
|
||||
all_results[self.strategy.get_strategy_name()] = {
|
||||
'results': results,
|
||||
'config': self.strategy.config,
|
||||
'locks': PairLocks.locks,
|
||||
}
|
||||
|
||||
stats = generate_backtest_stats(data, all_results, min_date=min_date, max_date=max_date)
|
||||
|
@ -266,6 +266,7 @@ def generate_backtest_stats(btdata: Dict[str, DataFrame],
|
||||
backtest_days = (max_date - min_date).days
|
||||
strat_stats = {
|
||||
'trades': results.to_dict(orient='records'),
|
||||
'locks': [lock.to_json() for lock in content['locks']],
|
||||
'best_pair': best_pair,
|
||||
'worst_pair': worst_pair,
|
||||
'results_per_pair': pair_results,
|
||||
|
Loading…
Reference in New Issue
Block a user