Select Language

Interpretive Machine Learning for Exchange Rate Forecasting with Macroeconomic Fundamentals

A study applying interpretable machine learning to forecast and explain the CAD/USD exchange rate, identifying crude oil, gold, and the TSX as key drivers.
computecurrency.net | PDF Size: 1.1 MB
Rating: 4.5/5
Your Rating
You have already rated this document
PDF Document Cover - Interpretive Machine Learning for Exchange Rate Forecasting with Macroeconomic Fundamentals

Table of Contents

1. Introduction

Forecasting exchange rates is notoriously difficult due to the complexity, nonlinearity, and frequent structural breaks in financial systems. Traditional econometric models often struggle with these challenges and lack transparency. This study addresses this gap by developing a fundamental-based model for the Canadian-U.S. dollar (CAD/USD) exchange rate within an interpretive machine learning (ML) framework. The primary goal is not only to achieve accurate predictions but also to provide theory-consistent explanations for the model's decisions, thereby increasing trust and actionable insights for policymakers and economists.

The research is motivated by Canada's status as a major commodity exporter, particularly of crude oil, which constituted 14.1% of total exports in 2019. The dynamic relationship between commodity prices (especially oil) and the CAD is well-documented but complex, often exhibiting nonlinear and time-varying characteristics that are hard to capture with linear models.

2. Methodology & Framework

2.1 Interpretable Machine Learning Approach

The core methodology combines predictive machine learning models (e.g., Gradient Boosting, Random Forests, or Neural Networks) with post-hoc interpretability techniques. Unlike "black-box" models, this approach uses tools like SHAP (SHapley Additive exPlanations) and LIME (Local Interpretable Model-agnostic Explanations) to quantify the contribution of each macroeconomic variable to individual forecasts. This allows for a granular understanding of which factors drive exchange rate movements at specific points in time.

2.2 Data & Variables

The model incorporates a suite of macroeconomic and financial variables hypothesized to influence the CAD/USD rate. Key variables include:

  • Commodity Prices: Crude oil price (WTI/Brent), gold price.
  • Financial Indicators: S&P/TSX Composite Index (Canadian equity market), U.S. stock indices, interest rate differentials (Canada vs. U.S.).
  • Macroeconomic Fundamentals: GDP growth differentials, inflation rates, trade balance data.
  • Market Sentiment & Risk: VIX index (volatility).

Data is likely sourced from central banks (Bank of Canada, Federal Reserve), statistical agencies (Statistics Canada), and financial market databases.

2.3 Model Architecture & Training

The study employs a supervised learning setup, where the target variable is the future change or level of the CAD/USD exchange rate. The feature set comprises lagged values of the macroeconomic variables. The dataset is split into training, validation, and test sets to ensure robust out-of-sample evaluation. An ablation study is conducted, where variables are systematically removed based on interpretability outputs to refine the model and improve predictive accuracy.

3. Experimental Results & Analysis

3.1 Predictive Performance

The interpretive ML model demonstrates superior predictive accuracy compared to traditional benchmarks like linear regression, vector autoregression (VAR), or random walk models. Key performance metrics (e.g., Root Mean Squared Error - RMSE, Mean Absolute Error - MAE, Directional Accuracy) are reported, showing statistically significant improvements.

Model Performance Snapshot

Baseline (Random Walk): RMSE = X.XX

Proposed Interpretive ML Model: RMSE = Y.YY (Improvement: ZZ%)

3.2 Feature Importance & Interpretability

The interpretability analysis reveals a clear hierarchy of driving factors:

  1. Crude Oil Price: The most significant determinant. Its contribution is time-varying, with changes in sign and magnitude aligning with major events in commodity markets (e.g., the 2014 oil price crash, OPEC+ decisions, pipeline developments in Canada).
  2. Gold Price: The second most important variable, acting as a safe-haven and commodity currency influence.
  3. S&P/TSX Composite Index: The third key driver, reflecting the health of the Canadian corporate sector and capital flows.

Chart Description: A SHAP summary plot would visually display this hierarchy. Each dot represents a data instance (time period). The x-axis shows the SHAP value (impact on model output), and the y-axis lists features sorted by global importance. The color indicates the feature value (red=high, blue=low). For crude oil, a spread of dots across both positive and negative SHAP values would evidence its time-varying effect.

3.3 Ablation Study Findings

The ablation study confirms the interpretability results. Sequentially removing the top features (oil, gold, TSX) leads to the steepest decline in model accuracy, validating their critical role. Conversely, removing less important variables has a negligible impact, allowing for a more parsimonious and efficient final model.

4. Key Insights & Discussion

The study successfully demystifies the "black box" of ML for exchange rate forecasting. The primary insight is that crude oil is the dominant, non-linear, and state-dependent driver of the CAD/USD rate, consistent with Canada's economic structure. The interpretability framework provides causal-looking narratives—for example, showing when oil price increases strengthen the CAD (during risk-on, demand-driven rallies) and when they might not (during global risk-off events that overwhelm commodity effects). This bridges the gap between ML predictions and economic theory.

5. Technical Details & Mathematical Framework

The predictive model can be represented as: $\hat{y}_t = f(\mathbf{x}_{t-k}) + \epsilon_t$, where $\hat{y}_t$ is the forecasted exchange rate return, $f(\cdot)$ is the ML model (e.g., a gradient boosting function), $\mathbf{x}_{t-k}$ is a vector of lagged macroeconomic features, and $\epsilon_t$ is the error term.

