Deadline June

more pure mechanical trading research

My process of creating workable trading systems generally follows the following path, as it is following now with NinjaTrader and before with TradeStation and Java.

(1) Find an idea somehow - normally while trying to improve another system. Looking at the price action around the trades in a backtest resultset gives me a ton of ideas, mostly useless but occasionally decent. E.g. yesterday I was looking at GBP-USD 30 min bars and they were going all in one direction for 5 or 6 bars, and then consolidating and chopping around, and then going on another run - sometimes in the same direction, sometimes the opposite. So I figured I needed to see what the average number of consecutive days in one direction was, and when it averages more than 2, I should just enter in that direction after one bar and try to scalp a bar of points, exiting at the end of the bar.

(2) I wrote an indicator to average the number of consecutive bars in the same direction. Long and short.

(3) I tried it out on GBP-USD, EUR-USD and JPY-USD. Useless! It doesn't cover transaction costs which on entries and exits @market could be 4 ticks per round-turn easily compared to the historical data.

(4) Started tweaking it. I made the entries on a limit just below the previous bar's close, and the exits on a bracketed pair either side of the close, so only a 1/3 of the executions would be a stop and so slippage would be less.

(5) Added filters to it, e.g. entering only on the 3rd bar of the run, not the second, or only when a volatility indicator is relatively low.

(6) The more I do this, the higher I get the average profit per trade and the closer to the magic $10 dollars which would make me happy (after transaction costs of $25) - 10 is double figures, you see - but the system makes fewer trades of course. I start off at 18 trades per day but -$20, and by the time I have managed to raise the dollars per trade up to around $0 the number of trades per day has fallen to about 0.1 or 0.2 and the equity curve looks more like a seismograph than a nice account balance.

Plus of course at that point the danger of curve fitting rears it ugly head, so I have to make sure I've got out-of-sample data or other markets to test it on when I think it's ready.

So that's where I am now. I've researched the consecutive trades idea into the ground and I'm looking for the next bright idea, so I figured I'd write about it here and let some inspiration come out of the woodwork while I write. I guess I'll go back to the charts where the consecutive runs idea was actually a bad idea, and see whether I can see a better way of doing it.
 
Try to keep your degrees of freedom to a minimum. There's a big difference between optimisation and curve fitting.

