# FPP_P5_FWD_EST_RESIDUALRATE

> This report delivers the forward estimated residual cost rate based on P5min runs. These high-level estimates (i.e. assuming that all is unused FCAS) will be provided for each constraint for each 5 minute pre-dispatch interval.

## Column Schema

### CONSTRAINTID

> Constraint ID (binding constraint ID from FCAS data used in FPP calculations)

SQL Type: `VARCHAR2(20)`
Polars Type: `pl.Categorical`

This column is mandatory, and a primary key.

Examples:

- `F_I+LREG_0210`
- `F_I+NIL_APD_TL_L5`
- `F_I+RREG_0220`
- `F_MAIN++LREG_0210`
- `F_MAIN++RREG_0220`
- `F_MAIN+LREG_0210`
- `F_MAIN+RREG_0220`
- `F_T+LREG_0050`
- `F_T+RREG_0050`
- `F_TASCAP_LREG_0210`

### INTERVAL_DATETIME

> Date and time of the trading interval (DD/MM/YYYY HH24:MI:SS) fixed to the UTC+10 time zone (NEM time)

SQL Type: `DATE`
Polars Type: `pl.Datetime()`

This column is mandatory, and a primary key.

Example: `2026/09/28 19:30:00`

### RUN_DATETIME

> The run date and time of the 5 minute predispatch case that was the trigger for the constraint FCAS processor execution (as the FCAS requirement data is the basis of these forward estimates)

SQL Type: `DATE`
Polars Type: `pl.Datetime()`

This column is mandatory, and a primary key.

Example: `2026/09/28 19:05:00`

### RUNNO

> The 5 minute predispatch case run number that was the trigger for the constraint FCAS processor execution (as the FCAS requirement data is the basis for these forward estimates)

SQL Type: `NUMBER(5)`
Polars Type: `pl.UInt32`

This column is mandatory, and a primary key.

Example: `1`

### VERSIONNO

> The version number of the effective default contribution factor for the unit / constraint combination taken from the FPP_FORECAST_DEFAULT_CF table

SQL Type: `NUMBER(5)`
Polars Type: `pl.UInt32`

This column is mandatory, and a primary key.

Example: `131`

### BIDTYPE

> Bid type (the bid type saved in relation to constraint ID from FCAS data used in FPP calculations)

The SQL type is `VARCHAR2(10)`.
This is actually a factor/enum, with values:

- `ENERGY`

- `LOWERREG`

- `LOWER60SEC`

- `RAISE5MIN`

- `LOWER5MIN`

- `LOWER6SEC`

- `RAISE60SEC`

- `RAISE6SEC`

- `RAISEREG`

- `RAISE1SEC`

- `LOWER1SEC`

This column is not mandatory.

### EST_UNUSED_FCAS

> Estimated unused recovery FCAS in AUD/MWh (the forward financial estimate of the recovery of unused FCAS, assuming that all is unused FCAS). This value will be either 0 (nil), or a negative value (debit) only. For details on the calculation, please see FPP procedure and supporting documentation. Please note that there may be cases where there is not yet a residual default contribution factor for the constraint (for example if there is a new constraint binding in p5min that has not yet bound in dispatch). In these scenarios there will be no EST_UNUSED_FCAS row sent for the constraint, as this is currently incalculable until a corresponding residual default contribution factor is calculated from a dispatch run with this constraint binding.

SQL Type: `NUMBER(18,8)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`-0.00003125`, `-0.70108675`

### LASTCHANGED

> Last date and time record changed

For more information, see the [dedicated documentation page](../../guide/querying.md#deduplication).

SQL Type: `DATE`
Polars Type: `pl.Datetime()`

This column is not mandatory.

Example: `2026/09/28 19:00:40`

### RELEVANT_REGIONS

> Relevant regions (a comma separated list of the relevant regions for the constraint from FCAS data)

SQL Type: `VARCHAR2(200)`
Polars Type: `str`

This column is not mandatory.

Examples:

- `NSW1,QLD1,SA1,TAS1,VIC1`
- `NSW1,QLD1,SA1,VIC1`
- `TAS1`

## New Data Timing

> At the completion of a P5MIN estimation calculation run (i.e. every 5 mins)

## Code Examples

### Polars

Explicitly listing every column, casting to enums, categoricals etc is not essential, but may speed up parsing.
Swapping `int` for `pl.UInt16`, `pl.Int32` would also speed up parsing. However some of the datatypes are inferred, so they may be wrong.

This code deduplicates for you.
Deduplication is normally only required across multiple months.

This code assumes that all columns are present, which may not be true for older files.

```python
import polars as pl
import polars.selectors as cs

