Optimisation - Is it a fallacy? - page 2

 
The point here is getting small number of pips. Use basic technical analysis (ex. MAs cross) in 30M chart and you are guaranteed 10 pips /day.

Here is the thing. Is it hard to get 4 (including 2 pips spread) pips/day? There is NO candle in a daily chart that has a wick smaller than 4 pips. Trade 50% of your account with 4 guaranteed pips and you will get to the same result above. I don't think you need stoploss with a target of 4 pips/day!!

What I meant is technical analysis is gorgeous when you look at it in the chart, and it gives you the feeling of your ability to "maximize" your profit. But in reality, it is not.
In other words, use the lowest GUARANTEED pips possible of the technical analysis, and don't use the "maximum" possible result of the technical analysis.

 
I did some testing with MA-crossing. I calculated a list of long MA's and short MA's, that gave the best results in a month (with a simple system, buy when the short crosses the long one, and vice versa). There are always a lot of them that give a good result in a month. Then I took those values and tested them in the next month. The results were that there was no correlation between the results in the previous month and the next month. So for those MA-crossings, it seems to me that it is useless to look at the past.
 
On only one months data, all you will get is curve fitting.
 
Hi,

Great to see I'm not the only one having these problems! And thanks "ebtafollower" for that link, book suggestion etc. Interesting article, that link . I also looked up the book on Amazon but it appears to be unavailable. There is however, another book with the same title, supposedly written by "Wiley" which I presume is actually a book publisher. Maybe they did a reprint and called it their own?

Anyway, to add to the debate, I thought I'd try the following. To further test the idea that throwing more data at it should make a trading system more robust (i. e. less curve fitting), I configured my optimser to use 6.5 years of EURUSD, GBPUSD and USDCHF hourly data - i.e 20.5 years of hourly data. Before you all say "you can't do that with the MetaTrader optimiser", I say that I can do it with MY optimisor. I've written my own simulator, optimiser etc (I found the MetaTrader one too restrictive and too slow) which, as well as allowing you to use multiple currency pairs as part of the optimisation, also spreads the job over multiple computers, thereby greatly increasing speed. I know this sounds like a sales pitch but this software is definitely NOT for sale!

So, to get back to the story, I've optimised a trading system for 20+ years of 1 hour, 3 currency pair data. It completed nearly 4000 trades over the in-sample time period and made a theoretical 360% profit. I then threw some out-of-sample data at the resulting trading system and this time I actually got some reasonable profit - especially from GBPUSD-H1. The profits on the other 2 currency pairs weren't particularly convincing but at least they didn't loose money (see the results below).

So the next experiment is to optimise using several different data sets (i.e. data from different providers) for one specific currency pair. I don't know if you guys have noticed that a trading system optimised on one data set for a specific time period will more often than not, break even or loose money on another data set for the same currency pair, even when the same time period as the original optimisation is used?


======= Results ============
In Sample (1999.1.1 - 2005.6.1)
TOTAL of EURUSD-H1 GBPUSD-H1 USDCHF-H1

startingAccountBalance: 100000
currentAccountBalance: 460656
grossProfit: 1815827
grossLoss: -1455171
netProfit: 360656
numTotalTrades: 3933
numWinningTrades: 1493
numLosingTrades: 2419
numBreakEvenTrades: 21
largestWinningTrade: 28875
largestLosingTrade: -1419
absoluteDrawdown: 0
maxDrawdown: -17305
fitness: 360655
maxConsecutiveWinners: 9
maxConsecutiveLosers: 14
maxConsecutiveProfit: 28875
maxConsecutiveLoss: -9348


EURUSD
startingAccountBalance: 100000
currentAccountBalance: 206707
grossProfit: 535771
grossLoss: -429064
netProfit: 106707
numTotalTrades: 1193
numWinningTrades: 469
numLosingTrades: 715
numBreakEvenTrades: 9
largestWinningTrade: 8512
largestLosingTrade: -1419
absoluteDrawdown: 0
maxDrawdown: -17152
fitness: 106706
maxConsecutiveWinners: 9
maxConsecutiveLosers: 14
maxConsecutiveProfit: 13654
maxConsecutiveLoss: -9348

GBPUSD
startingAccountBalance: 100000
currentAccountBalance: 165351
grossProfit: 595770
grossLoss: -530419
netProfit: 65351
numTotalTrades: 1383
numWinningTrades: 510
numLosingTrades: 867
numBreakEvenTrades: 6
largestWinningTrade: 9027
largestLosingTrade: -1050
absoluteDrawdown: 0
maxDrawdown: -17305
fitness: 65350
maxConsecutiveWinners: 7
maxConsecutiveLosers: 13
maxConsecutiveProfit: 15372
maxConsecutiveLoss: -9192


