Serving the Quantitative Finance Community

 
User avatar
asd
Topic Author
Posts: 17
Joined: August 15th, 2002, 9:50 pm

Free source code for Kalman filtering

October 21st, 2003, 6:00 am

Is there an free source code available for Kalman filtering, especially in VBA?Thanks,asd
 
User avatar
robertral
Posts: 0
Joined: March 6th, 2003, 7:12 am

Free source code for Kalman filtering

October 21st, 2003, 1:32 pm

I wrote a Kalman filter program in MatLab for my MSc. I've just gone through it and it's really dodgey in parts. He he he he I can see where I 'made' bits up just to beef up the amount of code just to make it look like I've done the work Paul
 
User avatar
Athletico
Posts: 14
Joined: January 7th, 2002, 4:17 pm

Free source code for Kalman filtering

October 22nd, 2003, 4:23 pm

For a free matlab tool, you might be interested in this: KalmtoolI've never seen a kalman filter implementation in VBA, but if you have matlab then you might try leveraging the com object it exposes ... you can use it in VBA by clicking Tools | References ... and look for the Matlab Automation Server type library.Then you can write VBA like this:Dim appSet app = CreateObject("Matlab.Application")app.Execute("<some valid matlab expression>")Other methods offer matrix input/output to and from the matlab engine.Disclaimer: I use Matlab v6.0 ... your mileage may vary w/a diff't version.
 
User avatar
EdeS
Posts: 2
Joined: March 18th, 2002, 12:12 am

Free source code for Kalman filtering

October 22nd, 2003, 7:48 pm

Would this code can be called a 'Kalman-Filter'?input: K1(.003), BP(range);VARS: Pred( BP ), Smooth(0), Velo(0), DeltaK(0);{ Loop for every interval }DeltaK = BP - Pred;Smooth = Pred + DeltaK* SquareRoot( k1*2 ) ;Velo= Velo + (k1*Deltak) ;Pred = Smooth + Velo ;Plot1(Pred[1], "KF pred");Plot2(BP);
 
User avatar
asd
Topic Author
Posts: 17
Joined: August 15th, 2002, 9:50 pm

Free source code for Kalman filtering

October 22nd, 2003, 10:34 pm

Robertral, Athletico and EdeS, Thanks a lot for your help! However, I don't have MATLAB but only Octave/Borland C++/Quantlib. I tried to download Bayes++ , but this has some painful compiling problem needing to download jam,etc. which itself is a seperate project - in the end I read that it is not compatible even with VC++ 6.0 . Please tell if you find any links to Kalman software using octave/ other GNU library.Regards,asd
Last edited by asd on October 22nd, 2003, 10:00 pm, edited 1 time in total.
 
User avatar
Athletico
Posts: 14
Joined: January 7th, 2002, 4:17 pm

Free source code for Kalman filtering

October 23rd, 2003, 1:13 am

you might find something useful at sourceforge: GNU Octave Repositoryi just glanced at the Control Theory part of the octave-forge package and it looks like there are some kalman filtering routines in there.
 
User avatar
asd
Topic Author
Posts: 17
Joined: August 15th, 2002, 9:50 pm

Free source code for Kalman filtering

October 23rd, 2003, 6:15 pm

Athletico, Thanks a lot ! I was hunting around everywhere, and did not know it was there in the Octave library.Regards,asd
 
User avatar
asd
Topic Author
Posts: 17
Joined: August 15th, 2002, 9:50 pm

Free source code for Kalman filtering

November 14th, 2003, 7:35 pm

Is there any example code/demo of Kalman filter usage in finance, in any language?Thanks!