SignalsRegister#
- class qf_lib.backtesting.signals.signals_register.SignalsRegister[source]#
Bases:
objectUsed to save signals processed by the Position Sizer and to be able to later to analyze all signals generated by the model and to present them in a readable form.
- abstractmethod get_signals() QFDataFrame[source]#
Returns a QFDataFrame with all generated signals. The columns names consist of ticker names (in the following form: NameOfTicker@Model) and the rows are indexed by the time of signals generation (Signal objects do not store the timestamp).
- Returns:
QFDataFrame with all generated signals
- Return type:
- abstractmethod get_signals_for_ticker(ticker: Ticker | None, alpha_model=None) QFSeries[source]#
Returns a QFSeries with all generated signals for the given ticker. In case of a future ticker, it returns signals that were generated for any specific ticker, that belongs to the futures chain.
- Parameters:
ticker (Ticker) – ticker for which the data frame should be generated
alpha_model – alpha model for which the generated signals should be returned (it checks whether the name of the alpha model matches the one in the signals using the str function)
- Returns:
QFDataFrame with all generated signals
- Return type: