I am noticing in my backtest that options that are expired remain in Portfolio and are 'Invested'. I assumed that they would automatically be removed or at least show a 0 quantity as expirations and assignments seem to occur automatically. Is it something that I am missing or an error in the engine or is it expected to ignore expired securities and I must liquidate myself?

Author