[R-SIG-Finance] estimating non-linear state space models

Andreas r_sig_finance at greenmail.ch
Thu Jul 24 11:46:15 CEST 2008

I had to clean up my EKF code first, after trying many different ideas I ended up with a huge mess... It's still heavily under development, but I think it could serve as a starting point.


As I wrote before, state estimation seems to run OK given the true parameters.


When I try to estimate the parameters by maximizing the likelihood, I end up with rather random results depending on the initial parameters I start optimizing with.


I don't know if there's an error in the calculation of the likelihood, or if I'm just overstraining the ML-method by estimating model parameters and noise variances at the same time. Is this even possible? Or maybe I'm just expecting too precise results...







Von: Robert Iquiapaza [mailto:rbali at ufmg.br]
Gesendet: Do 24.07.2008 03:21
An: Andreas
Cc: r-sig-finance at stat.math.ethz.ch
Betreff: Re: [R-SIG-Finance] estimating non-linear state space models

Just for those interested. The final version of that paper was published in
Review of Financial Studies 2008 21(1):233-264; doi:10.1093/rfs/hhm049.

Robert Iquiapaza
ri2162 at columbia.edu

From: "Brian G. Peterson" <brian at braverock.com>
Sent: Wednesday, July 23, 2008 10:03 AM
To: "r_sig_finance" <r_sig_finance at greenmail.ch>
Cc: <r-sig-finance at stat.math.ethz.ch>
Subject: Re: [R-SIG-Finance] estimating non-linear state space models

> Andreas wrote:
>> I am trying to estimate the dynamic model for equity fund's alphas and
>> betas described here:
>> http://papers.ssrn.com/sol3/papers.cfm?abstract_id=389740
>> <http://papers.ssrn.com/sol3/papers.cfm?abstract_id=389740>  . The
>> nonlinear state space model is described by equations (6) and (11). (For
>> those in a hurry: The one dimensional state follows an AR1 process. The
>> observation equation has similarities with CAPM, but is extended to
>> depend quadratically on the state)
>> So far I have tried to work with the packages sspir and dse, but they
>> don't seem to support non-linear models. I then tried to implement my own
>> EKF code, it works for state estimation but so far I couldn't get the
>> parameter and variance estimation running reliably.
> You might try posting your code here, and being very specific about what
> help you need.  That way everyone can benefit from an implementation of
> these models in R.
> Regards,
>   - Brian
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20080724/b25169e1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ekf.R
Type: application/octet-stream
Size: 6166 bytes
Desc: ekf.R
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20080724/b25169e1/attachment.obj>

More information about the R-SIG-Finance mailing list