What Is a Hidden Markov Model (HMM)?

What Is a Hidden Markov Model (HMM)?

Tim Savage PhD, Chief Economic Advisor

Introduction

In econometrics, there is a quasi-Bayesian method called the Hidden Markov Model (”HMM”). It is estimated using the method of maximum likelihood. The way to think about maximum likelihood is to consider the idea of walking up a hill, pictured below. The method uses numeric optimization to get to the top of the hill using standard evaluation methods: zero first derivatives and a negative Hessian. When implemented, HMM generates a matrix of transition probabilities between so-called states of the world. Conditional on being in a particular state, it generates an average value within the own-state.


How might it be used practically?

Consider the series below, the Federal Funds Rate going back as far as I can pull the data. This is the interest rate that the U.S. Federal Reserve actually controls. Notice that there were periods when it was very high. These were periods in which U.S. inflation was very high due in part to the Vietnam War and in part oil price shocks in the late 1970’s, associated with conflict in the Middle East.

One aspect of HMMs is the necessity for the user to pre-assign the number of states of the world. Suppose, one were to say, looking at the graph below, that there are three states of the world: low, medium and high rates. With three states, the algorithm must estimate three times three (or nine) transition probabilities, as well as three conditional means for a total of 12 parameters. As such, it is computational intense algorithm that may not converge using numeric optimization if, for example, the user specifies too many states. If I had chosen four states, 20 parameters would be attempted.


How are we going to use it?

We always use cutting-edge methods for our clients. We have an idea of how to deploy the HMM in a particular instance. So stay tuned.