USDCHF
startingAccountBalance: 100000
currentAccountBalance: 288598
grossProfit: 684286
grossLoss: -495688
netProfit: 188598
numTotalTrades: 1357
numWinningTrades: 514
numLosingTrades: 837
numBreakEvenTrades: 6
largestWinningTrade: 28875
largestLosingTrade: -1045
absoluteDrawdown: 0
maxDrawdown: -14454
fitness: 188597
maxConsecutiveWinners: 7
maxConsecutiveLosers: 11
maxConsecutiveProfit: 28875
maxConsecutiveLoss: -7166




Out of Sample (2005.6.1 - 2007.2.1)
EURUSD
startingAccountBalance: 100000
currentAccountBalance: 114018
grossProfit: 129681
grossLoss: -115663
netProfit: 14018
numTotalTrades: 302
numWinningTrades: 116
numLosingTrades: 184
numBreakEvenTrades: 2
largestWinningTrade: 7950
largestLosingTrade: -1036
absoluteDrawdown: 0
maxDrawdown: -18845
fitness: 14018.000000000002
maxConsecutiveWinners: 5
maxConsecutiveLosers: 11
maxConsecutiveProfit: 11727
maxConsecutiveLoss: -6646


GBPUSD
startingAccountBalance: 100000
currentAccountBalance: 145275
grossProfit: 162523
grossLoss: -117248
netProfit: 45275
numTotalTrades: 302
numWinningTrades: 108
numLosingTrades: 194
numBreakEvenTrades: 0
largestWinningTrade: 10900
largestLosingTrade: -1050
absoluteDrawdown: 0
maxDrawdown: -9526
fitness: 45275.000000000044
maxConsecutiveWinners: 5
maxConsecutiveLosers: 9
maxConsecutiveProfit: 13480
maxConsecutiveLoss: -5382

USDCHF
startingAccountBalance: 100000
currentAccountBalance: 105289
grossProfit: 130745
grossLoss: -125456
netProfit: 5289
numTotalTrades: 295
numWinningTrades: 98
numLosingTrades: 196
numBreakEvenTrades: 1
largestWinningTrade: 11397
largestLosingTrade: -1027
absoluteDrawdown: 0
maxDrawdown: -13249
fitness: 5289.000000000649
maxConsecutiveWinners: 4
maxConsecutiveLosers: 15
maxConsecutiveProfit: 13067
maxConsecutiveLoss: -10234
 
Craig66:
On only one months data, all you will get is curve fitting.

It wers 15-minutes data.
 
The answer remains the same, it's pretty easy to curve fit years of data, let alone a months worth.
 
Craig66:
The answer remains the same, it's pretty easy to curve fit years of data, let alone a months worth.

My idea was that if MA-crosses have some predictable value, the best MA-cross in one month should be better than average in the next month.
With the best MA-cross I mean the 2 values for a short and long MA, that give the most profit in a month.
 
Afraid it's a nice theory Jos, but I'm beginning to think that pretty much all of these indicators don't really have any predictive value - i.e. everyone is following the same vapour-dream. Maybe in the old days, when volatility was a lot less, they may have. But as I've said above, I've carried out optimisations using years of data, using a variety of indicators and trading styles (also trading styles using the same idea as yours - i.e. taking small profits) and haven't got anywhere with it. You're welcome to try of course but I think what you'll find is exactly as Craig said - you're essentially curve fitting noise... and noise is a random thing. ...
 
So, there's a lot of talk in here about what doesn't work, and why - what actually does work?

The more I read, the more it sounds like the general consensus is that this is largely an exercise in futility.
 
I think the process of working out what does work is elminating what does not, forget indicators, they are useless.
What works for me is swing trading long timeframes, but the way I do this is almost impossible to program, things that humans take for granted (e.g. telling the difference between a Cat & a Dog, simple pattern recognition) are allmost impossible for computers. Take even the simple task of defining a trend using an EA, it's impossible to do with any real success, indicators may go up while the price makes lower lows.
One approach is Neural Networks, this is based on the (flawed in my estimation) assumption that there is a hidden pattern in the data, people throw untold processing power at these problems to remain barely profitable (witness this months currency trader magazine), one can't help but think the guy would have had more success swing trading the monthly charts. Anyway...I think truly profitable automated trading may still be somewhat of a pipe dream due to the fact that it is almost impossible to reduce to algorithms even the simplest decision that a human may make, but I don't discount there may be yet fresh approaches to the problem which await to be discovered.
Reason: