This courselet introduces how machine learning can be applied to forecast currency-market volatility. Using high-frequency EUR/USD data, it explains the complete modelling process, from transforming prices into log returns and constructing lagged-return and rolling-volatility features to training and evaluating Random Forest and XGBoost models. The results show that both models capture meaningful volatility patterns, while XGBoost achieves slightly better predictive performance. The courselet also discusses the limitations of machine learning in predicting extreme volatility spikes and possible extensions using macroeconomic variables and LSTM models
This courselet provides an introduction to the use of machine learning for forecasting currency-market volatility. It begins by explaining why volatility is an important risk indicator for financial institutions, companies, and investors. Currency volatility can affect portfolio risk, hedging costs, trading decisions, liquidity conditions, and corporate financial planning. The courselet also discusses the main drivers of exchange-rate volatility, including interest-rate decisions, inflation, economic indicators, market sentiment, geopolitical events, and global financial shocks.
The methodological section presents a complete machine-learning workflow using high-frequency EUR/USD data from 2023 to 2025. Since raw exchange-rate prices are generally non-stationary, they are first transformed into log returns. These returns are then used to construct predictive features, including lagged returns and rolling volatility measures over different time windows. The resulting dataset allows the models to use historical market information to predict future volatility.
The courselet focuses on two widely used tree-based machine-learning methods: Random Forest and XGBoost. Their predicted volatility values are compared with actual volatility, while model performance is evaluated using Mean Squared Error, Root Mean Squared Error, and Mean Absolute Error. The empirical results show that both models are able to capture meaningful volatility patterns, although XGBoost produces slightly lower prediction errors because it improves sequentially by correcting the mistakes of earlier trees.
Finally, the courselet discusses the practical interpretation and limitations of the results. Although machine-learning models can identify nonlinear relationships and volatility clustering more flexibly than traditional parametric models, they may still fail to predict sudden and extreme volatility spikes. Possible extensions include incorporating macroeconomic variables, market sentiment indicators, additional currency pairs, and more advanced sequential models such as LSTM networks.