Displaying 1 result from an estimated 1 matches for "n4637271".
Did you mean:
  n4632471
  
2012 Jul 20
1
fitting Ornstein-Uhlenbeck process by MAXIMUM LIKELYHOOD
Dear friends
i am trying to fit an Ornstein-Uhlenbeck process by MAXIMUM LIKELYHOOD
method.
i found these formulas on
http://www.sitmo.com/article/calibrating-the-ornstein-uhlenbeck-model/
this is the mean-reverting process 
http://r.789695.n4.nabble.com/file/n4637271/process.txt process.txt 
and this is the script that i am using.......
ouFit.ML=function(spread) { 
  n=length(spread)
  delta=n/n 
  Sx=sum(spread[1:n-1]) 
  Sy=sum(spread[2:n])
  Sxx=(Sx)^2
  Syy=(Sy)^2
  Sxy=Sx*Sy
  mu = (Sy*Sxx - Sx*Sxy) / ( n*(Sxx - Sxy) - (Sx^2 - Sx*Sy) )
  lambda = -log( (...