Fix create_cum_profit to work with trades that don't open on candle
opens
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user