Тёмный

Trading stock volatility with the Ornstein-Uhlenbeck process 

QuantPy
Подписаться 72 тыс.
Просмотров 24 тыс.
50% 1

Understanding and modelling volatility accurately is of utmost importance in financial mathematics. The emergence of volatility clustering in financial markets can make estimating volatility very difficult.
Here we explain how to use a stochastic model called Ornstein-Uhlenbeck process to model volatility. We explain the mathematics of using a method called Maximum Likelihood Estimation (MLE) to estimate the parameters of the Ornstein-Uhlenbeck process based on S&P500 historical/realised volatility.
We also explain how to derive the dynamics of the stochastic process using Ito Calculus, this is required for deriving the Probability Density Function (PDF) of the Ornstein-Uhlenbeck process used in the MLE method.
Finally, we simulate the volatility using the continuous-time stochastic process at a particular time step with no approximations, and also create sample paths using Euler method to discretize the stochastic differential equation (SDE).
★ ★ Code Available on GitHub ★ ★
GitHub: github.com/TheQuantPy
Specific Tutorial Link: github.com/TheQuantPy/youtube...
00:00 Intro
01:43 Volatility Clustering
04:20 Using MLE for estimating model parameters
11:00 Determining distribution of Ornstein-Uhlenbeck process
14:51 Using MLE for Ornstein-Uhlenbeck Volatility Model
18:36 Simulating Volatility Model in Python
★ ★ QuantPy GitHub ★ ★
Collection of resources used on QuantPy RU-vid channel. github.com/thequantpy
★ ★ Discord Community ★ ★
Join a small niche community of like-minded quants on discord. / discord
★ ★ Support our Patreon Community ★ ★
Get access to Jupyter Notebooks that can run in the browser without downloading python.
/ quantpy
★ ★ ThetaData API ★ ★
ThetaData's API provides both realtime and historical options data for end-of-day, and intraday trades and quotes. Use coupon 'QPY1' to receive 20% off on your first month.
www.thetadata.net/
★ ★ Online Quant Tutorials ★ ★
WEBSITE: quantpy.com.au
★ ★ Contact Us ★ ★
EMAIL: pythonforquants@gmail.com
Disclaimer: All ideas, opinions, recommendations and/or forecasts, expressed or implied in this content, are for informational and educational purposes only and should not be construed as financial product advice or an inducement or instruction to invest, trade, and/or speculate in the markets. Any action or refraining from action; investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied in this content, are committed at your own risk an consequence, financial or otherwise. As an affiliate of ThetaData, QuantPy Pty Ltd is compensated for any purchases made through the link provided in this description.

Опубликовано:

 

