Running a backtest on available data
I have daily data between 2013/01/01 and 2021/08/31 for 50 datas, and different datas have different lengths. For e.g. data1 has values from 2013/01/01 to 2021/08/31, data2 also has the same length but data3 has values from 2015/06/01. to 2021/08/31.
When I run a backtest on this dataset the platform does not run any calculations on data1 and data2 before 2015/06/01 because data3's values start from this date. How can I get the platform to run backtest for data1 and data2 since they have values before 2015/06/01? Then eventually when the platform reaches 2015/06/01 it will also start calculating for data3 as well.
run-out last edited by
@run-out Hey thanks for this. I tried ab_traders answer but it didn't seem to work for some reason.
I sorted my list of data frames on the basis of their lengths which would mean the newest data frame would be the last in the list and the oldest data frame with earliest index will be the first. But I got the same result as before.
I went through your answer then and that worked for me. I reindexed all data frames to start from the earliest index.