# e.g. "2029/03/15 00:05:00"
dt_s_fmt = "%Y/%m/%d %H:%M:%S"

csv_paths = ["SOMEFILE.CSV", "OTHERFILE.CSV"]

lf = (
    pl.concat(
        [
            pl.scan_csv(
                csv_path,  # must be unzipped beforehand
                skip_rows=1,  # skip the header
                infer_schema=False,  # much faster
            )
            .filter(cs.by_index(0) == "D")  # drop the footer
            .select(~cs.by_index(range(4)))  # drop metadata columns
            for csv_path in csv_paths
        ],
        how="diagonal_relaxed",
    )
    .with_columns(
        pl.col("INTERVAL_DATETIME", "RUN_DATETIME", "LASTCHANGED").str.strptime(
            pl.Datetime, dt_s_fmt
        ),
    )
    .cast(
        {
            "CONSTRAINTID": pl.Categorical,
            "RUNNO": int,  # or pl.UInt32
            "VERSIONNO": int,  # or pl.UInt32
            "BIDTYPE": pl.Enum(
                [
                    "ENERGY",
                    "LOWERREG",
                    "LOWER60SEC",
                    "RAISE5MIN",
                    "LOWER5MIN",
                    "LOWER6SEC",
                    "RAISE60SEC",
                    "RAISE6SEC",
                    "RAISEREG",
                    "RAISE1SEC",
                    "LOWER1SEC",
                ]
            ),
            "EST_UNUSED_FCAS": pl.Float64,
            "RELEVANT_REGIONS": str,
        }
    )
    # Deduplicate
    # We want one row per ['CONSTRAINTID', 'INTERVAL_DATETIME', 'RUN_DATETIME', 'RUNNO', 'VERSIONNO']
    # Tie-breaker: greatest value of LASTCHANGED
    .sort(LASTCHANGED, descending=False)
    .unique(
        subset=[
            "CONSTRAINTID",
            "INTERVAL_DATETIME",
            "RUN_DATETIME",
            "RUNNO",
            "VERSIONNO",
        ],
        keep="last",
    )
)