8 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 37   
@dangkhoatrannguyen6734
@dangkhoatrannguyen6734 Год назад
I got my Master in Financial Engineering. And in my opinion this content is of high quality and rare. Thank you for sharing such valuable knowledge on RU-vid.
@deadduck8307
@deadduck8307 11 месяцев назад
my PhD is in stochastic processes, and yes, he does good work.
@Tyokok
@Tyokok 9 дней назад
All respect and appreciation!!!
@KrishnenduSKar
@KrishnenduSKar 2 года назад
Thank you so much for the detailed explanations. Been trying to connect the worlds of Stochastic Process & Computer Science for quite some time. Contributions like these help people like us break barriers which seemed almost impossible (until now). Thanks again and keep up the great work !! Respect !! Go Feynman !! ✌🏽👍🏽🙏🏽
@michaelnovik270
@michaelnovik270 2 года назад
Pure gold. My respect.
@Notwhoyouthink_23
@Notwhoyouthink_23 Год назад
This channel is precious. Thank you very much
@alessandrolodi8951
@alessandrolodi8951 2 года назад
This video is simply amazing
@nolann2382
@nolann2382 2 года назад
Although I'm not a quant, I watch your videos for fun. I'm a math student right now, but I hope to become a quant one day.
@ps3265
@ps3265 2 года назад
Thanks for the video!
@saremseitz5715
@saremseitz5715 Год назад
Really good - thank you!
@amitpashine1189
@amitpashine1189 9 месяцев назад
really outstanding content. keep it up!
@Anyone.c
@Anyone.c 2 года назад
I love your videos dude!!! You put in so much work and effort in them! thank you for this. Can you suggest any readings for deciding a stocks weight in a portfolio(maybe include this volatility aspect too). Thanks!
@powerfuel297
@powerfuel297 9 месяцев назад
I implement the RFSV model last year, it also uses a similar OU process in there
@gokhanozbay4349
@gokhanozbay4349 2 года назад
İt's awesome lecture. Thanks a lot dude 👍
@QuantPy
@QuantPy 2 года назад
Cheers, feel free to suggest ideas for future videos anytime
@randomdude79404
@randomdude79404 2 года назад
Thanks for this video , in the past you created a video on statistical properties of the bars by the work of Marcoz Lopez De Prado (Advances In Financial Machine Learning) could you perhaps create a few more videos showing implementation of something like meta-labelling etc...
@alejandrovillalobos1678
@alejandrovillalobos1678 2 года назад
that little bit of correlation is there because outliers
@Alexander-pk1tu
@Alexander-pk1tu Год назад
Very cool video and project. I tried to replicate the notebook myself from your site. I am working on a project where I want to find SV under P so its what I am looking for. But shouldn't you use Cox-Ross Model for Volatility? I would like to see a follow-up video on this topic! On calculating these parameters on historical data
@Rndhld
@Rndhld 2 года назад
This is very good content! I am in the process of migrating from Excel to Python. How do you plot the text and algebra notation (at around 5 min. for instance) in your notebooks?
@lking8819
@lking8819 Год назад
He is using LaTEX typed into a markdown cell within Jupyter Notebook. Hope that helps!
@kevinshao9148
@kevinshao9148 10 дней назад
Hi, why you pick rolling days 40 for vol? why not calc vol from beginning? Thank you for advising!
@ArunGupta-du2de
@ArunGupta-du2de 6 месяцев назад
Excellent Tutorial! Had two conceptual questions: 1) Do you happen to know why the OU process the natural choice to incorporate volatility clustering (what is the connection between mean reversion in OU and the volatility autocorrelation found by Mandelbrot)? Would a simple AR(1) process for volatility work too? 2) Do I understand it right that OU addresses only the volatility clustering property, but not the heavy tails and excess volatility pptys of stock returns? Thanks for any feedback!
@harrystefans9797
@harrystefans9797 2 года назад
Awesome Content dude! Love this channel a lot. Could you consider to make a video related to term structure models?
@QuantPy
@QuantPy 2 года назад
Definitely will get to these videos
@2paccThug
@2paccThug 2 года назад
Can potentially use scoring algorithm to estimate MLE parameters. But great video.
@QuantPy
@QuantPy 2 года назад
Great suggestion, that would be an improvement. Next time I’ll use the fisher scoring algorithm if I’m doing MLE 👍
@alejandrovillalobos1678
@alejandrovillalobos1678 2 года назад
can you explain too me, please, why would you use OU proces to model variance, im not an expert, i just like math and coputer science, i'm been using, garch model to model and forecast variance
@daviddelvalle2458
@daviddelvalle2458 2 месяца назад
OU process is a mean-reverting process commonly used to model processes pulled back towards a central value (like interest rates or a dampened spring)
@malcolmharris7363
@malcolmharris7363 2 месяца назад
Can I ask a serious question? How often are you actually correct with this model? Meaning, how close does the model actually come to accurately measuring realized volatility?
@ar-4775
@ar-4775 Год назад
Why do we square the log returns instead of getting the absolute value?
@DashboardTrader
@DashboardTrader 2 месяца назад
I had this same question. I think square of log returns refers to variance of log returns (ie it is a measure of volatility).
@luketesta7310
@luketesta7310 Год назад
This is literally rocket science
@jonathanbaxter5821
@jonathanbaxter5821 11 месяцев назад
If kappa is significantly different from zero then your daily log returns should be correlated.
@bluebull399
@bluebull399 Год назад
This is super quant stuff. I'm a trader. Look, can you just put a flashing pop up on my screen that says "Buckle up, we're about to get volatile" Can a quant do that? They must be able to if a human brain can do it, right?
@larskuehn2157
@larskuehn2157 9 месяцев назад
Dude, you pronounce all names totally wrong.
@QuantPy
@QuantPy 9 месяцев назад
Thanks, I also struggle in pronouncing peoples names as well - I prefer numbers
Далее
The Magic Formula for Trading Options Risk Free
22:16
Modern Portfolio Theory Explained!
16:31
Просмотров 79 тыс.
The Trillion Dollar Equation
31:22
Просмотров 8 млн
Why Most Trading Strategies are Fake
20:11
Просмотров 46 тыс.