Skip to content
Prev 14143 / 15274 Next

Estimating a one-factor model using the DLM package

ce
Not sure what you want to do but dlmMLE function would estimate some parameters to start, and dlmFilter and dlmForecast would predict expected values. DLM would need some study . 
Documents in https://cran.r-project.org/package=dlm are a good start , also the book "Dynamic Linear Models with R",  ISBN 978-0-387-77237-0 e-ISBN 978-0-387-77238-7

-----Original Message-----
From: "Hannu Kahra" [hkahra at gmail.com]
Date: 02/05/2017 11:19 AM
To: r-sig-finance at r-project.org
Subject: [R-SIG-Finance] Estimating a one-factor model using the DLM package

Hi,

I am trying to estimate a one-factor model of the spread y(t) between two
interest rates

y(t) = a + b*s(t) + u(t)
s(t) = c*s(t-1) + v(t)

using the DLM package in R. Is it possible to estimate the parameters a, b,
c, and var(u(t)). Var(v(t)) = 1.

I have EViews code for that and I want to replicate it using R.

Hannu


_______________________________________________
R-SIG-Finance at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.