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

[amibroker] BackTesting a Descretionary System



PureBytes Links

Trading Reference Links

Have any of you come up with a convenient and efficient way of testing a manual or descretionary system?
 
This would be one in which you cannot write Buy/Sell rules but rather need to record dates when you "visually" would buy and sell and then turn that into code that the Backtester can process.
 
I have been working with doing such a thing and find it to be extremely awkward.
 
The following works but of course is a bear to set up.
 
 
Buy = IIf(Name()=="WTM25" AND DateNum()==1030319,1, // Buy Long 1
    IIf(Name()=="WTM21" AND DateNum()==1040315,1,0));// Buy Short 1
Sell = IIf(Name()=="WTM25" AND DateNum()==1040315,1, /// Sell Long 1
    IIf(Name()=="WTM21" AND DateNum()==1040528,1,0)); // Sell short 1
Buy = Buy + IIf(Name()=="WTM25" AND DateNum()==1040528,1, // Buy Long 2
    IIf(Name()=="WTM21" AND DateNum()==1040721,1,0)); // B Short 2
Sell = Sell + IIf(Name()=="WTM25" AND DateNum()==1040721,1, // Sell Long 2
    IIf(Name()=="WTM21" AND DateNum()==1040824,1,0)); // Sell S 2
Buy = Buy + IIf(Name()=="WTM25" AND DateNum()==1040824,1, // B Long 3
    IIf(Name()=="WTM21" AND DateNum()==1050209,1,0)); // B Short 3
Sell = Sell + IIf(Name()=="WTM25" AND DateNum()==1050209,1, // Sell Long 3
    IIf(Name()=="WTM21" AND DateNum()==1050519,1,0)); // Sell Short 3
 
(keep adding as many trades as needed)
 
 
This works but is very tedious to set up accurately.  If you mess up the date entry, then of course you get weird trades (no errors but I found it skips trades).  Once done, I did achieve a backtest report with all of the statistics.
 
I am investigating the TJ code for putting descretionary arrows on the screen with a mouse click (seems eash and will put all trades in the correct order) but I have the added complication that I wish to trade from a long only position (the WTM25 symbol above) to a hedged position (the WTM21 symbol above).  I have not figured out how to do that with TJs code (yet).
 
So my question to you all is what, if anything, have you come up with and use to backtest descretionary systems???
 
This could be a very useful topic; I hope you share something.
 
Thanks much,
 
Ken
 
 
 
 
 
 
 
__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___