> ## Documentation Index
> Fetch the complete documentation index at: https://systematica.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Crossover

> systematica.api.signals.crossover

## `Crossover1d`

```python theme={null}
Crossover1d()
```

Generate trading signals based on 1d crossover conditions.

Method generated by attrs for class Crossover1d.

### Ancestors

* `systematica.api.base.BaseSignal`
* `abc.ABC`

### Static methods

#### `run`

```python theme={null}
run(
    model_output: numpy.ndarray,
    long_entries: float,
    long_exits: float,
    short_entries: float,
    short_exits: float,
) ‑> systematica.signals.base.Signals
```

Run the 1d crossover signal generation.

**Parameters**:

| Name            | Type       | Default | Description                                       |
| --------------- | ---------- | ------- | ------------------------------------------------- |
| `model_output`  | `tp.Array` | `--`    | The model output containing the crossover values. |
| `long_entries`  | `float`    | `--`    | The threshold for long entry signals.             |
| `long_exits`    | `float`    | `--`    | The threshold for long exit signals.              |
| `short_entries` | `float`    | `--`    | The threshold for short entry signals.            |
| `short_exits`   | `float`    | `--`    | The threshold for short exit signals.             |

**Returns**:

| Type      | Description                                                       |
| --------- | ----------------------------------------------------------------- |
| `Signals` | The generated trading signals based on the 1d crossover strategy. |

## `Crossover`

```python theme={null}
Crossover()
```

Generate trading signals based on 2d crossover conditions.

Method generated by attrs for class Crossover.

### Ancestors

* `systematica.api.base.BaseSignal`
* `abc.ABC`

### Static methods

#### `run`

```python theme={null}
run(
    model_output: numpy.ndarray,
    long_entries: float,
    long_exits: float,
    short_entries: float,
    short_exits: float,
) ‑> systematica.signals.base.Signals
```

Run the 2d crossover signal generation.

**Parameters**:

| Name            | Type       | Default | Description                                       |
| --------------- | ---------- | ------- | ------------------------------------------------- |
| `model_output`  | `tp.Array` | `--`    | The model output containing the crossover values. |
| `long_entries`  | `float`    | `--`    | The threshold for long entry signals.             |
| `long_exits`    | `float`    | `--`    | The threshold for long exit signals.              |
| `short_entries` | `float`    | `--`    | The threshold for short entry signals.            |
| `short_exits`   | `float`    | `--`    | The threshold for short exit signals.             |

**Returns**:

| Type      | Description                                                       |
| --------- | ----------------------------------------------------------------- |
| `Signals` | The generated trading signals based on the 2d crossover strategy. |
