[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Re: Rules Management for Trading System (Kalman filter article)



PureBytes Links

Trading Reference Links


Hi Marco,

I finally found that article on an backup CD of yonder years,
luckily the CD still works!  I've added a new page on our web site
where I make the Kalman stuff available.  Go to

    http://www.ferra4models.com

and select the 'Models' section.  There is a subsection named
'Kalman filter' from which you can download the article.

We also wrote quite a technical working paper on variable parameter
models (which uses Kalman filters extensively), but I could not find
an electronic copy on my PC.  Must be on some CD somewhere....  It
was published in the SEE journal, but will also be presented in
Texas somewhere in June (I am co-author, and not really that much up
to date with these details....)  I'll upload a copy of that to this
same page at some stage in the future - maybe.....

Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://www.ferra4models.com
http://fun.ferra4models.com 





--- In equismetastock@xxxxxxxxxxxxxxx, khamsina11 <Khamsina11@xxxx> wrote:
> 
> Hi MG,
> 
> Thanks in advance ! :)
> 
> Regards,
> 
> Marco
> 
> 
> MG Ferreira a écrit :
> 
> >Hi there,
> >
> >I am working on it - sort of.  Years ago I wrote an introductory
> >article on the Kalman filter.  It was never finished or published and
> >has a few known bugs in it, but was later on bought by a trader who
> >wanted to get to know the Kalman filter!  I've upgraded computers so
> >many times since I fear the piece may be lost somewhere in digital
> >oblivion, but will upload it somewhere as soon as I find it.  It gives
> >a market oriented intro to the Kalman filter, all the formulas and a
> >few examples.
> >
> >Regards
> >MG Ferreira
> >TsaTsa EOD Programmer and trading model builder
> >http://www.ferra4models.com
> >http://fun.ferra4models.com 
> >
> >
> >
> >--- In equismetastock@xxxxxxxxxxxxxxx, khamsina11 <Khamsina11@xxxx>
wrote:
> >  
> >
> >>Hi MG,
> >>
> >>Might you post a MS code of the Kalman filter ?
> >>
> >>Regards,
> >>
> >>Marco
> >>
> >>
> >>
> >>MG Ferreira a écrit :
> >>
> >>    
> >>
> >>>Just note!  The stuff I gave is not the 'official' Kalman filter
> >>>and will probably be frowned upon by say a NASA engineer.  But it
> >>>is something similar and we use such devices in our own work.  We
> >>>sometimes also smooth the weights, so that one formula
> >>>
> >>>   w1 = w1 + ...
> >>>
> >>>becomes
> >>>
> >>>   w1 = 0.9 * w1 + 0.1 * ( w1 + ... )
> >>>
> >>>and we play around with the 0.9 amd 0.1  They should always sum to
> >>>1, and the higher the 0.9, the more smooth the weights will be.  This
> >>>is just an exponential moving average....
> >>>
> >>>For the rest, see below.
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>>>I am interested on Kalman filter too, in term of training periods
> >>>>for the net, do you have any suggestion on how to determine the
> >>>>length of periods? If the period is too long, then could it be 
> >>>>overtrained? If I can determine it, then the periods for rescaling 
> >>>>based on HHV(Abs(S),periods) could be found, will it be a good 
> >>>>approach?
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>OK, we are not really training a net here, and even if we were, it
> >>>is arbitrary.  Also see my comment on the next one.  I suggest you
> >>>plot your indicator and visually inspect it.  If it makes cycles,
> >>>see how long it takes to make one full cycle.  Hopefully it is not
> >>>several years, but say 1 or 0.5 years.  Then pick a period that will
> >>>contain three of the previous cycles, say 3 or 1.5 years, and use
> >>>that.  This is a long time, but we are only using it in the
rescaling,
> >>>so it should not be too much of a problem.
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>>>I remember someone mentioned the ratio for period between training
> >>>>and out of sample should be following
> >>>>Training periods: 8
> >>>>Out of Sample periods: 1
> >>>>But he never mentioned about the rationale, and used it as a rule of
> >>>>thumb, do you have any idea?
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>This is arbitrary.  A real good, theoretical way to do this, is to
> >>>split the sample in ten periods.  Then randomly choose 9, train it
> >>>on those 9, and test it on the rest.  Now choose randomly a different
> >>>9 sections, train and test on the remaining 1 and so on.  It takes
> >>>forever to do something like this and we've used it only rarely, but
> >>>it will make your Prof very happy!  We more often use 20, 10 or even
> >>>the last 5%, depending on the length of data.  The more data we have,
> >>>the more we can cut off to test on.  But it is arbitrary.  Again,
> >>>eyeball the data, and if it has a nice, complete cycle or two in the
> >>>last say 10%, then you can use that to test and you will get a good
> >>>feel for how it will do in real life.
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>>>According to your Message 16564, I have search for Woodes Rogers on
> >>>>library and amazon, and found a book called "The speculative
> >>>>strategist", which did mention about Woodes Rogers' approach, but it
> >>>>is too brief, does it the one you read?
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>That is the book!
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>>>I think I need a few days to digest Kalman filter and to do some
> >>>>coding on it, and will reply to this topic soon under the same
> >>>>subject title
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>Again, those formulas may have bugs in them.  So rather try to graph
> >>>the ideas they embody and then you can use them as guides to
implement
> >>>your own.  I look forward to hear from you!
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>>>Thank you :>
> >>>>Eric
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>No problem!
> >>>
> >>>Regards
> >>>MG Ferreira
> >>>TsaTsa EOD Programmer and trading model builder
> >>>http://www.ferra4models.com
> >>>http://fun.ferra4models.com 
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>Yahoo! Groups Links
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >
> >
> >
> >
> >
> >
> > 
> >Yahoo! Groups Links
> >
> >
> >
> > 
> >
> >
> >
> >
> >  
> >





------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/