fix bug on backtest timerange
This commit is contained in:
parent
00ff0c9b91
commit
3020218096
@ -317,10 +317,13 @@ class FreqaiDataKitchen:
|
|||||||
tr_training_list.append(start.strftime("%Y%m%d") + "-" + stop.strftime("%Y%m%d"))
|
tr_training_list.append(start.strftime("%Y%m%d") + "-" + stop.strftime("%Y%m%d"))
|
||||||
|
|
||||||
# associated backtest period
|
# associated backtest period
|
||||||
|
|
||||||
|
timerange_backtest.startts = timerange_train.stopts
|
||||||
|
|
||||||
if timerange_backtest.stopts > config_timerange.stopts:
|
if timerange_backtest.stopts > config_timerange.stopts:
|
||||||
timerange_backtest.stopts = config_timerange.stopts
|
timerange_backtest.stopts = config_timerange.stopts
|
||||||
|
|
||||||
timerange_backtest.startts = timerange_train.stopts
|
else:
|
||||||
timerange_backtest.stopts = timerange_backtest.startts + bt_period
|
timerange_backtest.stopts = timerange_backtest.startts + bt_period
|
||||||
|
|
||||||
start = datetime.datetime.utcfromtimestamp(timerange_backtest.startts)
|
start = datetime.datetime.utcfromtimestamp(timerange_backtest.startts)
|
||||||
|
Loading…
Reference in New Issue
Block a user