API reference#

The public surface: the tidyfinance-backed sources loaders, and the self-built FRED-MD builder.

Sources#

load_ff_factors

Fama-French 3-factor tidy frame (date, mkt_excess, smb, hml, risk_free), in decimals.

load_goyal_welch

Goyal-Welch equity-premium frame: date, rp_div (excess market) + macro predictors.

load_gw_view

Goyal-Welch view (excess rp_div + predictors) + data_vintage, ready for VoC/1-A.

to_timeseries_view

A tidy (date, ret, features…) frame → single-asset numeraire TimeSeriesView.

data_vintage

Provenance stamp for a live tidyfinance pull (tidyfinance:<dataset>@<version>).

Builders — FRED-MD#

download

Download recent FRED-MD single vintages (YYYY-MM) into dest; return local paths.

download_archive

Download a full-history zip (which in HIST_ARCHIVES, or a URL) into dest.

read_vintage

Read one FRED-MD vintage file → (levels, tcodes).

apply_tcode

Apply a FRED-MD stationarity transform (codes 1-7) to a level series (NaN-padded at start).

build_table

Stack FRED-MD vintage files into a wide point-in-time table [ref_date, vintage, series].

build_from_dir

Build from every vintage CSV under directory (recurses; non-vintage files skipped).