Pairs Trading: The Ornstein-Uhlenbeck Process and Pairs Ratio Determination

  Рет қаралды 4,970

Kevin Mooney

Kevin Mooney

Күн бұрын

In this video, we continue going over some of the material in the book Optimal Mean Reversion Trading: Mathematical Analysis And Practical Applications by Tim Siu-tang Leung, Xin Li. Continuing with what we have done previously, we will use maximum likelihood estimation to estimate the Ornstein-Uhlenbeck parameters. This will be in the context of pairs trading, so we will extend what we’ve done to estimate the optimal share ratio that comprises the pair.
Previous videos in this series:
What is a pairs trade: • What is a Pairs Trade?
Maximum Likelihood Estimation with Ornstein-Uhlenbeck (part 1): • Maximum Likelihood Est...
Maximum Likelihood Estimation with Ornstein-Uhlenbeck (part 2)
: • Maximum Likelihood Est...
Tip Jar: paypal.me/kpmo...

Пікірлер: 21
@xelhaku
@xelhaku 2 жыл бұрын
Thanks!
@ranjansingh9972
@ranjansingh9972 2 жыл бұрын
This is brilliant content - well done!
@gouki1001
@gouki1001 11 ай бұрын
You said that this is a "computationally inefficient" way to do this. Do you have a decent/standard way to find the dollar value of the weights?
@rich5034
@rich5034 3 жыл бұрын
Thanks for sharing.
@fostergeoff
@fostergeoff 3 жыл бұрын
Great work
@jbthabest
@jbthabest Жыл бұрын
Hi Kevin, I keep getting the error "Series object has no attribute 'to_numpy' " for the line of code ------ GLD ['Adj Close'].to_numpy(). Any clue how to fix this error?
@kpmooney
@kpmooney Жыл бұрын
How are you importing the data? What does type(GLD['Adj Close']) return?
@jbthabest
@jbthabest Жыл бұрын
@@kpmooney I imported the data using the file location on my computer, which seemed to work fine. I checked the data type and it says class ‘pandas.core.series.Series’
@brendanlydon5272
@brendanlydon5272 2 жыл бұрын
Curious as to where I could find your video on optimal stoping?
@kpmooney
@kpmooney 2 жыл бұрын
It hasn't come out yet. Trying to figure out how to present it as the book is just page after page of math.
@FreeMarketSwine
@FreeMarketSwine 2 жыл бұрын
​@@kpmooney Would love to see that!
@MikeMane
@MikeMane Жыл бұрын
@@kpmooney Hey Kevin, did you manage to get this done I am looking forward to this lecture :)
@brendanlydon5272
@brendanlydon5272 2 жыл бұрын
Videos are awesome
@YannickvDijk
@YannickvDijk Жыл бұрын
Thank you for going through the process in this depth. The value for dt seems to be completely irrelevant for the resulting ratio. I assume this is only the case when the datapoints are sampled equidistant. If one would have a look at intraday datapoints across multiple days, would you still say that the value of dt can be assumed constant (for example 1-minute timeframe) and thus can be disregarded?
@kpmooney
@kpmooney Жыл бұрын
Yes, it assumes constant time steps. You can adjust for non-uniform spacing easily enough, but I don't know the best way to handle large breaks in time, i.e. minute time steps during the day followed by an overnight session with no data.
@YannickvDijk
@YannickvDijk Жыл бұрын
@@kpmooney Thank you for your prompt response! What I read online is that the breaks may cause jumps that can in turn influence the calibration process quite severely. One more question arose during the implementation; how would you decide on which stock to fix (or pick as A). I tried based on either larger/smaller mean and standard deviation, but this does not lead to a stable process (e.g. some "optimal" ratios for pairs are larger than 1, meaning that the A/B should be flipped as I reckon). Is there a metric for this? Or should one simply try and adjust accordingly?
@lapapanitel.7995
@lapapanitel.7995 9 ай бұрын
Hi how can we get the notebook?
@kpmooney
@kpmooney 9 ай бұрын
There's a link in the description to the notebook on Github.
@rohinthakur9995
@rohinthakur9995 3 жыл бұрын
A GOOD DAY TRADING SYSTEM written by a well known indian research analyst Rohin Thakur, is one of the best books written on day trading. There are some grammatical errors in the book but it contains alot of knowledge.
@jeremykaaria6023
@jeremykaaria6023 2 жыл бұрын
The full formula for term when calculating parameters is a little hidden off screen - i saw: term = Xxy - 2*np.exp(-mu0*dt)*Xxy + np.exp(-2*mu0*dt) * Xxx - 2*theta0*(1-np.exp(-mu0*dt)) * (Xy...
@kpmooney
@kpmooney 2 жыл бұрын
The equations and code are available in at Github linked to in the description.
Quant Strategy: Pairs Trading Algorithm (Mean Reversion)
15:00
Spencer Pao
Рет қаралды 63 М.
Trading stock volatility with the Ornstein-Uhlenbeck process
21:35
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 13 МЛН
Всё пошло не по плану 😮
00:36
Miracle
Рет қаралды 3,4 МЛН
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 13 МЛН
The Key Equation Behind Probability
26:24
Artem Kirsanov
Рет қаралды 127 М.
Maximum Likelihood Estimation (Part 1)
16:27
Kevin Mooney
Рет қаралды 8 М.
What P vs NP is actually about
17:58
Polylog
Рет қаралды 114 М.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 340 М.
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 13 МЛН