While running a backtest Zipline refuses to exit a delisted position when I run the exit command per the below:
algo.order_target_percent(sid, 0)
the sid in question is Equity(FIBBG000C0F570 [XLNX]) which was acquired and subsequently delisted. This happened while the backtest included XLNX as part of the portfolio and now it will not exit the position and remains as a stale position.
Is there a command to manually remove this from the portfolio.positions class ?
Thanks for any help.