Interpretability is achieved using SHAP values, which are based on cooperative game theory. The SHAP value $\phi_i$ for feature $i$ is calculated as: $$\phi_i = \sum_{S \subseteq N \setminus \{i\}} \frac{|S|! (|N|-|S|-1)!}{|N|!} [f(S \cup \{i\}) - f(S)]$$ where $N$ is the set of all features, $S$ is a subset of features excluding $i$, and $f(S)$ is the model prediction using the feature subset $S$. This provides a fair allocation of the prediction difference to each feature.

6. Analysis Framework: Example Case Study

Scenario: Analyzing the CAD/USD depreciation in Q1 2020.

  1. Input: Feature set from late 2019/Q4 2019: Plunging WTI oil prices (COVID-19 demand shock), rising VIX (risk-off), falling TSX.
  2. Model Prediction: Forecasts significant CAD weakness.
  3. Interpretability Output (SHAP):
    • Crude Oil: High Negative Contribution (-50 pips). The low oil price value strongly pushes the forecast down.
    • VIX: Negative Contribution (-20 pips). High risk aversion hurts commodity currencies.
    • TSX: Negative Contribution (-15 pips).
    • Gold: Small Positive Contribution (+5 pips). Its safe-haven role provides slight offset.
  4. Insight: The model's prediction is transparently attributed primarily to the oil price collapse, contextualized by broader risk-off sentiment, aligning perfectly with the observed market narrative.

7. Future Applications & Research Directions

  • Real-time Policy Dashboard: Central banks could integrate such interpretive models into dashboards that monitor key driver contributions to the currency in real-time, informing intervention decisions.
  • Multi-Currency Framework: Extending the methodology to a suite of commodity (AUD, NOK, RUB) and major (EUR, JPY) currencies to develop a global macro risk model.
  • Integration with Alternative Data: Incorporating shipping costs, satellite imagery of oil inventories, or news sentiment scores to enhance feature sets.
  • Causal Discovery: Combining with causal inference techniques (e.g., Peter-Clark algorithm) to move beyond correlation and establish stronger causal links.
  • Explainable AI (XAI) Standards: This work contributes to the growing field of XAI in finance, as advocated by research from institutions like the MIT-IBM Watson AI Lab, which emphasizes the need for trustworthy and auditable AI systems in critical domains.

8. References

  1. Neghaba, D. P., Cevik, M., & Wahab, M. I. M. (2023). Explaining Exchange Rate Forecasts with Macroeconomic Fundamentals Using Interpretive Machine Learning. arXiv preprint arXiv:2303.16149.
  2. Lundberg, S. M., & Lee, S. I. (2017). A unified approach to interpreting model predictions. Advances in neural information processing systems, 30.
  3. Chen, S. S., & Chen, H. C. (2007). Oil prices and real exchange rates. Energy economics, 29(3), 390-404.
  4. Bank of Canada. (2022). Monetary Policy Report.
  5. U.S. Energy Information Administration. (2022). U.S. Imports from Canada of Crude Oil.
  6. Ribeiro, M. T., Singh, S., & Guestrin, C. (2016). "Why should I trust you?" Explaining the predictions of any classifier. Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining.

9. Analyst's Perspective: Core Insight, Logical Flow, Strengths & Flaws, Actionable Insights

Core Insight: This paper delivers a powerful, yet often overlooked, truth in quantitative finance: for resource-driven economies like Canada, the exchange rate isn't a complex mystery—it's a levered bet on a single commodity, wrapped in a veil of other noisy variables. The authors use interpretable ML not to find a new driver, but to quantify and validate the non-linear, regime-dependent dominance of crude oil with a precision that traditional econometrics can't match. This isn't just forecasting; it's economic storytelling with numbers.

Logical Flow: The argument is compellingly simple: 1) Acknowledge the forecasting failure of linear models in chaotic FX markets. 2) Deploy ML's pattern recognition power to improve accuracy. 3) Use SHAP/LIME to crack open the "black box" and ask, "What did the model actually learn?" 4) Discover that the model's intelligence primarily maps onto the most obvious fundamental story—oil dependency. The elegance lies in using cutting-edge tech to reinforce, not replace, classical economic intuition.

Strengths & Flaws: The major strength is its pragmatic hybrid approach, marrying ML's predictive muscle with the explanatory necessity demanded by policymakers. The ablation study is a particularly robust touch. However, the flaw is in the potential illusion of causality. SHAP explains correlations within the model's framework, not true causality. If the model learns a spurious correlation (e.g., between ice cream sales and the CAD), SHAP will dutifully explain it. The paper could be stronger by integrating causal discovery methods upfront, as pioneered in works like those by Judea Pearl, to distinguish drivers from mere correlates.

Actionable Insights: For fund managers: Stop over-complicating the Loonie. Build your core CAD view on oil fundamentals and use this interpretive framework to dynamically weight that view against secondary factors (gold, risk sentiment). For corporates: Use this methodology for scenario analysis—run different oil price paths through the interpreted model to generate probabilistic hedging budgets. For regulators: This is a blueprint for auditable AI in macro-prudential policy. Before deploying any ML for systemic risk assessment, demand this level of interpretability to understand what the model is truly sensitive to. The future isn't just AI-powered forecasts; it's AI-explained decisions.