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

[amibroker] introducing probability factor to signals



PureBytes Links

Trading Reference Links

in a report at this site:
http://web.mit.edu/newsoffice/tt/1998/may20/leighton.html
was written:

"Even if the past is not correlated with the future, the past can be 
combined with randomness to provide a very good prediction of future 
performance," Professor Leighton said. "The intuition that past 
winners are likely to be future winners can be used as the basis for 
a successful strategy, even though the intuition is not precisely 
correct."

To simulate the described behaviour i wrote some code (below) which 
reduced exposure and increased RAR but had little effect on drawdown. 
The absence of an appreciable effect on drawdown somewhat surprised 
me.

(the code has effect of putting you out of the market to the extent 
that the hurdle filter is increased & some stocks that would have 
traded, don't).
================================================================
/*your buy/sell system goes here*/
Filter=Buy OR Sell;
E = Equity();
ppcbuy=ValueWhen(Buy,E);
ppcSell=ValueWhen(Sell,E);
profit=ppcbuy<ppcsell;
loss=NOT profit;
tprofit=Cum(profit);
tloss=Cum(Loss);
Hurdle=Random(1);//filter 
dice=Optimize("dice",.65,.25,.75,.1);
throw=dice>Hurdle;
//z=desired win rate
z=Optimize("z",.75,.45,.75,.025);
Buy=Buy AND ((rate=tprofit/(tprofit+tloss+1))>z AND throw);
AddColumn(tprofit,"profit");
AddColumn(tloss,"loss");
AddColumn(rate,"rate"); 

  


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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