﻿# FRED-MD CSV files: the Transform row is metadata, not an observation

Parse the FRED-MD transformation row separately, preserve a dated vintage and keep raw levels distinct from transformed model inputs and forecasts.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-fred-md-transform-row-vintage-schema-not-observation/
Language: en

## Separate the schema from the monthly matrix

A CSV reader can place the FRED-MD transformation codes into the same numeric array as economic observations. That creates an artificial first record and can shift the date index or corrupt fitted statistics. Parse the metadata layer before preparing model windows. A successful numeric conversion is not enough: the first-field label and the relationship between a code and its variable must survive the data import.

## Inspect the released file rather than assuming a header

The [dated monthly CSV](https://www.stlouisfed.org/-/media/project/frbstl/stlouisfed/research/fred-md/monthly/2026-10-md.csv) includes a labelled Transform row after the column names. Keep those codes mapped to the same column identifiers as the observations that follow. Do not independently sort the metadata and values. A schema-preserving loader can export the codes as a sidecar table, leaving only dated economic observations in the learning tensor and making the preparation choice inspectable.

## Distinguish levels from transformed targets

The [FRED-MD paper](https://s3.amazonaws.com/real.stlouisfed.org/wp/2015/2015-012.pdf) explains the database and transformation conventions. Applying a log or difference changes what a model predicts. Record the exact transformation, initial history needed for inversion and whether the reported loss concerns transformed values or restored levels. A code does not itself establish that every numerical value satisfies the transformation domain; invalid inputs and missing values still require an explicit handling rule.

## Pin the data vintage independently from the code

The [official database page](https://www.stlouisfed.org/research/economists/mccracken/fred-databases) supplies dated releases and revision context. Preserve a named vintage with the downloaded bytes rather than depending on a moving current-data link. Historical observations can be revised even if the date range stays unchanged. Fitting the same model code to a newer vintage therefore does not guarantee reconstruction of the earlier numerical experiment or the information actually available at its forecast origin.

## Validate a round trip before evaluating forecasts

Choose a variable and trace its metadata code, retained raw history, transformed training values and restored prediction scale. Confirm that the metadata row never enters a model window. [Software provenance](/journal/software-stack-reproducibility/) and [temporal information availability](/journal/data-guide-temporal-split-availability/) provide adjacent controls. Publish the vintage and transformation state together. These checks identify the target and dataset used; they do not establish macroeconomic causal effects, profitable decisions or measured forecasting improvements without a separately specified evaluation.
