About this project

What this is

The Canadian Yield Curve Portal is a public-education and decision-support site built around the Canadian 10-year minus 2-year government bond yield spread. It exists to make the data pipeline behind that spread — and the forecasting models built on top of it — visible and inspectable rather than a black box that just produces a chart.

The site has two modes: Learn mode explains the underlying financial and statistical concepts in plain language for a visitor with no prior background; "Analyst" mode (the pipeline, markets, diagnostics, and forecasting pages) surfaces the actual data, diagnostics, and model comparisons for fixed-income analysts, portfolio managers, risk managers, and monetary-policy watchers.

Methodology summary

Data is pulled from three source APIs on a scheduled batch job (never computed live on page load), staged through a Bronze → Silver → Gold pipeline — see the pipeline page for the live, inspectable trail of that process. Every series is tested for stationarity (Augmented Dickey-Fuller) and the group of series is tested for cointegration (Johansen), which determines whether a VAR or VECM model is used — see diagnostics. Four forecasting approaches (random walk, ARIMA, VAR/VECM, and a shallow LSTM) are evaluated against each other with rolling-window cross-validation and the Diebold-Mariano test at 1-day, 5-day, and 20-day horizons — see model comparison and the research answer.

Data sources

References (APA)

Bank of Canada. (n.d.). Valet API [Data set]. Retrieved from https://www.bankofcanada.ca/valet/

Estrella, A., & Hardouvelis, G. A. (1991). The term structure as a predictor of real economic activity. The Journal of Finance, 46(2), 555–576. https://doi.org/10.1111/j.1540-6261.1991.tb02674.x

Federal Reserve Bank of St. Louis. (n.d.). FRED, Federal Reserve Economic Data [Data set]. Retrieved from https://fred.stlouisfed.org/

Statistics Canada. (n.d.). Table 18-10-0004-01: Consumer Price Index, monthly, not seasonally adjusted [Data set]. Retrieved from https://www150.statcan.gc.ca/