@quantfinancetogo: ➡️ Quantitative Finance from Scratch, part 57: Markov Chains. A Markov chain is a model for something that jumps between a few states, for example a market that switches between good and bad phases. The key idea: the next state depends only on the state today. The path that led here does not matter. This is called the Markov property, or memorylessness. The idea goes back to Andrey Markov. In 1913 he counted the first 20,000 letters of Pushkin's poem Eugene Onegin. After a vowel, the next letter was a vowel only about 13 % of the time, after a consonant about 66 % of the time. So the next letter depends on the current one. In finance we use the same idea for market regimes, for example a bull state and a bear state. All the rules fit into one table, the transition matrix, with one row for each state today. In the example, a bull month stays bull with 90 % and turns bear with 10 %. A bear month stays bear with 80 % and turns bull with 20 %. Every row adds up to one. The table also tells you how long a phase lasts on average: one divided by the chance of leaving. With a 10 % chance to leave each month, it takes 10 months on average, just like rolling a ten sided die until the one shows up. So bull phases last 10 months on average, bear phases 5. Real markets are not perfectly memoryless, because volatility clusters (see part 39 on GARCH), and nobody tells you which regime you are in. That is why quants use the Markov chain as a building block inside bigger models, like regime switching models, where every state has its own average return and its own volatility. The best known of them is the hidden Markov model, the topic of the next part. The code (mc57_reel.py, 13 lines of Python) is general on purpose: P is the transition matrix, step draws the next state from today's row, simulate repeats this month after month, mean_stay computes the average phase length. If you want to go deeper, check out the full course I built: quantfinancetogo.com #quantfinance #markovchain #probability #python #finance Education only, not financial advice.
QuantFinanceToGo
Region: DE
Saturday 21 November 2026 22:06:30 GMT
Music
Download
Comments
sanity187 :
learned about this in linear algebra
2026-11-22 00:06:10
37
fsgm2 :
I want the cide
2026-11-23 09:01:52
1
jfz :
NGL great visualization, and explanation!
2026-11-22 00:38:09
23
Abriel :
Markov chains are used in quantum mechanics
2026-11-22 05:09:26
0
Monkey D. Elias :
well tomorrow… probably freefalling again like yesterday ✌️🤣
2026-11-22 05:57:27
4
Sail the Sea w/ Rocket&Bennie :
Its also how the core Google algorithm works
2026-11-22 17:01:13
1
hairylightbulb :
does this apply to crypto?
2026-11-22 12:57:32
0
j0d4ny :
W vid
2026-11-21 22:12:03
1
Madjak :
markets only trend 20% of time so it is a great chance tomorrow will be rotational mean reversion day
2026-11-22 07:12:34
0
Pyker51 :
That's actually how AI works. It looks at all the words (tokens) and tries to guess which one would follow. And word by word, it writes a reply
2026-11-22 08:37:22
0
Jnu :
1 secret , sec!
2026-11-22 05:12:39
0
delgatto_x :
2026-11-22 00:20:09
1
Paul Vinten :
I was always waiting for this to get more difficult when we were taught it
2026-11-22 09:06:54
0
judiciarchy :
What terminal do you use for programming in Python?
2026-11-22 18:06:49
0
Rockn53 :
MARKOV
2026-11-23 00:32:23
0
itsLuke :
W bro
2026-11-23 00:35:22
0
QuantFinanceToGo :
Comment MARKOV in case you want my free introductory ebook 🙌
2026-11-22 01:43:41
0
Jani :
MARKOV
2026-11-22 17:34:02
1
davidlikestotok :
So stateless modalities is supposed to predict the next state? If an isolated environment maybe, but I wouldn’t bet too much on being able to predict a bull vs bear market using this generally.
2026-11-22 01:35:09
2
Katelyn George :
she's mind blowing @TIFFANY MORGAN
2026-11-21 22:45:37
3
willydowskii :
🥰🥰🥰
2026-11-23 10:59:55
0
To see more videos from user @quantfinancetogo, please go to the Tikwm
homepage.