plot and compare multi strat profit

This commit is contained in:
NewLaptopMSI_Manu 2018-05-13 22:13:17 +02:00
parent d046b7dd36
commit 94f49ad0b9
2 changed files with 4962 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -196,6 +196,7 @@ class Backtesting(object):
if ret:
row2, trade_entry, next_date = ret
lock_pair_until = next_date
trade_entry = trade_entry + ( next_date,)
trades.append(trade_entry)
if record:
# Note, need to be json.dump friendly
@ -210,7 +211,7 @@ class Backtesting(object):
if record and record.find('trades') >= 0:
logger.info('Dumping backtest results')
file_dump_json('backtest-result.json', records)
labels = ['currency', 'profit_percent', 'profit_BTC', 'duration']
labels = ['currency', 'profit_percent', 'profit_BTC', 'duration', 'sell_date']
return DataFrame.from_records(trades, columns=labels)
def start(self) -> None: