Looping Backtest for several assets; for some results in 0 trades #968
Unanswered
mauriciolopol
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been backtesting a strategy for a lot of assets with the same parameters.
For this reason I created a loop "for". In each iterarion of the loop, I run the backtest with an asset whoose OHLC data were taken from a Excel file. The issue is that for some assets, the backtest is resulting in 0 trades done.
When I run the same strategy, with the same parameters from Python iteractive prmpt, the result makes sense with a number of trades compatible with the date from where I started the backtest!
I don't know what happening! Basically, I make a loop for and in each iteration I run the backtest with a specific asset with the same parameters for all assets. In my case, I have OHLC data from 121 asset, so the backtest is done 121 times in a row.
Please, anyine may help me to solve this issue! The code is below:
Beta Was this translation helpful? Give feedback.
All reactions