[R-SIG-Finance] Hamilton Filters (and Kalman)

spencerg spencer.graves at prodsyse.com
Tue May 19 18:51:25 CEST 2009

     If you have run "install.packages('RSiteSearch')" recently, I 
suggest you do so.  This will support the following: 

k <- RSiteSearch.function('Kalman')

      This identifies 60 help pages in 19 different packages that 
include the word "Kalman".  Another term for Kalman techniques is 
"dynamic linear models".  We can search for this and combine it with "k" 
as follows: 

dlm <- RSiteSearch.function('dynamic linear model')
dlms <- RSiteSearch.function('dynamic linear models')
# ".. model" and ".. models" may each find things the other misses. 
k. <- k | dlm | dlms

      By default, this sorts the 111 hits to display first the help 
pages in the package with the most hits.  In this case, "cts" appeared 
first with 12 hits, followed by "dlm" with 9.  I'm not familiar with 
"cts", but I've used "dlm".  It includes a vignette that helps someone 
get started.  A more complete description will be available in the 
soon-to-appear Petris, Petrone, and Campagnoli (2009) Dynamic Linear 
Models with R (Springer;  

      "Hamilton Filter" is mentioned in 7 different help page identified 
by the following:      

hf <- RSiteSearch.function('Hamilton Filter')

      Hope this helps. 

Brian G. Peterson wrote:
> after some recent casting about on the several Kalman implementations 
> in R, I suggest you take a close look at FKF:
> http://cran.r-project.org/web/packages/FKF/index.html
> I have no experience with the Hamilton filter.  Please share any code 
> you come up with to implement it with the community.
> Regards,
>  - Brian

More information about the R-SIG-Finance mailing list