Australian (ASX) Stock Market Forum

Drawdowns

I just want to say a big THANK YOU to all the contributors to (especially) this thread and also the "system robustness" thread.

When i start these types of threads, its the thoughts and insights from top experienced traders like Nick, tech/a, Stevo that im looking for, and iv got that in spades. Im also very lucky to have got some input from famous authors and big money managers from the States.

When i become one of the great ones, i will be sending a big cheque to Joe saying thank you for bringing all these talented people together on this board.
 
I just want to say a big THANK YOU to all the contributors to (especially) this thread and also the "system robustness" thread.

When i start these types of threads, its the thoughts and insights from top experienced traders like Nick, tech/a, Stevo that im looking for, and iv got that in spades. Im also very lucky to have got some input from famous authors and big money managers from the States.

When i become one of the great ones, i will be sending a big cheque to Joe saying thank you for bringing all these talented people together on this board.

Second that, interesting discussions going on around here, but we can all see that eventually, one will have to agree to disagree on a certain topic. :)
 
Please post up this almost non failure system,Must admit Ive never seen one which takes a random exit and a dart board entry which makes a profit.

You've got to look in order to find :) This is not futures remember, most agree that over time the stock market has an upward tending bias, particularly in the last 10 or so years on the ASX, just being in the market seems to have been enough. I'm sure you know some people in your peer group who marvel at how well their buy & hold super fund is doing.


or is this an hypothesis you have?

You have amibroker which apparently can do random entry and exit please show me.Take out the Entry and exit code and run the rest.If it outperforms any varifyable systems I know of then I'll shout the bar!
If T/T doesnt out perform it I'll shout it twice!

I ran TT over 10 years worth of data that I have. 1/1/97 until 1/1/2007, CAGR and Max DD were 39.8% and 50.7% respectively, there were 123 trades taken. I ran the random entry/exit system over the same data. The first three runs exhibited a CAGR on the high side of 34%. The fourth run had a CAGR of 44.6% and a Max DD of 52.7%, there were 224 trades taken.

If you are shouting, must we also drink that Westend sh1te they serve up over there? I prefer Coopers, thanks.
 
You've got to look in order to find :) This is not futures remember, most agree that over time the stock market has an upward tending bias, particularly in the last 10 or so years on the ASX, just being in the market seems to have been enough. I'm sure you know some people in your peer group who marvel at how well their buy & hold super fund is doing.

Wouldnt say marvel but happy.

I ran TT over 10 years worth of data that I have. 1/1/97 until 1/1/2007, CAGR and Max DD were 39.8% and 50.7% respectively, there were 123 trades taken. I ran the random entry/exit system over the same data. The first three runs exhibited a CAGR on the high side of 34%. The fourth run had a CAGR of 44.6% and a Max DD of 52.7%, there were 224 trades taken.

I'm very interested in these results.
Id like you to run the Culled BT margin list I use.If your willing Id like to email you the list.
Then Id like to see the Montecarlo results of both T/T and the Random entry exit method.

I'll also see if I can find another person with Amibroker/Tradesim combo to corroberate findings.

If you are shouting, must we also drink that Westend sh1te they serve up over there? I prefer Coopers, thanks.

So do most of us.
Pale OK?
 
I ran TT over 10 years worth of data that I have. 1/1/97 until 1/1/2007, CAGR and Max DD were 39.8% and 50.7% respectively, there were 123 trades taken. I ran the random entry/exit system over the same data. The first three runs exhibited a CAGR on the high side of 34%. The fourth run had a CAGR of 44.6% and a Max DD of 52.7%, there were 224 trades taken.

Why do you even bother with 3 or 4 runs ASX.G ?

Nowhere near being statistically significant. The next 4 runs of random entry/exit could easily be negative.

Thats the whole reason i got tradesim.
 
You've got to look in order to find :) This is not
I ran TT over 10 years worth of data that I have. 1/1/97 until 1/1/2007, CAGR and Max DD were 39.8% and 50.7% respectively, there were 123 trades taken. I ran the random entry/exit system over the same data. The first three runs exhibited a CAGR on the high side of 34%. The fourth run had a CAGR of 44.6% and a Max DD of 52.7%, there were 224 trades taken.

