fix bug on backtest timerange
This commit is contained in:
parent
00ff0c9b91
commit
3020218096
@ -317,11 +317,14 @@ 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)
|
||||||
stop = datetime.datetime.utcfromtimestamp(timerange_backtest.stopts)
|
stop = datetime.datetime.utcfromtimestamp(timerange_backtest.stopts)
|
||||||
|
Loading…
Reference in New Issue
Block a user