In this master’s thesis, hidden Markov models (HMM) are evaluated as a tool for forecasting movements in a currency cross. With an ever increasing electronic market, making way for more automated trading, or so called algorithmic trading, there is constantly a need for new trading strategies trying to find alpha, the excess return, in the market.HMMs are based on the well-known theories of Markov chains, but where the states are assumed hidden, governing some observable output. HMMs have mainly been used for speech recognition and communication systems, but have lately also been utilized on financial time series with encouraging results. Both discrete and continuous versions of the model will be tested, as well as single- and multivariate input data.In addition to the basic framework, two extensions are implemented in the belief that they will further improve the prediction capabilities of the HMM. The first is a Gaussian mixture model (GMM), where one for each state assign a set of single Gaussians that are weighted together to replicate the density function of the stochastic process. This opens up for modeling non-normal distributions, which is often assumed for foreign exchange data…
Contents
1 Introduction
1.1 The Foreign ExchangeMarket
1.1.1 Market Structure
1.2 Shifting to Electronic Markets
1.2.1 Changes in the Foreign ExchangeMarket
1.3 Algorithmic Trading
1.3.1 Different Levels of Automation
1.3.2 Market Microstructure
1.3.3 Development of Algorithmic Trading
1.4 Objectives
1.4.1 Purpose
1.4.2 Purpose Decomposition
1.4.3 Delimitations
1.4.4 Academic Contribution
1.4.5 Disposal
2 Theoretical Framework
2.1 Foreign Exchange Indices
2.1.1 Alphas and Betas
2.2 Hidden Markov Models
2.2.1 Hidden MarkovModels used in Finance
2.2.2 Bayes Theorem
2.2.3 Markov Chains
2.2.4 Extending the Markov Chain to a Hidden MarkovModel
2.2.5 Three Fundamental Problems
2.2.6 Multivariate Data and Continuous Emission Probabilities
2.3 Gaussian Mixture Models
2.3.1 Possibilities to More Advanced Trading Strategies
2.3.2 The Expectation Maximization Algorithm on Gaussian Mixtures
2.4 The ExponentiallyWeighted Expectation Maximization Algorithm
2.4.1 The Expectation Maximization Algorithm Revisited
2.4.2 Updating the Algorithm
2.4.3 Choosing η
2.5 Monte Carlo Simulation
2.6 Summary
3 Applying Hidden Markov Models on Foreign Exchange Data
3.1 Used Input Data
3.2 Number of States and Mixture Components and Time Window Lengths
3.3 Discretizing Continuous Data
3.4 Initial Parameter Estimation
3.5 Generating Different Trading Signals
3.5.1 Trading Signal in the Discrete Case
3.5.2 Standard Signal in the Continuous Case
3.5.3 Monte Carlo Simulation Signal in the Continuous Case
3.6 Variable Constraints and Modifications
3.7 An Iterative Procedure
3.8 Evaluating the Model
3.8.1 Statistical Testing
3.8.2 Sharpe Ratio
3.8.3 Value at Risk
3.8.4 Maximum Drawdown
3.8.5 A Comparative Beta Index
4 Results
4.1 The Discrete Model
4.1.1 Using Only the Currency Cross as Input Data
4.1.2 Adding Features to the Discrete Model
4.2 The Continuous Model
4.2.1 Prediction Using a Weighted Mean of Gaussian Mixtures
4.2.2 Using Monte Carlo Simulation to Project the Distribution
4.3 Including the Spread
4.3.1 Filtering Trades
4.4 Log-likelihoods, Random Numbers and Convergence
5 Analysis
5.1 Effects of Different Time Windows
5.2 Hidden States and Gaussian Mixture Components
5.3 Using Features as a Support
5.4 The Use of Different Trading Signals
5.5 Optimal Circumstances
5.6 State Equivalence
5.7 Risk Assessment
5.8 Log-likelihood Sequence Convergence
6 Conclusions
6.1 Too Many Factors Brings Instability
6.2 Further Research Areas
Author: Idvall, Patrik,Jonsson, Conny
Source: Linkoping University
Download URL 2: Visit Now