Fix create_cum_profit to work with trades that don't open on candle

opens
This commit is contained in:
Matthias
2019-10-28 14:24:12 +01:00
parent 17fce00a5e
commit e82460bde6
4 changed files with 17 additions and 11 deletions

View File

@@ -130,7 +130,7 @@ def test_create_cum_profit(testdatadir):
cum_profits = create_cum_profit(df.set_index('date'),
bt_data[bt_data["pair"] == 'POWR/BTC'],
"cum_profits")
"cum_profits", timeframe="5m")
assert "cum_profits" in cum_profits.columns
assert cum_profits.iloc[0]['cum_profits'] == 0
assert cum_profits.iloc[-1]['cum_profits'] == 0.0798005