[R-SIG-Finance] Cox, Ingersoll, Ross/Vasicek parameter estimation via Kalman-Filter (SSPIR)

Brian G. Peterson brian at braverock.com
Fri Apr 27 03:53:39 CEST 2007


On Thursday 26 April 2007 17:02, Arne Krombach wrote:
> I am trying to estimate the parameters for a CIR 1-/2-/3-Factor model
> via Kalman filtering. The idea was to do it via the package SSPIR, but
> I have problems to transform the CIR state space form into the SSPIR
> syntax. Actually, I am not quite sure if this is possible at all.
>
> Did anybody already realise a CIR/Vasicek -parameter estimation via R?
>
> To get an idea how a CIR-1-factor state space form looks like (Y=
> vector of zerobond-yields with the maturities tau at month t):
>
> Y(t,tau)= ( -1/tau * log A(tau) ) + (1/tau * B(tau) * x(t) + e
>
> Where :
>
> A(tau) = [(2 * h * e^( a + lambda + h) * tau/2) / (2 * h + (a + lambda
> + h) * (e^(tau * h) - 1)] ^(2 * b/ sigma^2)
>
> B(tau) = [(2 * (e^(tau * h)  -1)) / 2 * h + (a + lambda + h) * (e^(tau
> * h) - 1)]
>
> h = sqrt[(a + lambda)^2 + 2*sigma^2]
>
> which means that, besides the time varying factor x, the parameters a,
> b, sigma, and lambda have to be estimated via Kalman filtering.
>
> Is it possible to implement this in SSPIR? If you have any other
> suggests or if you already implement comparable models in R, I would be
> very grateful for your help.

I've previously used the sde package to model CIR and Vasicek processes 
for term structure problems:

http://cran.r-project.org/doc/packages/sde.pdf

Regards,

   - Brian

-- 
773-459-4973 mobile
http://braverock.com/brian/resume-quant.pdf



More information about the R-SIG-Finance mailing list