O'Reilly logo

NumPy Cookbook - Second Edition by Ivan Idris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The steady state vector

A Markov chain is a system that has at least two states. For detailed information on Markov chains, please refer to http://en.wikipedia.org/wiki/Markov_chain. The state at time t depends on the state at time t-1, and only the state at t-1. The system switches at random between these states. The chain doesn't have any memory about the states. Markov chains are often used to model phenomena in physics, chemistry, finance, and computer science. For instance, Google's PageRank algorithm uses Markov chains to rank web pages.

I would like to define a Markov chain for a stock. Let's say that we have the states flat, up, and down. We can determine the steady state based on the end-of-the-day close prices.

Far into the distant future ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required