def on_strategy_end =================================== .. meta:: :description: Execute cleanup, final reporting, or artifact export logic when a LumiBot strategy finishes running via on_strategy_end. This lifecycle method runs once when a strategy finishes executing (at the end of a backtest or clean live shutdown). Use it to flush custom logs, summarize metrics, or release external resources. .. code-block:: python class MyStrategy(Strategy): def on_strategy_end(self): self.log_message("Strategy finished cleanly.") Reference ---------- .. autofunction:: lumibot.strategies.strategy.Strategy.on_strategy_end