AbstractMonitor#

class qf_lib.backtesting.monitoring.abstract_monitor.AbstractMonitor[source]#

Bases: object

AbstractMonitor is a class providing an interface for all inherited Monitor classes (live, historic, custom, etc). Monitor should be subclassed according to the use.

abstractmethod end_of_day_update(timestamp: datetime)[source]#

Update the statistics after a whole day of trading. Should be used in live trading only

abstractmethod end_of_trading_update(timestamp: datetime = None)[source]#

Final update at the end of backtest session

abstractmethod real_time_update(timestamp: datetime)[source]#

Update a basic statistics. This method should be light as it might be called after every transaction or price update

abstractmethod record_transaction(transaction: Transaction)[source]#

This method is called every time ExecutionHandler creates a new Transaction