clean_signals_1d_nb
| Name | Type | Default | Description |
|---|---|---|---|
long_entries | tp.Array1d | -- | Boolean array indicating long entry signals. |
long_exits | tp.Array1d | -- | Boolean array indicating long exit signals. |
short_entries | tp.Array1d | -- | Boolean array indicating short entry signals. |
short_exits | tp.Array1d | -- | Boolean array indicating short exit signals. |
| Type | Description |
|---|---|
tuple of tp.Array1d | Tuple containing cleaned boolean arrays for long entries, long exits, short entries, and short exits. |
clean_signals_nb
| Name | Type | Default | Description |
|---|---|---|---|
long_entries | tp.Array2d | -- | Boolean array indicating long entry signals (time, assets). |
long_exits | tp.Array2d | -- | Boolean array indicating long exit signals (time, assets). |
short_entries | tp.Array2d | -- | Boolean array indicating short entry signals (time, assets). |
short_exits | tp.Array2d | -- | Boolean array indicating short exit signals (time, assets). |
| Type | Description |
|---|---|
tuple of tp.Array2d | Tuple containing cleaned boolean arrays for long entries, long exits, short entries, and short exits, all in the same shape as input. |
fshift_1d_nb
n positions.
Numba equivalent to pd.Series(arr).shift(n).
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
long_entries | tp.Array1d | -- | Boolean array indicating long entry signals. |
long_exits | tp.Array1d | -- | Boolean array indicating long exit signals. |
short_entries | tp.Array1d | -- | Boolean array indicating short entry signals. |
short_exits | tp.Array1d | -- | Boolean array indicating short exit signals. |
n | int | 1 | Number of steps. Defaults to 1. |
| Type | Description |
|---|---|
Signals | shifted signals. |
fshift_nb
n positions.
Numba equivalent to pd.Series(arr).shift(n).
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
long_entries | tp.Array1d | -- | Boolean array indicating long entry signals. |
long_exits | tp.Array1d | -- | Boolean array indicating long exit signals. |
short_entries | tp.Array1d | -- | Boolean array indicating short entry signals. |
short_exits | tp.Array1d | -- | Boolean array indicating short exit signals. |
n | int | 1 | Number of steps. Defaults to 1. |
| Type | Description |
|---|---|
Signals | shifted signals. |
prepare_signals_nb
model_output
array and converts them to floating-point type for further processing.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
signal_func | tp.Callable | -- | Function that processes signals using predefined thresholds. |
| Type | Description |
|---|---|
tp.Callable | A Numba JIT-compiled function that applies the given signal function with correctly shaped and typed input arrays. |