I get pretty different results, I ran it from 1/1/97 till today, I used the following to match up with TT's average of around 50 bars hold. I ran both the random and TTs 50 times.

Random code below and results attached.

TimeFrameSet(inDaily);
Loop = Optimize("Loop", 1, 1, 50, 1);

SetOption("MaxOpenPositions", 10 );
SetOption("InitialEquity", 100000 );
SetTradeDelays( 1, 1, 1, 1 ); /* delay entry/exit by one bar */

PositionSize = -10; // always invest only 10% of the current Equity

Buy=Random()*100 > 95; // 5% chance of entry
Sell=Random()*100 > 98; // 2% chance of exit
 

Attachments

  • Random vs TT.xls
    52 KB · Views: 11
Perhaps something else to consider, see as we've touched on psychology, is Profit Factor. Drawdown can define risk but Profit Factor can define comfort level. Finding a suitable method to one's personality is important but so is the comfort of actually trading it. I would assume that if one feel comfort in applying the signals then they'll stay with it for long haul.

Personally I think 2.0 is the minimum for most traders, although those with thicker skin may go for a lower score so long as trade frequency is high enough.
 
Below are TradeSim monte carlo analysis results for a random entry and random exit system.

5% chance of entering on any given bar.
2% chance of exiting on any given bar.

Data from 1-1-1997 until 1-1-2007.

No initial stop loss used.

20000 simulations completed to give a statistically significant outcome.


Monte Carlo Report

Trade Database Filename
C:\TradeSimData\RandomEntryAndExit.trb

Simulation Summary
Simulation Date: 10/09/2007
Simulation Time: 12:57:00 PM
Simulation Duration: 721.91 seconds

Trade Parameters
Initial Capital: $100,000.00
Portfolio Limit: 100.00%
Maximum number of open positions: 100
Position Size Model: Equal Percent Units
Trade Size (% of total cap): 10.00%
Pyramid profits: No
Transaction cost (Trade Entry): $44.00
Transaction cost (Trade Exit): $44.00
Margin Requirement: 100.00%
Magnify Position Size(& Risk) according to Margin Req: No
Margin Requirement Daily Interest Rate (Long Trades): 0.0000%
Margin Requirement Yearly Interest Rate (Long Trades): 0.0000%
Margin Requirement Daily Interest Rate (Short Trades): 0.0000%
Margin Requirement Yearly Interest Rate (Short Trades): 0.0000%

Trade Preferences
Trading Instrument: Stocks
Break Even Trades: Process separately
Trade Position Type: Process all trades
Entry Order Type: Default Order
Exit Order Type: Default Order
Minimum Trade Size: $500.00
Accept Partial Trades: No
Volume Filter: Ignore Volume Information
Pyramid Trades: No
Use Level Zero trades only: Yes

Simulation Stats
Number of trade simulations: 20000
Trades processed per simulation: 38493
Maximum Number of Trades Executed: 479
Average Number of Trades Executed: 359
Minimum Number of Trades Executed: 188
Standard Deviation: 29.03

Profit Stats
Maximum Profit: $20,568,383.91 (20568.38%)
Average Profit: $252,371.84 (252.37%)
Minimum Profit: -$96,587.26 (-96.59%)
Standard Deviation: $1,549,289.02 (1549.29%)
Probability of Profit: 81.61%
Probability of Loss: 18.39%


Percent Winning Trade Stats
Maximum percentage of winning trades: 52.92%
Average percentage of winning trades: 42.67%
Minimum percentage of winning trades: 23.08%
Standard Deviation: 3.17%

Percent Losing Trade Stats
Maximum percentage of losing trades: 76.92%
Average percentage of losing Trades: 57.33%
Minimum percentage of losing trades: 47.08%
Standard Deviation: 3.17%

Average Relative Dollar Drawdown Stats
Maximum of the Average Relative Dollar Drawdown: $4,166.64
Average of the Average Relative Dollar Drawdown: $1,867.08
Minimum of the Average Relative Dollar Drawdown: $957.16
Standard Deviation: $334.33