Every one optimises, even the most "discretionary" traders (e.g. how much do you bet.. is that a total guess? If not, you're optimising)

Curve fitting is adding additional filters on top of filters to cater for specific episodes in the past. I try to keep degrees of freedom to 6 or 7 (total number of variable that can be altered).

As Larry Hite said "you can make a lot of money from an imperfect system".
 
Yes, I'm always slightly surprised when I discover I've curve fit a system. I do it all the time. I guess I justify everything to myself whenever I add something new to a system, and make it sound rational and robust, when of course in reality I lost perspective.
 
Hi Adaums,

Maybe you have good reason to be looking at 30min bars etc... But looking at a TF of this length makes it so much harder to achieve your goals. If you moved to a suitably longer TF, the implication of transaction costs and slippage become almost irrelevant. Then you can focus on the rules/implementation of your system.

R
 
You'll know when you've discovered a good system because it will probably be very simple and it'll show a profit even without any optimisation. Test your strategy on 8 - 10 different markets. If if doesn't show a positive result for more than half of them then bin it and try another method. Don't waist your time optimising something that has no hope.
 
I agree in part with that, if you have to start adding loads of filters to show a ''profit'' then you are probably polishing turds...
 
I know the pros with the deep pockets prefer the daily time frame but I've got nowt but a few thrupenny bits to rub together and I can't take the drawdown. With the bigger daily range you might get bigger profits and can afford to ignore slippage, but you get bigger drawdowns that would wipe me out.

I hope I've got slippage under control - time will tell.

As for "polishing turds", please! This is the Holy Grail you're talking about :jester:

I wish I discovered a system which just hits all the tick boxes straight off. I've been in the situation where I've had mediocre system after mediocre system sitting there on the screen without hope of getting a long term profit out of it, and I've probably gone on to curve fit most of them.

That's the natural last step before I consign it to the wastebin. And normally the longest and most frustrating.

Larry_Hite said:
You can make a lot of money from an imperfect system.

Interesting quote, but I'm not sure if he's being superficial or serious. All systems are imperfect because there is no Holy Grail, but what is imperfect? One of the major imperfections of most of the systems that I come up with is that they're not profitable. I defy Larry Hite to make much of any of them.

But presumably he and you mean something else - what? Take my situation at the moment.

I have a trading system that shows the following stats:

Code:
[FONT="Courier New"]
Lot Size			100,000
Total Net Profit		$5877.00
Gross Profit		$86229.00
Gross Loss			$-80352.00
Commission		$15103.00
Profit Factor		1.07
Cumulative Profit	$591.55
Max. Drawdown		$-2418.18
Sharpe Ratio		0.02
Start Date			01/01/2008
End Date			30/03/2010
Total # of Trades	1154
Percent Profitable	53.81%
# of Winning Trades	621
# of Losing Trades	533
Average Trade		$5.09
Average Winning Trade	$138.86
Average Losing Trade	$-150.75
Ratio avg. Win / avg. Loss	0.92
	
Max. conseq. Winners	5
Max. conseq. Losers	4
Largest Winning Trade	$1895.00
Largest Losing Trade	$-2090.00
	
# of Trades per Day	1.41
Avg. Time in Market	61.1 min
Avg. Bars in Trade	1.0
Profit per Month	$22.41
[/FONT]

Look at it. I pay more in commission than I make in profit ($14 round turn*) plus it's got 1 tick slippage per round turn.

This is the long half of the system. The short side is actually more profitable. I developed it on GBP, EUR & Yen vs Dollar 2008 - 2010 and then just ran it on a basket of ten pairs (e.g. Aussie, Swissie, CAD & EUR, Yen & £ crosses) and the profits held up.

So what would Larry Hite do? Trade it or go back to the drawing board? Wrack his brains trying to swap out a filter for a better one?

* I pay $4 commission per 100,000 but NinjaTrader won't let me put slippage on limit orders so I put an extra tick slippage onto the commission as a work-around.
 
Last edited:
He just means that trying to find the Holy Polystyrene Cup is pointless, partly because it's not there but also because you can make money from something which is far from perfect.

If you're trading off one minute bars, I'd be amazed if you found something reliable, simply because there is so much noise at that level. Off a 1hr bar, more likely. Daily bar you'll definitely find something, so my advice would be to look between 2-4hr bars.
 
.... but also because you can make money from something which is far from perfect.

But still what is far from perfect, if it's not unprofitable? What does he mean? Big drawdowns?

I'm only trading off 1 min bars for the exits as a secondary time frame.

The entries and the trailing stops are based on 60min bars and when it's time to get out, I put on a 6 tick bracketed OCO limit and stop to exit on a 1 min time frame, which allows the system to work out whether the limit or the stop get hit first. Over the long run it's 50:50 but without the 1 min timeframe NinjaTrader would always take the pessimistic outcome and fill the backtest exits on the stop and never give me the limit.
 
''I know the pros with the deep pockets prefer the daily time frame but I've got nowt but a few thrupenny bits to rub together and I can't take the drawdown. With the bigger daily range you might get bigger profits and can afford to ignore slippage, but you get bigger drawdowns that would wipe me out.''

......................................................................................................

I don't accept that.

I assume you have a problem with position with position sizing because you are restricted by the minimum size of the contracts in the markets you are trading?

If you traded using just EoD data, you would only need to look at the chart once per day so there would be no need to run it fully automated. You could pull the trigger yourself and monitor the trade EoD.

If you did this then there is no reason that I can see of why you couldn't Spread-bet (or similar) where you can trade a much smaller size therefore implement the correct position sizing for your account size.

Trading EoD just gets rid of so many problem associated with execution and costs when it comes to mechanical systems.

R
 
If you traded using just EoD data, you would only need to look at the chart once per day so there would be no need to run it fully automated. You could pull the trigger yourself and monitor the trade EoD.

You are talking about mechanical systems right? Not discretionary?

I can't see any advantage to pulling the trigger manually. Why program a system and then not automate it? Or are you saying that manual trading has less slippage?
 
I am talking about mechanical systems.

My point was not that it better to enter manually. My point was that to discard using a potentially easier (longer) TF because of ''larger draw-downs'' is in my opinion not a good decision.

I was simply suggesting a way of getting around the ''larger draw-downs'' by using a broker that doesn't require you to trade so large. And if this broker doesn't support automated trading is it really a big deal to spend a few minuets per day (EoD) entering any trades manually?

R
 
Perhaps you have experience of spreadbetting - I don't but I heard that the spreads and the carry charges are considerably more than with a broker like IB. So that in effect brings back the transaction costs issue.

The way I see it there is just no way around it.
 
I'll take some advice and move my time frame up to 120min bars. I've got some underperforming trend-following systems which might do better.
 
Perhaps you have experience of spreadbetting - I don't but I heard that the spreads and the carry charges are considerably more than with a broker like IB. So that in effect brings back the transaction costs issue.

The way I see it there is just no way around it.

Of course the charges will be more, they have to make a buck or two don't they? But it certainly doesn't bring back the transaction costs issue because on a longer TF these costs mean very very little. They don't bare any weight on the outcome of the system.
 
To cut to the chase, what level of profit are you talking about that fits your strategy? What kind of drawdown do you suffer? How many markets do you diversify into to achieve that?

The only stuff I found on EOD data with long term profitability had so much drawdown, I would have to diversify into more markets than my account would allow.
 
I'm not sure what you mean in the first part of your post? DD is something I look at per market in an individual basis, as is profit. Maybe if you were able to trade a smaller size you could cope with the draw-down and move into enough markets so that DD was not so much of a problem.

It was just a suggestion mate, it wasn't meant to drag out for 6 posts...

If you think you are better off using a shorter TF then that's what you should do. But at the same time, don't discard any TF because of something as trivial as minimum trade sizes. There will always be someone willing to let you trade at a size you need.
 
Last edited:
Perhaps you have experience of spreadbetting - I don't but I heard that the spreads and the carry charges are considerably more than with a broker like IB. So that in effect brings back the transaction costs issue.

The way I see it there is just no way around it.

If you trade spot on IB, the roll charges are the same as IG, believe it or not.

E.g. let's say you're long EUR 100,000/USD. Then on your EUR account, you earn LIBOR-0.5 = zero. On your USD account (where you are overdrawn), you pay LIBOR+2 pct = 2.5 pct. Thus your annual roll charge for this position is nearly 3 pct.

In fact, that's worse than IG!
 
Please don't give up on communicating - I've been branded since school as a poor communicator and sometimes it takes a soapbox and a megaphone to get through to me.

I really appreciate that people try to tell me stuff, but all too often I end up thinking I'm talking a different language.

I tried to find something with EOD data that suited my requirements and I searched a lot further than I have done up til now with tickdata, and perhaps if I could set up an account to trade EOD with spreadbetting brokers, but I got the overwhelming impression that it's just not worth it. The spreads, the slippage, the delayed data, the carry charges, taking out your stops, not covering all the futures markets you want etc etc....

But you said before that's not the case - or rather, that these are irrelevant when you have a robust EOD system - presumably a LTTF system?
 
Well, there is something in between 10 minutes and a day, you're right to start looking at 120mins.

Make the system simple.. try a breakout system with a trailing stop (on a 2hr bar). You might get decent results. Your win ratio will be less than 50 pct but that's not material.
 
Top