> For the complete documentation index, see [llms.txt](https://docs.rootcause.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rootcause.ai/more-details/applications/application-modules/backtestscores.md).

# Backtest Scores

> Pool matched forecast rows across origins into per-variable and per-lead-time accuracy.

Cuts an already-scored comparison every way an accuracy review asks for.

It computes no forecast and fetches no actuals — it takes the `comparison` frame a backtest or a scoring emitted and re-aggregates it, which is why the same port id appears on both sides: the frame passes through unchanged beside the cuts.

## At a glance

|                          |                        |
| ------------------------ | ---------------------- |
| Module type              | `BacktestScores`       |
| Category                 | Intelligence           |
| Default tier             | `durable`              |
| Runs on                  | `reactive`, `durable`  |
| Starts a flow            | no                     |
| Holds a body             | no                     |
| Keeps state between runs | no                     |
| Available in             | every application type |

## Parameters

### `metrics`

`string[]` · optional · defaults to `["mape","wmape","mae","mse","rmse","bias","coverage"]`

Which accuracy metrics to compute: mape, wmape, mae, mse, rmse, bias, coverage.

### `primaryMetric`

`string` · optional · defaults to `"wmape"`

The one a KPI tile and the trend read; must be in `metrics`.

## Inputs

| Port         | Kind        | Required | Description                                                                                                                           |
| ------------ | ----------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `on`         | `event`     | no       | Implicit on every module that does not itself start a flow: wire an event here to make this module the start of what that event runs. |
| `comparison` | `dataframe` | yes      | Forecast rows beside their actuals, from ForecastBacktest or ScoreForecast.                                                           |

## Outputs

| Port                | Kind        | Connects to           | Description                                                                          |
| ------------------- | ----------- | --------------------- | ------------------------------------------------------------------------------------ |
| `comparison`        | `dataframe` | `dataframe`, `signal` | The input frame, passed through so the cuts and their source stay wireable together. |
| `byVariable`        | `dataframe` | `dataframe`, `signal` | Accuracy per forecast variable.                                                      |
| `byHorizonVariable` | `dataframe` | `dataframe`, `signal` | Accuracy per variable and lead time.                                                 |
| `byHorizon`         | `dataframe` | `dataframe`, `signal` | Accuracy per lead time.                                                              |
| `byOrigin`          | `dataframe` | `dataframe`, `signal` | Accuracy per forecast origin — which vintage of forecast was any good.               |
| `byEnvironment`     | `dataframe` | `dataframe`, `signal` | Accuracy per environment, for a panel twin.                                          |

***

[← All application modules](/more-details/applications/application-modules.md)
