shubhranshu commited on
Commit
3b384e4
·
verified ·
1 Parent(s): 294e473

Refresh model card (drop TempoPFN-Tiny naming; expand details)

Browse files
Files changed (1) hide show
  1. README.md +38 -23
README.md CHANGED
@@ -13,22 +13,25 @@ pipeline_tag: time-series-forecasting
13
  # MacroCast
14
 
15
  **MacroCast** is a compact (~1.2M-parameter) time-series foundation model for
16
- macroeconomic forecasting. It is produced in two stages:
 
 
17
 
18
- 1. **Forge** a TempoPFN-Tiny (GatedDeltaProduct linear-RNN) backbone pre-trained
19
- **entirely on synthetic data** (no real macro data).
20
- 2. **MacroCast** — Forge **fine-tuned** on FRED-MD via an expanding-window,
21
- real-time-vintage procedure, using a mixture of macro-calibrated synthetic
22
- panels (block-bootstrap, AR, Dynamic Factor Model, and Minnesota BVAR).
23
 
24
- It is **non-MoE** (a single full-fine-tuned backbone) and forecasts multivariate
25
- panels in a single forward pass (no windowing).
 
 
 
26
 
27
- ## Vintages
28
- This repo ships **one checkpoint per fine-tuning vintage** (`models/`). Each is
29
- MacroCast fine-tuned on the FRED-MD data available *through that cutoff*, so you
30
- can choose how much history the model has seen. Available vintages and their
31
- variable counts are listed in `manifest.json`.
 
 
32
 
33
  ## Usage
34
 
@@ -37,22 +40,34 @@ from huggingface_hub import snapshot_download
37
  import sys
38
 
39
  local = snapshot_download(repo_id="shubhranshu/MacroCast")
40
- sys.path.insert(0, local) # for forecast.py + tempopfn/
41
  from forecast import MacroCastForecaster
42
 
43
- # Pick MacroCast + a vintage year (default = latest available):
 
44
  f = MacroCastForecaster.from_pretrained(local, year=2023)
45
 
46
- point, quantiles = f.predict(history, horizon=12, freq="M") # history: [T, N]
47
- print(MacroCastForecaster.available_years(local)) # list all vintages
48
  ```
49
 
50
- - `point`: `[horizon, N]` median forecast.
51
  - `quantiles`: `[horizon, N, 9]` forecasts for quantiles 0.1 … 0.9.
52
 
53
- ## Details
54
- - Architecture: GatedDeltaProduct linear-RNN, `embed=128`, 3 layers, 9-quantile pinball loss.
55
- - Fine-tuned on monthly, FRED-MD-transformed (stationary) series.
56
- - Each checkpoint stores the exact variable list it was trained on.
57
 
58
- Built on [TempoPFN](https://huggingface.co/AutoML-org/TempoPFN) (Apache-2.0).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  # MacroCast
14
 
15
  **MacroCast** is a compact (~1.2M-parameter) time-series foundation model for
16
+ **macroeconomic forecasting**. It forecasts a full panel of monthly
17
+ indicators in a **single forward pass** (no autoregressive windowing) and returns
18
+ **probabilistic** (9-quantile) forecasts.
19
 
20
+ It is trained in two stages:
 
 
 
 
21
 
22
+ 1. Base model: A ~1.2M-parameter linear-RNN backbone (architecture inspired by
23
+ TempoPFN), trained from scratch **entirely on synthetic data** (no real macro data).
24
+ 2. **MacroCast** — Base model **fine-tuned** on FRED-MD via an expanding-window,
25
+ real-time-vintage procedure, using a mixture of macro-calibrated synthetic
26
+ panels (block-bootstrap, per-variable AR, Dynamic Factor Model, and BVAR).
27
 
28
+ ## Vintages (real-time fine-tuning)
29
+ This repo ships **one checkpoint per fine-tuning vintage** (in `models/`). Each
30
+ checkpoint is MacroCast fine-tuned on only the FRED-MD data available *through that
31
+ cutoff* e.g. the 2010 vintage has never seen post-2010 data so you can choose how
32
+ much history the model has seen and run **leak-free real-time / backtesting**
33
+ experiments. The available vintages, their data cutoffs, and per-vintage variable
34
+ counts are listed in `manifest.json` (`default_year` is used when no year is given).
35
 
36
  ## Usage
37
 
 
40
  import sys
41
 
42
  local = snapshot_download(repo_id="shubhranshu/MacroCast")
43
+ sys.path.insert(0, local) # for forecast.py
44
  from forecast import MacroCastForecaster
45
 
46
+ # List vintages, then load MacroCast for one (year=None -> latest):
47
+ print(MacroCastForecaster.available_years(local)) # e.g. [1998, ..., 2023]
48
  f = MacroCastForecaster.from_pretrained(local, year=2023)
49
 
50
+ # history: np.ndarray of shape [T, N] (T monthly steps, N FRED-MD variables)
51
+ point, quantiles = f.predict(history, horizon=12, freq="M")
52
  ```
53
 
54
+ - `point`: `[horizon, N]` median (0.5-quantile) forecast.
55
  - `quantiles`: `[horizon, N, 9]` forecasts for quantiles 0.1 … 0.9.
56
 
 
 
 
 
57
 
58
+ ## Model details
59
+ - **Architecture**: GatedDeltaProduct linear-RNN, `embed=128`, 3 layers, ~1.2M params.
60
+ - **Objective**: 9-quantile (0.1…0.9) pinball loss.
61
+ - **Pre-training**: synthetic priors only (GP, kernel, Ornstein–Uhlenbeck,
62
+ ForecastPFN, CauKer, sine/sawtooth/step, …) — no real macro data.
63
+ - **MacroCast fine-tuning**: FRED-MD real-time vintages expanded into a synthetic
64
+ mixture — `real` + `block-bootstraps`, `arima` (per-variable AR), `dfm`
65
+ (Dynamic Factor Model), and `bvar_clust` / `bvar_full` (Minnesota BVAR).
66
+
67
+ ## Intended use and limitations
68
+ - Built for **monthly macroeconomic** panels. Feed transformed/stationary inputs.
69
+ - Forecasts are statistical outputs, **not financial or policy advice**.
70
+
71
+ ## Acknowledgements
72
+ Architecture inspired by [TempoPFN](https://huggingface.co/AutoML-org/TempoPFN)
73
+ (Apache-2.0); the vendored model code under `tempopfn/` derives from that project.