Skip to main content

clean_signals_1d_nb

Cleans 1d entry and exit signals by ensuring that positions are entered and exited in a logical manner. The function prevents overlapping or redundant signals, ensuring that a position is opened only when there is no existing position and closed only when an open position exists. Parameters: Returns:

clean_signals_nb

Cleans 2d entry and exit signals by ensuring that positions are entered and exited in a logical manner for each column (asset/time series). The function prevents overlapping or redundant signals for each column, ensuring that a position is opened only when there is no existing position and closed only when an open position exists. Parameters: Returns:

fshift_1d_nb

Shift forward 1d signal arrays by n positions. Numba equivalent to pd.Series(arr).shift(n). Parameters: Returns:

fshift_nb

Shift forward 2d signal arrays by n positions. Numba equivalent to pd.Series(arr).shift(n). Parameters: Returns:

prepare_signals_nb

Wraps a signal function to automatically create threshold arrays for predictions. The wrapper ensures that input arrays match the shape of the model_output array and converts them to floating-point type for further processing. Parameters: Returns: