I am trying to backtest a momentum strategy in Backtrader with 10 year historical data. There are instances where the stock is bought during a rebalance and then it gets delisted before the next rebalance happens. How to handle such cases where the price data are missing after the stock is bought.
I tried to record the daily portfolio data along with closing price on a separate dataframe as a stopgap approach and used it to analyse the performance. But I wanted to know any built-in provisions or best practice.
Nitesh Patel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.