Tuesday, June 26, 2007

Quotes for adx users

"In fact as soon as I see a system developer speaking at a seminar about filtering with the ADX indicator, I start to wonder if this guy really knows what he is doing"
This is from "Trading Systems that work" , Thomas Stridsman.

1) "When comparing Figures 2.12 and 2.13, it is interesting to note that inclusion
of ADX resulted in inferior system performance. Although it is impossible
to draw conclusions from a single example, I offer it to readers
here as a caution flag. Just because data vendors or indicator developers
link two studies together does not necessarily mean their combination will
increase profitability."
Richard Weissaman: Mechanical Trading systems.

"Bollinger Bands with ADX Filter
Although I am certain that there are instances in which ADX improves the
performance of trend-following systems, in general I have found greater
success with this indicator as a filter for mean reversion systems. Here we
take the mean reversion Bollinger band system previously used and replace
the 200-day moving average filter with ADX. This removes the directional or
trend-following bias and replaces it with a filter that is intended to ensure a
nontrending market condition."
Richward weissman Mechanical trading systems

Note: Test your systems before u use them :)

Sunday, June 24, 2007

Donchian 20 day breakout Trading system with code

//License agreement for the code:
//You may freely redistribute this code in unmodified form.
//If you do make a profit using this code then you promise to donate the first
//500 rs to a charity for children.
//If you choose to redistribute a modified version of the code code
//then you must remove the license agreement from
//the code.
//The ideas here are not unique, they are simply a merger of Donchian breakouts with
//gann position sizing.
//gann says do NOT risk > 10% on a single position.
//donchian=20Day channel defines the trend.
//Important point: if you bet all your capital on individual breakouts you will go
//broke. Remember : diversification/risk management is important in the markets
//Copyright: Niftytraders
//Email: niftytradersinc@yahoo.com

Buy=C>Ref(HHV(H,20),-1);
Sell=Crisk=C/LLV(L,20);
SetPositionSize(risk/10*100,spsPercentOfEquity);

Here are the returns for a donchian 20 day breakout system with 10% risk per trade.. tested from 1994 to current.
Statistics
All trades Long trades Short trades
Initial capital 100000.00 100000.00 100000.00
Ending capital 2315906.21 2315906.21 100000.00
Net Profit 2215906.21 2215906.21 0.00
Net Profit % 2215.91 % 2215.91 % 0.00 %
Exposure % 85.30 % 85.30 % 0.00 %
Net Risk Adjusted Return % 2597.82 % 2597.82 % N/A
Annual Return % 28.22 % 28.22 % 0.00 %
Risk Adjusted Return % 33.08 % 33.08 % N/A

This is with brokerage of 0.2% per leg.
You can test with any setting you like up till 0.8% per leg
annual returns should remain > 20%
The testing was done on stocks from the futures segment from 1994-current
(reason for limited testing is that not all my spot data is split adjusted/bonus adjusted but my fno data is clean)

The big issue with donchian breakouts is that drawdowns are huge...
The max drawdown for this system is as high as 50%.
Hence trade at your own risk.