```

### Nemosis

This table is not yet available in [Nemosis](https://github.com/UNSW-CEEM/NEMOSIS/#static_table).

## Example File

From [PUBLIC_ARCHIVE_FPP_P5_FWD_EST_RESIDUALRATE_FILE01_202609010000.zip](https://www.nemweb.com.au/Data_Archive/Wholesale_Electricity/MMSDM/2026/MMSDM_2026_09/MMSDM_Historical_Data_SQLLoader/DATA/PUBLIC_ARCHIVE%23FPP_P5_FWD_EST_RESIDUALRATE%23FILE01%23202609010000.zip)

=== "Raw Text with Metadata"
    ```csv
    C,SETP.WORLD,DVD_FPP_P5_FWD_EST_RESIDUALRATE,AEMO,PUBLIC,2026/10/09,17:50:12,001791532212568,MONTHLY_ARCHIVE,001791532212568
    I,FPP,P5_FWD_EST_RESIDUALRATE,1,RUN_DATETIME,RUNNO,INTERVAL_DATETIME,CONSTRAINTID,VERSIONNO,BIDTYPE,RELEVANT_REGIONS,EST_UNUSED_FCAS,LASTCHANGED
    D,FPP,P5_FWD_EST_RESIDUALRATE,1,"2026/09/30 15:25:00",1,"2026/09/30 16:15:00",F_TASCAP_RREG_0220,131,RAISEREG,"NSW1,QLD1,SA1,VIC1",-0.01916605,"2026/09/30 15:20:50"
    D,FPP,P5_FWD_EST_RESIDUALRATE,1,"2026/09/30 15:25:00",1,"2026/09/30 16:20:00",F_I+LREG_0210,131,LOWERREG,"NSW1,QLD1,SA1,TAS1,VIC1",-0.00693529,"2026/09/30 15:20:50"
    D,FPP,P5_FWD_EST_RESIDUALRATE,1,"2026/09/30 15:25:00",1,"2026/09/30 16:20:00",F_T+RREG_0050,131,RAISEREG,TAS1,-0.03199469,"2026/09/30 15:20:50"
    D,FPP,P5_FWD_EST_RESIDUALRATE,1,"2026/09/30 15:25:00",1,"2026/09/30 16:20:00",F_TASCAP_LREG_0210,131,LOWERREG,"NSW1,QLD1,SA1,VIC1",-0.0009937,"2026/09/30 15:20:50"
    D,FPP,P5_FWD_EST_RESIDUALRATE,1,"2026/09/30 15:25:00",1,"2026/09/30 16:20:00",F_TASCAP_RREG_0220,131,RAISEREG,"NSW1,QLD1,SA1,VIC1",-0.01892661,"2026/09/30 15:20:50"
    D,FPP,P5_FWD_EST_RESIDUALRATE,1,"2026/09/30 15:30:00",1,"2026/09/30 15:30:00",F_T+LREG_0050,131,LOWERREG,TAS1,-0.03095561,"2026/09/30 15:26:05"
    D,FPP,P5_FWD_EST_RESIDUALRATE,1,"2026/09/30 15:30:00",1,"2026/09/30 15:30:00",F_T+RREG_0050,131,RAISEREG,TAS1,-0.03247322,"2026/09/30 15:26:05"
    D,FPP,P5_FWD_EST_RESIDUALRATE,1,"2026/09/30 15:30:00",1,"2026/09/30 15:30:00",F_TASCAP_LREG_0210,131,LOWERREG,"NSW1,QLD1,SA1,VIC1",-0.00711288,"2026/09/30 15:26:05"
    D,FPP,P5_FWD_EST_RESIDUALRATE,1,"2026/09/30 15:30:00",1,"2026/09/30 15:30:00",F_TASCAP_RREG_0220,131,RAISEREG,"NSW1,QLD1,SA1,VIC1",-0.01375404,"2026/09/30 15:26:05"
    D,FPP,P5_FWD_EST_RESIDUALRATE,1,"2026/09/30 15:30:00",1,"2026/09/30 15:35:00",F_I+LREG_0210,131,LOWERREG,"NSW1,QLD1,SA1,TAS1,VIC1",-0.00888076,"2026/09/30 15:26:05"
    D,FPP,P5_FWD_EST_RESIDUALRATE,1,"2026/09/30 15:30:00",1,"2026/09/30 15:35:00",F_T+LREG_0050,131,LOWERREG,TAS1,-0.48591717,"2026/09/30 15:26:05"
    ...
    C,"END OF REPORT",1003
    ```

## Availability

Visibility: Public

This table is in the public monthly [MMSDM archive](https://www.nemweb.com.au/Data_Archive/Wholesale_Electricity/MMSDM/).

I have collated the list of all those files into one place, in [this CSV metadata file](../../manifests/per_table/csv/FPP_P5_FWD_EST_RESIDUALRATE.csv). (Columns `year`, `month`, `url`, `compressed_size` in bytes).

The earliest available data is month 1 of 2025.
The most recent available data is month 9 of 2026.

 Every month in between has a file. (No gaps.)

## Data Size

Each year of data is approximately
44 MB when zipped,
440 MB as unzipped CSV.

## Deduplication and PDR Loader Configuration

The primary keys are:

- [`CONSTRAINTID`](#constraintid)

- [`INTERVAL_DATETIME`](#interval_datetime)

- [`RUN_DATETIME`](#run_datetime)

- [`RUNNO`](#runno)

- [`VERSIONNO`](#versionno)

The transaction type is ["insert"](https://di-help.docs.public.aemo.com.au/Content/pdrLoader/How_it_works.htm?TocPath=pdrLoader%7CAbout+pdrLoader%7C_____5#INSERT), which means that you will usually not see duplicate data.
If you do, you can deduplicate based on the primary keys, without sorting first.
Rows from different files with the same primary keys should have the same values.

[PDR Loader configuration](https://nemweb.com.au/Reports/Current/MMSDataModelReport/PDRCONFIG/PROD_PUBLIC_PDR_CONFIG_FULL.zip) is:

| Report Name | Report Subtype | Version |
|---------------|-------------------|-----------|
| FPP | P5_FWD_EST_RESIDUALRATE  | 1 |

This means that the CSV files start with metadata columns:

```csv
I,FPP,P5_FWD_EST_RESIDUALRATE,1,...
D,FPP,P5_FWD_EST_RESIDUALRATE,1,...
```

## Links

[This page as JSON](../json/tables/FPP_P5_FWD_EST_RESIDUALRATE/bespoke.json) (schema documented [here](https://gitlab.com/MatthewDavis/mms-schema/-/blob/master/schema.py?ref_type=heads), but may change)

Download a [JSON Schema](../json/tables/FPP_P5_FWD_EST_RESIDUALRATE/json-schema.json) specification for this table.

[Official AEMO schema documentation](https://nemweb.com.au/Reports/Current/MMSDataModelReport/Electricity/ElectricityDataModelReport_files/Elec79.htm#67)

## Other Information

Package: [FPP](../packages/FPP.md)