Average Relative Percent Drawdown Stats
Maximum of the Average Relative Percent Drawdown: 8.1761%
Average of the Average Relative Percent Drawdown: 1.9270%
Minimum of the Average Relative Percent Drawdown: 0.5482%
Standard Deviation: 0.6308%

Maximum Peak-to-Valley Dollar Drawdown Stats
Maximum Absolute Dollar Drawdown: $151,569.61
Average Absolute Dollar Drawdown: $60,828.24
Minimum Absolute Dollar Drawdown: $17,817.55
Standard Deviation: $16,754.15

Maximum Peak-to-Valley Percent Drawdown Stats
Maximum Absolute Percent Drawdown: 96.6537%
Average Absolute Percent Drawdown: 49.8063%
Minimum Absolute Percent Drawdown: 7.2538%
Standard Deviation: 15.5731%
 
Annualised the average profit is 9.68%.
Over the same period the market returned 8.84%.

So we can conclude that yes, random entry and random exit, did beat the market.

Also note that TT doesnt perform wonderfully over the whole market. No dramas because it wasnt designed to trade the whole market. Rather the BT margin list. The realtime results have been very impressive.
 
Well from 1992-2002 random entry and random exit would have, on average over 20,000 possible combinations, returned -45%, and from the 20,000, probability of loss was 84%.

Market returned about 100%.

Just for the purposes of comparison.
 
I took Buggalugs random & TT Amibroker above runs and put them into my Monte Carlo spreadsheet. I find it easier to look at a graph than I do numbers.

Profit factor results are also shown.

Obviously the results for random and TT will vary considerably depending on the database selected for testing, the position sizing strategy, the start and end dates and the randomising method chosen - to mention the one's that come readily to mind.

stevo
 

Attachments

  • Monte Random.xls
    93.5 KB · Views: 19
  • Monte Carlo TT.xls
    98 KB · Views: 15
This is all very interesting.
Didnt know you could do random entry AND exit with Tradesim. Nizar you have taught me something.

The whole idea is to test the T/T conditions only minus the entry and exit.
SO
Position size 10% of capital
Stop 10% of initial purchase price.
Starting capital $100,000
Set margin at 40%
Min order 10
Pyramid profits.

Thanks to those taking the time on this.
Its only curiosity on my part.
 
Looks like a slight skew to the right for the profit factor using TT rather than random. That would also fit that we'd never probably trade a random system with any conviction.

Here is something else to think about. Systems will shows periods of acceleration and deceleration during different market conditions. For example my trend following system is generating a lot more signals over the last 15-months than what it normally does. This stands to reason basis the market conditions. However, the annual return has also accelerated away from the long term mean (currently running at 60% vs. 28%). I view this as a good sign in that it's generating more trade frequency in favorable periods. In order to generate the average it will obviously revert back below the mean in worse times, that is, generating less signals which again I view as a positive.
 
Just to recap this thread before it got derailed.

Earlier on there was a request by Nick Radge for Howard to look at TechTrader, seconded by tech/a. There has been a lot of talk over the past months about understanding 'why' a system works. I have felt there has been a lot of repetition of this message without any actual answers and lots of delivery of this paraphrased message from tech/a saying, "it's not that hard people, look at me, I'm just a builder and I managed to become a successful system designer, here's some bank details so you can all see how successful I am".

No-one actually critiqued TT with the seemingly elusive answers to this , WHY question?

So a little while ago, before this thread got onto the track that its now on, I asked the question: in this market ('96 -> '06), how lucky or unlucky can a trader actually be? The summary of the conclusion is: not that unlucky...and providing you create some basic parameters for your trading, the probabilities of being unlucky drastically decrease.

My initial study created a system with the following parameters:

# Universe of shares, the current All Ords lists minus listed trusts, > 3 letter tickers etc. (I've since added about 100 delisted and non-XAO shares to try to counter what everyone keeps telling me is start-date bias, so I can't reproduce this study with my current list...tech/a, would love to do it with the BT300 list!)
# 10 years of test data from 1/1/96 until 31/12/06.
# Each test was conducted with 2500 runs to raise statistical significance. More would have been better, but system execution is slow due to the way the Amibroker code had to be implemented and in any case relatively smooth distributions were still apparent with this small number.
# A randomised start date was generated for each run of between 21 and 60 days delay from the 1st of January 1996. This was done so as to reduce start date bias.
# Subsequent new trades were delayed by a random number of bars between 1 and 20. This was also to reduce the effects of having the system load up too rapidly, which would introduce another kind of start date bias.
# Each position was held for a random number of days between 20 and 120 bars (1 to 6 months, approximately).
# Maximum concurrent open positions were only limited by available equity.
# Position size was randomised to be between 5% and 50% of total equity. This was to simulate a punter who did not practice diversification.
# Commissions were included.
# No margin was used.
# The TT > $500k moneyflow filter was used.
# From memory the < $10 price filter was in there too.

The original question was: can a random entry/exit system outperform TT? The answer is, yes! There is an overlap in CAGR in the Monte Carlo distribution of TT and this system. But given the above set of parameters the overlap represents a relative handful of runs...regardless, there are certainly paths through the data which beat it (Coopers Pale is a top drop, so yes, gladly :) ).

Next phases of the testing added these components:

# Position size restricted to 10% of equity.
# As above, with a 10% stoploss.
# As above, with a ROC filter.

Position sizing increased CAGR, decreased Max DD and bunched both distributions. A 10% stoploss decreased CAGR, massively improved Max DD and substantially bunched the Max DD distribution. Adding the ROC filter increased CAGR again, reduced Max DD and bunched both even further.

This is a really, really simple system. Distribution histograms can be seen here:


http://theasxgorilla.blogspot.com/2007/08/2500.html


It can be argued that these distributions are more representative of the market conditions than a TradeSim Monte Carlo run on TT for the reasons Curtis Faith describes when talking about the limitations of Monte Carlo runs that breakup the sequence of big market events like the Asian crisis and 9/11.

So, to try to come full circle back to where this got derailed and answer the question WHY does TT work exactly as it has during the single run documented?

* Start date bias
* Leveraged exposure to a strong and protracted bull market
* Non-cap-weighted exposure to the market leading to index out-performance
* Price filter encourages taking positions in what are likely to be lower liquidity issues with inherently greater growth potential
* The entry trigger has an edge that improves entry efficiency (or whatever you want to call it). So fewer breakouts ought to be false breakouts...reducing the number of initial stops being hit.

* Discretionary entry trigger over-ride may have added some performance edge

Those points in bold are validated by the random entry/exit study, IMO. I haven't included a point about the exits here, for a few of reasons. One, based on the study I tend to agree with what Curtis Faith discovered when he tested a time-based exit: simple exits are over-rated. Two, a 180-day EMA is not a particularly sophisticated exit, so I don't believe it provides much of an edge. Three, tech/a, you turned the system off yourself before trailing stops were enacted using this exit, which suggests to me that you don't even trust this part of the system.

Nizar, thanks for your wise question about statistical relevance. My advice, don't just ask this question when token data is used to disprove something, also ask when it's being used to prove something. Suckers buy black box systems this way too.

There is a lot of one sided thought around this subject on this forum for obvious reasons: those making the "for" points have a tendency to talk the most. I don't mind playing devils advocate and representing a more balanced view...even though in the background I could well be creating TechTrader3, aka. Revenge of the Long Term Long Only Stock Trend Following System.

In the meantime, it's hole-digging time...I wasn't joking you know:

:pesok:

ASX.G
 
Looks like a slight skew to the right for the profit factor using TT rather than random. That would also fit that we'd never probably trade a random system with any conviction.

Exactly!

I didn't say anyone could/would actually trade a random/entry exit system :) Some of the high CAGR runs required 70% drawdowns to achieve...ouch.
 
This is all very interesting.
Didnt know you could do random entry AND exit with Tradesim. Nizar you have taught me something.

For once!!

EntryTrigger:=ExtFml( "TradeSim.Rand")<0.05;

