BacktestMonitor

class qf_lib.backtesting.monitoring.backtest_monitor.BacktestMonitor(backtest_result: BacktestResult, settings: Settings, pdf_exporter: PDFExporter, excel_exporter: ExcelExporter, monitor_settings=None, benchmark_tms: Optional[QFSeries] = None)[source]

Bases: AbstractMonitor

This Monitor will be used to monitor backtest run from the script. It will display the portfolio value as the backtest progresses and generate a PDF at the end. It is not suitable for the Web application

Methods:

end_of_day_update([_])

Update real time line chart with current backtest progress every fixed number of days

end_of_trading_update([_])

Saves the results of the backtest

real_time_update([_])

This method will not be used by the historical backtest

record_transaction(transaction)

Save the transaction in backtest result (and in the file if set to do so)

end_of_day_update(_: Optional[datetime] = None)[source]

Update real time line chart with current backtest progress every fixed number of days

end_of_trading_update(_: Optional[datetime] = None)[source]

Saves the results of the backtest

real_time_update(_: Optional[datetime] = None)[source]

This method will not be used by the historical backtest

record_transaction(transaction: Transaction)[source]

Save the transaction in backtest result (and in the file if set to do so)