Discussion in ' Strategy Development ' started by bearmountain , Oct 20, Log in or Sign up. Is anyone here familiar with the hidden markov model? I need help in understanding it, how would it apply to trading? Could someone please give me an example. A non-trading example Consider two friends, Alice and Bob, who live far apart from each other and who talk together daily over the telephone about what they did that day. Bob is only interested in three activities: The choice of what to do is determined exclusively by the weather on a given day.

Alice has no definite information about the weather where Bob lives, but she knows general trends. Based on what Bob tells her he did each day, Alice tries to guess what the weather must have been like. Alice believes that the weather operates as a discrete Markov chain. There are two states, "Rainy" and "Sunny", but she cannot observe them directly, that is, they are hidden from her.

On each day, there is a certain chance that Bob will perform one of the following activities, depending on the weather: Since Bob tells Alice about his activities, those are the observations. The entire system is that of a hidden Markov model HMM. Alice knows the general weather trends in the area, and what Bob likes to do on average.

In other words, the parameters of the HMM are known. They can be represented as follows in the Python programming language: Isn't half the trouble finding it in the first place? What's the question, exactly?

It's been a while since I've looked at Markov chains, but I'm extremely interested in the topic If there are any references out there, I'd appreciate it. But I do know enough to be dangerous Alice can work through the various conditional probabilities by chugging through the math As far as how you apply this to the trading world We can describe 3 states for stock A, for example: We can describe the "emission" probability this way: And now we can calculate the conditional probability And based on that, we can try to guess whether indeed, the stock is today under-valued or over-valued.

The market is the game of misdirecting the other side to either sell you cheap or buy from you expensive. Nothing related to this naive example of Alice and Bob, two apparently honest average IQ persons.

Here's a blog that talks in a few posts about using markov models. May be good for a few trading-related ideas: One way people use HMMs in trading is for "regime shifting" or estimating what trading strategy would work best in the current conditions.

For example to distinguish between market "regimes" where a trend following strategy would be successful vs times when a mean reverting strategy would be successful. I don't have any experience with them myself but here are some links I have bookmarked: You must log in or sign up to reply here. Your name or email address: Do you already have an account? No, create an account now. Yes, my password is:

More...