> ## 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.

# Base

> systematica.portfolio.composers.base

## `BaseComposer`

```python theme={null}
BaseComposer(
    model_name: str,
    signal_params=_Nothing.NOTHING,
    portfolio_params: Dict[str, Any] = _Nothing.NOTHING,
    model_params: Dict[str, Any] = _Nothing.NOTHING,
)
```

Compose portfolio(s).

This abstract base class provides a framework for creating portfolio composers
that can run models with varying parameters.

Method generated by attrs for class BaseComposer.

### Descendants

* `systematica.portfolio.composers.models.ColumnStackComposer`
* `systematica.portfolio.composers.models.Composer`
* `systematica.portfolio.composers.models.SignalComposer`

### Class variables

* `model_name: str`: Name of the model to use. Should match to a model in systematica.api.models.

* `portfolio_params: Dict[str, Any]`: Additional keyword arguments for portfolio simulation.

* `model_params: Dict[str, Any]`: A dictionary of optional keyword arguments needed to compute the model.

### Methods

#### `run`

```python theme={null}
run(
    self,
    data: vectorbtpro.data.base.Data,
    s1: str,
    s2: str,
    portfolio_kwargs: Dict[str, Any],
    **kwargs,
) ‑> systematica.portfolio.analyzers.base.PortfolioAnalyzer
```

Run the portfolio composer with the specified data.

**Parameters**:

| Name               | Type        | Default | Description                                       |
| ------------------ | ----------- | ------- | ------------------------------------------------- |
| `data`             | `vbt.Data`  | `--`    | Vector BT data object containing the input data.  |
| `s1`               | `str`       | `--`    | First symbol or identifier for the data.          |
| `s2`               | `str`       | `--`    | Second symbol or identifier for the data.         |
| `portfolio_kwargs` | `tp.Kwargs` | `--`    | Keyword arguments for portfolio configuration.    |
| `kwargs`           | `tp.Kwargs` | `--`    | Additional keyword arguments passed to the model. |

**Returns**:

| Type                | Description                                                            |
| ------------------- | ---------------------------------------------------------------------- |
| `PortfolioAnalyzer` | Portfolio analyzer instance containing the results of the composition. |
