# Markov chains

### j3

#### 24/10/2017

Markov chains say that any information that can be used to predict tomorrow’s price is contained in today’s price. Let’s do a little talking about that.

If we assume the previous statement, the probability of an event occurring depends only on the previous event.

An event can be: let the series go down (E1) or go up (E2).

– So, if I watch the movement today, can I know if I will win or lose tomorrow?

– Yes, by constructing a diagram that models the transition probability between the defined events. …where P is the probability of passing from one state (event) to the other. As an example:

• P12 shows the probability of having a positive performance tomorrow, when today has been negative.
• P21 shows the probability of having a negative performance tomorrow, when today has been positive.
• P11 shows the probability of having a negative performance tomorrow, when today has been negative.
• P22 shows the probability of having a positive performance tomorrow, when today has been positive.

– And how do you know these probabilities?

– You can observe the probabilities in the past. In the last 20 years of an equity fund, this happened: – Okay, so if today’s performance has been negative…that means tomorrow’s performance will be negative too?

– Exactly! If today (T0) is negative, we express it as: We can calculate what will happen tomorrow (T1) as: So the probability that tomorrow will be negative is 0.6, and that tomorrow is positive is 0.4.

– And in n days? – So D will always have the first eigenvectors = 1 and its associated eigenvectors will be the probability ratio between E1 and E2 when n is at the limit. In this example, at infinity, E2 is twice as likely as E1. Notice that the system seems to be forgetting the initial state where we left off.

– Okay, but why does P always have the first eigenvectors equal to 1?Because it’s a property of this type of transaction probability matrices, in which the columns always add up to one.

– And how does this help me?

– It doesn’t, very much. But you can enlarge the problem by defining more states that include the relevant information you use to model your time series. I have chosen the S&P 500. I’ve defined 12 states that characterise the magnitude of yields measured in standard deviations and have learned the P transition probability matrix across 40 years of history. With it I can predict what will happen tomorrow, and that the performance will be between zero and two standard deviations. -So the S&P500 model has been built. –  Yes, and I can generate as many S&P 500’s as I want with the same pattern of dependencies.

In the graph, each series is a different realisation and – perhaps in some – the S&P of the future.

Dare to read the Spanish version!