• TIME TO 2024 UK RANKINGS

  • C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

R: An easy ar()-question

Joined
10/12/11
Messages
28
Points
11
Hi All,
I'm trying to calibrate parametres for an Ornstein-Uhlenbeck model:
dx = h (m - x) dt + s dz,
where
h = speed of reversion
m = long-term equilibrium level
s = volatility

So, I created the following timeseries (data from Yahoo!Finance):

LoL.ts <- ts(LoL, start=c(2012,1), frequency=4)

And then I fitted a ar(1)-model

fit.LoL.ts <- ar(LoL.ts, order=1)

Which yielded the following:

> fit.LoL.ts
Call:
ar(x = LoL.ts, order.max = 1)

Coefficients:
1
0.959

Order selected 1 sigma^2 estimated as 0.1269

And

> fit.LoL.ts$x.mean
V1
3.751205

The way I interpret these results is that:

h = 0.959
m = 3.751205
s^2 = 0.1269

And that would give me the following Ornstein-Uhlenbeck process:

dx = 0.959 * (3.7512 - x) dt + 0.3562dz

Is that correct?

Thanks
 
You need to fit the solution of your 1-lag regression model to the solution of OU SDE (wiki), then match the moments.
 
Back
Top