EntryPrice:=OPEN;
ExitTrigger:= ExtFml( "TradeSim.Rand")<0.02;

ExitPrice:=OPEN;

5% chance of entering on a given bar.
2% chance of exiting on a given bar.
As per specifications set by Buggalug.
 
Well thanks for all your work ASX.
There are also paths within the MonteCarlo testing which beat the T/T live traded.But hey youve proved your point and after so much work,not even considering the number of holes you have dug,I'll be more than happy to ship a couple of cartons of Coopers pale to you with my compliments.
Just private mail me an address and it will be done----enjoy.

I lookforward to checking your blog over the next 5 yrs to see how the random portfolio is performing.If you decide to forward test it.
I'm sure that I will learn a lot from it as time rolls by as I will from the continuation of T/T on its thread.
 
Just to recap this thread before it got derailed.

Earlier on there was a request by Nick Radge for Howard to look at TechTrader, seconded by tech/a. There has been a lot of talk over the past months about understanding 'why' a system works. I have felt there has been a lot of repetition of this message without any actual answers and lots of delivery of this paraphrased message from tech/a saying, "it's not that hard people, look at me, I'm just a builder and I managed to become a successful system designer, here's some bank details so you can all see how successful I am".

No-one actually critiqued TT with the seemingly elusive answers to this , WHY question?



ASX.G

Oops. I missed this. Is there a listing of the TechTrader code handy?

Thanks,
Howard
 
As posted by tech/a on the "TradeSim" thread on this board a few weeks ago.

TechTrader
Ent:= Cross(H,Ref(HHV(H,10),-1)) AND H>Mov(C,40,E) AND HHVBars(H,70)=0
AND Fml("Liquidity")>500000 AND C>O AND C<10.00;
Ent;

EntryTrigger:=Ent;

EntryPrice:=OPEN;
ExitTrigger:= Cross(Ref(Mov(L,180,E),-1),C);

ExitPrice:=OPEN;

InitialStop:=If(Ref(C,-1)>0.90*EntryPrice,0.90*EntryPrice,Ref(C,-1));
ExtFml( "Tradesim.Initialize") ;

ExtFml( "Tradesim.EnableDelayOfEntryByOneBar") ;
ExtFml( "TradeSim.EnableTradePyramiding", percentprofit,10,3);

ExtFml( "TradeSim.SetReturnInfoType", AllTriggers);

ExtFml("Tradesim.EnableDelayOfAllExitsByOneBar");
ExtFml( "Tradesim.EnableProtectiveStop",1) ;

ExtFml("Tradesim.SetStartRecordDate",1,09,1998);
ExtFml("Tradesim.SetStopRecordDate",19,05,2006);


ExtFml( "TradeSim.RecordTrades",
"TT Master",
LONG,
EntryTrigger,
EntryPrice,
InitialStop,
ExitTrigger,
ExitPrice,
START);
 
AFL code:

// techtrader v2 amibroker version
// here we define buy conditions and name each one as a variable
PositionSize = -10; // always invest only 10% of the current Equity
cond1=Cross(H,Ref(HHV(H,10),-1)); // when todays high crosses last highest high over the last 10 periods
cond2=H > EMA(C,40); // todays high is greater than the 40 day Exp MA of closes
cond3=HHVBars(H,70) == 0; // todays high is the highest for 70 periods
cond4=EMA(V*C,21) > 500000; // ensure at least $500k of money flow
cond5=C < 10.00; // only trading in stocks less than $10
cond6=C > O; // todays close higher than open

// the following line is the trigger if all conditions satisfied
Buy=cond1 AND cond2 AND cond3 AND cond4 AND cond5 AND cond6;

// here we define variables used once in the trade
ApplyStop( stopTypeLoss, stopModePercent, amount=10 );
Sell= Cross(Ref(EMA(L,180),-1),C); // close crosses below yesterdays average of the low
// here we define what gets displayed on the chart
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy , colorYellow, colorRed ), 0, IIf( Buy , Low, High));

Filter = Buy; // lists exploration results conforming to our buy criteria
AddColumn(Buy, "buy", 1.0); //
 
Top