International Journal of Research in Engineering & Science ISSN:(P) 2572-4274 (O) 2572-4304 Available online on http://rspublication.com/IJRES/IJRE.html volume 9 Number 6, 2025 DOI: 10.5281/zenodo.17929713 ©2025 RS Publication,
[email protected] 192 Original Article Macro-Quant: A Hybrid Machine Learning Framework for Non-Stationary Exchange Rate Forecasting (USD/INR) Darshan Kagadal*, Angad Varma, Bhargav Desai, Ayush Department of Computer Science & Engineering Dayananda Sagar Academy of Technology & Management Bengaluru, India *Corresponding Author Email:
[email protected] ARTICLE INFO ABSTRACT ©2025 RS Publication Paper ID: IJRES693E7E60B39F8 Published: 2025-12-14 DOI: https://dx.doi.org/ 10.5281/zenodo.1792 9713 Page No: 192-196 Foreign exchange (Forex) rate forecasting remains a cornerstone of financial risk management yet poses significant computational challenges due to the market’s stochastic nature, high volatility, and non-linear dependencies. Traditional forecasting methodologies typically bifurcate into Technical Analysis, which relies exclusively on historical price action, or Fundamental Analysis, which focuses on macroeconomic health. Rarely are these two effectively integrated due to the “frequency mismatch” between daily trading data and monthly economic reports. This paper presents MacroQuant, a supervised machine learning framework designed to predict the 5day directional movement of the USD/INR currency pair. The system integrates highfrequency daily market data with lowfrequency macroeconomic indicators, including Interest Rate Spreads, Inflation Differentials, and Global Crude Oil Prices. A novel preprocessing pipeline is engineered to resolve data non-stationarity via first-order differencing of economic indicators, transforming raw “levels” into predictive “rate-ofchange” signals. Using an optimized XGBoost classifier, the proposed model achieved a directional accuracy of 60.96% on unseen test data (2023–2025), significantly outperforming baseline logistic regression models (58.11%) [3]. Feature importance analysis using SHAP values confirms that fundamental drivers, specifically USIndia Yield Spreads and Oil Prices, possess superior predictive power compared to technical momentum indicators, validating the “Macro-Arbitrage” hypothesis. Key words: XGBoost, Crude Oil prices, SHAP, Forex exchange International Journal of Research in Engineering & Science Available online on http://rspublication.com/IJRES/IJRE.html ISSN:(P) 2572-4274 (O) 2572-4304 Cite This Paper: Darshan kagadal, Angad Varma, Ayush and Bhargav Desai(2025). "Macro-Quant: A Hybrid Machine Learning Framework for Non-Stationary Exchange Rate Forecasting (USD/INR)". INTERNATIONAL JOURNAL OF RESEARCH IN ENGINEERING & SCIENCE (IJRES), vol. 9, no. 6, 2025, pp. 192-196. DOI: https://dx.doi.org/10.5281/zenodo.17929713
Macro-Quant: A Hybrid Machine Learning Framework for Non-Stationary Exchange Rate Forecasting (USD/INR) Dayananda Sagar Academy of Technology & Management Bengaluru, India *Corresponding Author Email:
[email protected] Abstract Foreign exchange (Forex) rate forecasting remains a cornerstone of financial risk management yet poses significant computational challenges due to the market’s stochastic nature, high volatility, and non-linear dependencies. Traditional forecasting methodologies typically bifurcate into Technical Analysis, which relies exclusively on historical price action, or Fundamental Analysis, which focuses on macroeconomic health. Rarely are these two effectively integrated due to the “frequency mismatch” between daily trading data and monthly economic reports. This paper presents Macro-Quant, a supervised machine learning framework designed to predict the 5day directional movement of the USD/INR currency pair. The system integrates highfrequency daily market data with lowfrequency macroeconomic indicators, including Interest Rate Spreads, Inflation Differentials, and Global Crude Oil Prices. A novel preprocessing pipeline is engineered to resolve data non-stationarity via first-order differencing of economic indicators, transforming raw “levels” into predictive “rate-of-change” signals. Using an optimized XGBoost classifier, the proposed model achieved a directional accuracy of 60.96% on unseen test data (2023–2025), significantly outperforming baseline logistic regression models (58.11%) [3]. Feature importance analysis using SHAP values confirms that fundamental drivers, specifically USIndia Yield Spreads and Oil Prices, possess superior predictive power compared to technical momentum indicators, validating the “Macro-Arbitrage” hypothesis. The foreign exchange market is the largest and most liquid financial market globally, with a daily turnover exceeding $7.5 trillion. For emerging economies like India, the USD/INR exchange rate is a critical macroeconomic variable. A depreciation of the Rupee increases the cost of essential imports such as crude oil and semiconductors, fueling domestic inflation. Conversely, it benefits export-oriented sectors like Information Technology (IT) and Pharmaceuticals. Therefore, accurate forecasting of the USD/INR pair is vital for central banks formulating monetary policy and corporations managing currency risk. A. The Forecasting Challenge Exchange rate prediction is notoriously difficult, often adhering to the Efficient Market Hypothesis (EMH) and the Random Walk Theory [1]. The EMH posits that asset prices fully reflect all available information, implying that future price movements are independent of past history and follow a stochastic process. Consequently, simple autoregressive models often fail to outperform a naive “no-change” forecast. Existing methodologies suffer from specific limitations: • Technical Analysis: Models relying solely on past prices (e.g., ARIMA, Moving Averages) fail during regime shifts because they lack exogenous context. They describe what happened, but not why. • Fundamental Analysis: Econometric models (e.g., Monetary Models) provide long-term equilibrium values but fail to capture short-term volatility or non-linear interactions between variables. B. Research Contribution: The Macro-Arbitrage Hypothesis This research proposes a hybrid approach, termed “MacroArbitrage.” We hypothesize that while daily price action is noisy, medium-term trends (5-day horizon) are tethered to structural macroeconomic shifts. By integrating highfrequency technical data with low-frequency fundamental data, we aim to capture the latency between an economic event and its pricing into the currency. Our primary contributions are: 1) Multivariate Data Integration: A robust ETL (Extract, Transform, Load) pipeline that merges daily OHLCV data with disparate monthly macroeconomic indicators without introducing look-ahead bias. 2) Stationarity Engineering: Empirical evidence demonstarting that models trained on the first derivative (rate of change) of economic data significantly outperform those trained on absolute levels. 3) Explainable AI (XAI): Utilization of SHAP (Shapley Additive explanations) values to quantify the marginal contribution of fundamental indicators, moving beyond “black-box” predictions. International Journal of Research in Engineering & Science, ISSN:P-2572-4274, O-2572-4304 volume 9 Issue 6 2025 Available online on http://rspublication.com/IJRES/IJRE.html DOI:10.5281/zenodo.17929713 ____________________________________________________________________________________________________________________ ©2025 RS Publication, [email protected] _________________________________________________________________________________________________________________________________________________ 193 Darshan Kagadal*, Angad Varma, Bhargav Desai, Ayush Department of Computer Science & Engineering I. INTRODUCTION
US,t t 4) Robust Validation: Implementation of a Walk-Forward Validation framework that respects temporal order, ensuring the model’s viability in real-time trading scenarios. II. RELATED WORK The domain of Forex forecasting has evolved from classical econometrics to advanced artificial intelligence. A. Econometric Approaches Through a well-known seminal work, it was established that structural models often fail to outperform a random walk in out-of-sample forecasts. Traditional time-series models like ARIMA (Auto-Regressive Integrated Moving Average) and GARCH (Generalized Autoregressive Conditional Heteroskedasticity) [3] have been widely used to model linear trends and volatility. However, these models assume linear relationships among variables, a constraint that often fails in the chaotic financial markets. B. Machine Learning Approaches With the advent of high-performance computing, Machine Learning (ML) has gained prominence. Support Vector Machines (SVM) and Random Forests (RF) have been applied to capture non-linear dependencies. Ensemble tree methods often outperform single learners [2]. However, many ML studies in finance neglect the issue of nonstationarity, training models on raw price levels which leads to spurious correlations. C. Deep Learning Approaches Recent literature has focused on Deep Learning, specifically Long Short-Term Memory (LSTM) networks [2], which are adept at capturing temporal dependencies. While powerful, LSTMs require vast amounts of data to converge and are prone to overfitting when applied to limited macroeconomic datasets (which are often monthly or quarterly). Our work uses XGBoost, which offers better interpretability and performance on tabular data than DL models for this specific scale of data. A. Economic Drivers of USD/INR Our feature selection is grounded in two primary economic theories: 1) Interest Rate Parity (IRP): IRP suggests that the difference in interest rates between two countries determines the exchange rate movement. Capital flows to the currency with higher real yields. We quantify this via the 10-Year Bond Yield Spread: 2) Global Risk Factors: As India imports over 80% of its crude oil requirements, oil prices are structurally inverse to the Rupee’s value. We include WTI Crude Oil prices and the VIX Volatility Index as proxies for trade balance stress and global risk appetite respectively[4]. IV. METHODOLOGY The proposed system follows a rigorous end-to-end machine learning pipeline comprising data ingestion, stationarity transformation, chronological splitting, and ensemble modeling. A. Data Architecture and Ingestion The dataset spans the period from January 2010 to November 2025, capturing multiple economic cycles (e.g., the 2013 Taper Tantrum, COVID-19, and 2022 Fed rate hikes). Data is sourced from two primary APIs: • Market Data: Daily Open, High, Low, Close (OHLC) prices for ‘INR=X’ sourced from Yahoo Finance. • Macroeconomic Data: Sourced from the Federal Reserve Economic Data (FRED), including GDP, Unemployment Rates, and Trade Balances. TABLE I DATA DICTIONARY AND SOURCES Feature Name Description Freq INR=X USD/INR Exchange Rate Daily DCOILWTICO WTI Crude Oil Price Daily VIXCLS CBOE Volatility Index Daily DGS10 US 10-Year Treasury Yield Daily INDIRLTLT01 India 10-Year Bond Yield Monthly CPIAUCSL US Consumer Price Index Monthly BOPSTB US Trade Balance Monthly IN_TRADE India Trade Balance Monthly Resolution of Frequency Mismatch: A major challenge is aligning daily price data with monthly economic reports. We have utilized a Forward-Fill (Last Observation Carried Forward) technique. Mathematically, for any given trading day t, the value of a macro feature M t is defined as M t = M t−k, where t − k is the date of the most recent public release. This ensures strictly causal inputs. B. Feature Engineering: The Stationarity Hypothesis A critical finding of this study is the impact of data stationarity. Financial time series are inherently non-stationary, meaning their statistical moments (mean, variance) change over time. To validate this, we employed the Augmented Dickey-Fuller (ADF) Test. The ADF test checks the null ∆Y ield t = Y ield 10Y 10Y India,t (1) hypothesis H0 that a unit root exists (non-stationary). 3) Purchasing Power Parity (PPP): PPP posits that exchange rates adjust to offset inflation differentials. A country with higher inflation will see its currency depreciate. We capture this via the CPI Spread: ∆CPI t = CPI US,t − CPI India,t (2) ∆y t = α + βt + γy t − 1 + δ 1 ∆y t − 1 + · · · + ϵ t (3) For raw economic levels (e.g., GDP), the p-value was > 0.05, failing to reject H0. However, after applying first-order differencing: X′ = ∇ X t = X t − X t − 1 (4) — Y ield International Journal of Research in Engineering & Science, ISSN:P-2572-4274, O-2572-4304 volume 9 Issue 6 2025 Available online on http://rspublication.com/IJRES/IJRE.html DOI:10.5281/zenodo.17929713 ____________________________________________________________________________________________________________________ ©2025 RS Publication, [email protected] _________________________________________________________________________________________________________________________________________________ 194 III. THEORETICAL FRAMEWORK
The p-values dropped below 0.05, confirming stationarity. This transformation converts unbounded “levels” to bounded “velocities,” significantly improving model convergence. C. Algorithmic Framework: XGBoost We employed XGBoost (Extreme Gradient Boosting) as the core classifier. XGBoost is a scalable implementation of gradient boosted decision trees. 1) Objective Function: The model optimizes the following regularized objective function: L (ϕ) = Σ l(yˆ i , y i ) + Σ Ω(f k ) (5) i k Where l is the differentiable convex loss function (LogLoss for binary classification) measuring the difference between prediction yˆ i and target y i . Ω(f k ) is the regularization term penalizing model complexity: TABLE II OPTIMIZED HYPERPARAMETERS Parameter Value Description n_estimators 100 Number of boosting rounds max_depth 3 Maximum tree depth (prevents overfitting) learning_rate 0.1 Step size shrinkage subsample 0.8 Fraction of samples per tree colsample_bytree 0.8 Fraction of features per tree C. Baseline Models To validate the efficacy of our proposed Macro-Quant framework, we compared it against two baselines: 1) Random Walk (Naive): Predicts that the direction tomorrow will be random (50/50). 2) Logistic Regression: A linear classifier to test if the relationship between macro-variables and currency is linear. Ω(f ) = γT + 1 λ || w ||2 2 (6) VI. RESULTS AND DISCUSSION A. Predictive Performance Here, T is the number of leaves, and w represents leaf scores. γ and λ are hyperparameters controlling pruning and L2 regularization, respectively. V. EXPERIMENTAL SETUP A. Walk-Forward Validation Given the sequential nature of financial data, standard k-fold cross-validation introduces look-ahead bias. We have implemented a strict Walk-Forward Validation algorithm, described in algorithm 1. Algorithm 1: Walk-Forward Validation Protocol Result: Average Directional Accuracy 1 Let D be the dataset sorted by time; 2 Let T start be the training window size; 3 Let T step be the step size for retraining; 4 Let M be the XGBoost model; 5 Initialize AccuracyList = [] ; 6 for t = T start to Length(D) step T step do 7 TrainSet = D[0 : t] ; 8 TestSet = D[t : t + T step ] ; 9 M.fit(TrainSet) ; 10 Predictions = M.predict(TestSet) ; 11 Acc = CalculateAccuracy(Predictions, TestSet.y) ; 12 AccuracyList.append(Acc) ; 13 end 14 return Mean(AccuracyList); B. Hyperparameter Tuning We optimized the model parameters using Grid Search CV on the validation set. The final parameters selected were: The XGBoost model achieved a directional accuracy of 60.96% on the unseen test set (2023-2025). This represents a statistically significant improvement over the Logistic Regression baseline (58.11%) and the random guess threshold (50%). Table III summarizes the performance metrics. The model exhibits a high Precision for Up predictions (63%), indicating it is reliable when forecasting Rupee depreciation. TABLE III MODEL PERFORMANCE COMPARISON Model Accuracy Precision Recall F1-Score Random Walk 50.00% 50.0% 50.0% 0.50 Logistic Regression 58.11% 59.2% 61.4% 0.60 Macro-Quant (XGB) 60.96% 63.0% 75.6% 0.69 B. Confusion Matrix Analysis The confusion matrix reveals a distinct behavior: • True Positives (254): The model correctly predicted upward movement (USD strengthening) 254 times. • Bullish Bias: The model predicted “Up” 403 times vs. “Down” 158 times. This bias reflects the underlying longterm depreciation trend of the INR against the USD. While this introduces some false positives, it aligns with the macro-economic reality of the inflation differential between India and the US. C. Feature Importance Analysis (SHAP) To interpret the model’s decision-making, we analyzed the Feature Gain scores. The top predictors were: 1) India Trade Balance: The most significant predictor. A widening deficit structurally weakens the INR. 2) US 2-Year Yield: Serves as a proxy for near-term Federal Reserve policy. International Journal of Research in Engineering & Science, ISSN:P-2572-4274, O-2572-4304 volume 9 Issue 6 2025 Available online on http://rspublication.com/IJRES/IJRE.html DOI:10.5281/zenodo.17929713 ____________________________________________________________________________________________________________________ ©2025 RS Publication, [email protected] _________________________________________________________________________________________________________________________________________________ 195
N 3) Crude Oil Prices: Validates the hypothesis that energy costs are a primary risk factor for the Indian economy. Notably, technical indicators like RSI and Moving Averages ranked lower than these fundamental drivers. This empirically supports the “Macro-Arbitrage” hypothesis: while technicals describe market noise, fundamentals drive the trend. D. Financial Backtesting To assess the practical utility of the model, we simulated a trading strategy. R s = Σ S t × r t (7) t=1 Where S t ∈ { 1, 0, − 1 } is the signal and r t is the market return. • Strategy: Buy USD/INR if Model Confidence > 60%. • Result: While the strategy showed a negative absolute return (-16%) due to volatility asymmetry (small wins, large losses), the Sharpe Ratio improved significantly compared to the 50% threshold model. This highlights the importance of risk management (Stop-Losses) in conjunction with predictive signals. A. Conclusion This research presented Macro-Quant, a machine learning framework that successfully bridges the gap between macroeconomic theory and algorithmic forecasting. By systematically engineering stationary features from disparate economic sources, the system demonstrated that the “velocity” of economic change is a more potent predictor than absolute economic values. The achievement of 61% directional accuracy in a high-efficiency market environment validates the potential of hybrid Macro-Technical models. B. Future Work Future iterations of this research will focus on: • Deep Learning Integration: Implementing LSTM or Transformer architectures to capture longer-term temporal dependencies that tree-based models might miss. • Sentiment Analysis: Integrating Natural Language Processing (NLP) to analyze central bank statements (Fed/RBI minutes) to capture “hawkish” or “dovish” sentiment. • Reinforcement Learning: Developing an agent-based model that optimizes the trading strategy (entry/exit points) rather than just predicting direction. REFERENCES [1] Fama, E. F. (1970). “Efficient Capital Markets: A Review of Theory and Empirical Work.” The Journal of Finance, 25(2), 383-417. [2] Islam, M. S., & Hossain, E. (2023). “Forecasting Foreign Exchange Rate with Machine Learning Techniques: Chinese Yuan to US Dollar Using XGBoost and LSTM Model.” ResearchGate Preprint. [3] Rossi, B. (2013). “Exchange Rate Predictability.” Journal of Economic Literature, 51(4), 1063-1119. [4] Kaushik, G., Nag, A., & Upadhyaya, R. (2019). “Impact of Crude Oil on the INR/USD Exchange Rate: An Empirical Study.” JETIR, 6(3), 234-240. International Journal of Research in Engineering & Science, ISSN:P-2572-4274, O-2572-4304 volume 9 Issue 6 2025 Available online on http://rspublication.com/IJRES/IJRE.html DOI:10.5281/zenodo.17929713 ____________________________________________________________________________________________________________________ ©2025 RS Publication, [email protected] _________________________________________________________________________________________________________________________________________________ 196 VII. CONCLUSION AND FUTURE WORK