Closed YASHGUPTA2611 closed 2 years ago
I have read the two dataframe using get_crpto_data. Now i want to backtest both dataframe at once. So, how will i do it??
and it is giving me this error
Hi! I don't think your all_dataframe is a list of dataframes. It looks to be a list of string. If you see your screenshot it says ['dataframe_BTCUSDT', 'dataframe_ETHUSDT']
which suggests its a string.
Hi @mikeejazmines That i know, but in the above fig. it is also saying that if it is a string it will treat as a path. and i have saved the dataframe as csv file. But it is still showing me error
Or do you have any alternative?, means how do i convert my string of dataframe that will pass on the backtest function.
you can store the dataframes in an array and loop through that array and pass each element into the backtest function
But as far as i know, backtrader only read OHLC form of data. And also i have tried to combine many dataframes in one array, but it is showing me some error. So, it will be very helpful if you please provide the code for the same.
Yes, that is why i said store the dataframes in an array and loop through that array and pass each element into the backtest function
dataframes = []
for tick in tickers:
dataframes.append(get_crypto(tick, .....))
results = []
for df in dataframes:
result = backtest(df, ...)
results.append(result)
This is also not a backtrader or fastquant specific question. Please do limit the issues to fastquant related issues.
Okay understood, Thank you for the reply.
Please give more details on the issue/ask