Deadline June

Re: 3 sets of historical data

Adamus these results look encouraging! You should forward test your strategy for a month to see if it matches up with the backtests. What lot size are you using in your testing? How many pairs show positive results over the test period? Looks like you might be into something here....

I'm forward testing it now. I'm using 150K for most pairs, although a couple are 100K and a couple are 200K due to volatility differences.

I think for this period 10 out of 11 pairs were profitable.

There is a lot of hidden risk in there though.

The max drawdown and some other stats are not reported properly in the combined results by NinjaTrader.

Also previous years were not so good.

And I don't remember the biggest loss.

Today during the first week of real-time trading (simulated), the system laid down a new milestone, with a $4000 biggest win on the USDJPY.

Imagine it does that with the biggest loss :eek:

Sorry but I'm a real pessimist in trading. The glass really is half empty sometimes ;)
 
Issues arising from simulation

This week I ran a trading system in simulation on the IB paper trading account with NinjaTrader. It's actually the system I posted the results for above.

There are 2 issues with it that have got me thinking.

(1) It is making profit hand over fist this week. I have to compile the equity curve out of the backtest results but I reckon this is a once every quarter occurence. Do I leave it in simulation for longer until the equity curve shows a 'correction'?

(2) I couldn't find a decent trailing stop exit method that had anything like the kind of profits that the target + stop loss combo provide. Looking at some of these profits on the positions, I realise it would be hard to take to give it all back, but that's the way the system works best - no protection other than the initial stop loss.

I tried all sorts of trailing stop methods but I guess I just didn't have my trading brain in gear because I found nothing that didn't adversely impact the profits too heavily without some other kind of benefit.

EDIT: I actually forgot what my own system does. There's not just the initial stop, there's an exit when the price crosses back over one of the Ducks (the middle one).
 
Last edited:
I don,t think it matters when you start trading your system live, as long as you're happy with the systems performance. (Gained from backtesting and forward testing.) You should already know your system's MaxDD, and margin accordingly.

With any automated system you have to get used to giving a good proportion of your profit back....It goes with the territory. :( I guess it's the price we pay for not having to stare at a screen all day.
 
I don,t think it matters when you start trading your system live, as long as you're happy with the systems performance. (Gained from backtesting and forward testing.) You should already know your system's MaxDD, and margin accordingly.

With any automated system you have to get used to giving a good proportion of your profit back....It goes with the territory. :( I guess it's the price we pay for not having to stare at a screen all day.

Hello Grimes

due to your astoundingly low posting rate here on Trade4Kicks and due to your Dickensian name (as I like to read it) I assume that your posts are all quality, not quantity and I will therefore take what you say to heart.

Despite my history of careful, plodding research and tentative forays into the market, I am now more or less on a make-or-break mission to stay in the game.

"Deadline June" is the title of this thread. It wasn't June 2011 I was talking about.

So I have thrown out my old mentality. I met a wise man and he told me that to learn, I had to think like a beginner. So I am taking the approach of a trading newbie. *

I have done a ton of backtesting in my life, but not on the systems exactly as I've got them now. I've had this current one in simulation for a week and it feels right to me even though it's made anomalously large profits this week, so to hell with corrections, I'll trade it now.

I'm not really happy with the systems' long-term past performance so I'm ignoring it. The closer I look the uglier it gets, but that's the markets I figure. I've never seen a Holy Grail and that's all I'd be happy with. I'm satisfied that I'm taking a risk that's worth taking though. I looked over my past systems and I found one that I ran in 2008/9 in simulation that made £30K but had losing years in its history. I was too worried about that to put it live.

Maybe equity curves are like market charts - the trend is your friend.

* That is a joke by the way. It only works like that when you have a good teacher, and the market is not a good teacher - at least not in sense of keeping her pupils in the game.
 
Last edited:
Dickensian!? I feel like I should reply in Old English with ye and thou everywhere. :)

I'm not sure you should ignore past performance. Maybe you should find out why you had bad performance and work out if those conditions are likely to be repeated anytime soon. In this game past performance is all you can rely on....

With my system I have to tell it where the Support/Resistance boundaries are which keeps me out of too much chop when the market's ranging. Which results in most of my variables being set according to the market conditions. The system has worked as far back as my backtests went (6 years) and I'm hoping it'll work for at least another 6. I don't think any system will work for any length of time without changes to cater for changing market conditions.
 
Dickensian!? I feel like I should reply in Old English with ye and thou everywhere. :)

No way, I don't consider myself particularly literate but I've read some of his novels and it's pretty obvious why Dickens was considered so highly. The main problem with his books is the first 4 or 5 chapters are always just dull and boring because he has to build up all of the dozens of characters his novels always contain. But after you get past that stuff, it's great. Try "Our Mutual Friend". It's all about money, so it might be interesting to a trader purely on that point. And the English isn't far off what we use today. No 'ye' and 'thou'. Alternatively you could watch the film with Anna Friel as Bella. Kultcha, mate, init?

I'm not sure you should ignore past performance. Maybe you should find out why you had bad performance and work out if those conditions are likely to be repeated anytime soon. In this game past performance is all you can rely on....

If I only knew how to analyse backtest results to come up with those kind of answers, I would probably be a zillionaire by now. When I look at the trades on a chart, I just see that they didn't work. I see how the set-up was just what it should have been, but then the market went the other way on a consistent enough basis to trash the PnL for that period. I look at volatility and I see nothing obvious. I look to see if there's some sort of definable choppiness - nothing. I look at Bollinger Bands - nothing. I mean, what does that mean? Why did I have bad performance? I never know.

With my system I have to tell it where the Support/Resistance boundaries are which keeps me out of too much chop when the market's ranging. Which results in most of my variables being set according to the market conditions. The system has worked as far back as my backtests went (6 years) and I'm hoping it'll work for at least another 6. I don't think any system will work for any length of time without changes to cater for changing market conditions.

I remember your thread now about that automated system you're running, with occasional application of some hand-rolled parameter values. Sounds good. How was the last week for you?
 
I've been through your pain! While I was developing my current system there were times when I'd have serious drawdown. I'd have to isolate that period and just look at the chart to see what the market was doing. Was it volatile, ranging, flat, choppy? There was usually a pattern, but sometimes there was nothing special at all and the DD was unavoidable, just the market doing things that my system didn't like. I think every system will have weak points, you just have to do what you can to try to prevent your system from trading during those market conditions (which can be the most difficult thing to do).

This week was one of those weeks where the market was handing out cash. Any forex trader that didn't make money this week should give up. :)
 
If I look at a period of market activity and decide that it's volatile, ranging, flat or choppy, I want to define it somehow and then you're looking at a new filter for the system. Too many of them, I mean maybe even just two of them, and the system ends up curve-fit and fails forward testing.

What I really want to do is build a basic algorithm like the 3Ducks or pivot points and then tweak that in a logical fashion to get it to turn a profit on a consistent basis over 10 years. By 'tweak' I mean changing the core mechanism, i.e. using the average of the high and the close instead of the high and so on.

It just takes a long time and demands so much creativity of thought and some days I can't do it. Anyway, Grimes, thanks for the exchange of ideas.
 
If you look at a period of market activity that causes drawdown (and you'll probably have more than one such period) yes you'll have to define it .... Probably by adding another indicator (which is the time consuming part). Let's say for example that by trial and error you notice that the drawdown occurs whenever the ATR rises above a certain level then you'll add that indicator to your strategy. That's when you backtest again and hope to see an improvement. I agree that adding too many indicators can lead to curve fitting, but I found that I could only find one or two improvements anyway. And those improvements made a big difference. It's really optimisation because you're targeting the weakness in your system as opposed to trying to fit another indicator into the whole strategy that improves the results. The basic strategy should be very simple and the bells and whistles can be added later to improve performance.

It seems like your basic strategy might be sound, but does it have an edge?
 
It seems like your basic strategy might be sound, but does it have an edge?

The one I'm putting live tomorrow has an edge across all 3 historical data sets that I tested it on.

The one I'm trying to get right has an edge on the IB 2009-2010 data, but less of an edge on the FXCM 2005-2010 data, and in fact loses money on the DTC 10 year dataset. It's annoying, because I suspect that the system would be good over 10 years of IB data if only I had it. For 2009-2010 on the DTC data it's considerably worse (but still profitable).

I see what you mean about adding indicators. The way I generate ideas to improve the system is probably grossly inefficient. I just look at a random section of the chart and step through the trades. When I find a loss on a piece of history where I spot something that looks wrong, I see if I can find a way to work that into my system. I sometimes go and look at a particularly bad period of drawdown to see what went wrong but I don't remember coming up with anything consistently that made me think, "this is the way to research it".

Now I describe it, it does seem like an amateurish way of doing it. I guess I should compare periods of profit with drawdowns to see if I can spot some general market characteristics. I always assume anything like that would jump out at me but I never tried verifying that assumption.

To see if an ATR was particularly high, I'd need to plot the ATR on the chart with a fixed scale axis for the whole 10 years I guess. Simple stuff but if I put together a list of the things to check against I guess I'll build myself up a nice little time-consuming To Do list. Maybe I should do this kind of work when I'm not in the creative mood for coming up with new systems.
 
Live again

Fair enough, I understand you've had technical issues. Nonetheless, the original thread title was "Deadline June". I've found it useful to set myself deadlines and to try to get there.. I'm not suggesting for a minute you aren't busting your gut, but when do you think you'll be properly up and running, October?

Put the Three Ducks system live.

Actually, I shouldn't call it the Three Ducks, because I've changed a lot of it. I think a more appropriate name for it would be the "Frankenducks".

Two and a half months overdue is not bad for an IT project, I'd like to point out.
 
Re: Live again

Put the Three Ducks system live.

Actually, I shouldn't call it the Three Ducks, because I've changed a lot of it. I think a more appropriate name for it would be the "Frankenducks".

Two and a half months overdue is not bad for an IT project, I'd like to point out.

If you were working on an IT project for the previous government, you would have been given an MBE for only being 2.5 months late!

Hope everything works well Adam..
 
Past performance is no guarantee of future profits

Here's a couple of the equity curves of all the 11 forex pairs combined as an example of what to expect.

This first one is the backtest using IB data, mid-Sept to end June this year.
 

Attachments

  • MyHTML1.gif
    MyHTML1.gif
    11.9 KB · Views: 141
Re: Past profits are no guarantee of future performance

I was interrupted. I just saw my parents off at the airport for a three month trip to South Africa, starting in Cape Town. It must be nice to be retired - if your body plays along, I guess.

I want to get the equity curves for the backtests ready. In normal circumstances I would have fed the results from NinjaTrader into a hand-rolled Java application I made, but unfortunately I have stuffed it so full of results that something is causing major performance issues and I can't find out what. My choice is either to fix the program and the DB, which I tried already but didn't want to invest more time in, or just to delete the old data and start with a fresh database. The data in there is definitely useful, but not so useful that I couldn't live without it. I'd have to fight against my natural hoarding instincts if I want to delete it.

This morning I'll get the following equity curves up here:

- backtest on 10 years of DTC data
- backtest on 5 years of FXCM data
- backtest on 9 months of IB data
- forward test on 3 months of IB data

So, those first two years in the DTC backtest were bad. Otherwise I guess it would have been too good.

For the record, these results do not include slippage & commission.
 

Attachments

  • MyHTML2.gif
    MyHTML2.gif
    9.8 KB · Views: 135
  • MyHTML1.gif
    MyHTML1.gif
    9.5 KB · Views: 156
  • MyHTML3.gif
    MyHTML3.gif
    10.2 KB · Views: 150
Last edited:
The Forward Test

Here's the equity curve of the forward test.

Again, this is without slippage and commission.
 

Attachments

  • MyHTML10.gif
    MyHTML10.gif
    9.1 KB · Views: 139
Some of the stats for the forward test

This is slight pain in the neck trying to format data to look well presented so this is all I can do. Slight, let me rephrase that: bloody pain in the neck.

I expect to take a hit of around 10 to 25% from this level in live trading, which leaves me with not much after slippage & commission, but still a profit.

Code:
Total Net Profit    $23657.72
Gross Profit        $174038.73
Gross Loss          $-150381.02
Commission          $0.00
Profit Factor       1.16
Cumulative Profit   $904.47
Max. Drawdown       $-6856.01
Sharpe Ratio        0.00

Start Date          26/05/2010
End Date            17/09/2010

Total # of Trades   428
Percent Profitable  28.04%
# of Winning Trades 120
# of Losing Trades  308

Average Trade       $55.28
Average Winning Trad$1450.32
Average Losing Trade$-488.25
Ratio avg. Win / avg2.97

Max. conseq. Winners1
Max. conseq. Losers 4
Largest Winning Trad$9685.87
Largest Losing Trade$-4960.00

# of Trades per Day 3.75
Avg. Time in Market 1.51 days
Avg. Bars in Trade  281.6
Profit per Month    $302.46
Max. Time to Recover56.09 days

Average MAE         $431.91
Average MFE         $1082.21
Average ETD         $1026.94
 
Last edited:
Snowed under

NinjaTrader 7 beta and IB together are just eating up my days. Ironic since I said I was satisfied with the software setup. I guess I'm still OK with it, I haven't got much of an alternative.

I haven't posted here in a while because of that and because I'm not sure it's serving a purpose anymore either.

My current trading status is live since 10 days. A week and a half.

One trading system, based on the 3 Ducks, rechristened the FrankenDucks system. I took the raw 3 Ducks system and coded it up according to Captain Currency's 3 60-period MAs on the 5 min, the 60 min and the 4hour time frame. I added in the turn-around indicator which shows the support and resistance on the 60min timeframe and added a couple more bolts and other body parts taken from the morgue and here we go.

Performance has been pretty good so far, up 13%, so good in fact that I just hope like hell that I don't suffer an equally strong but negative performance before I get some of the other systems up and running to buffer it. Just those backtesting equity curves out and see what happens after 13% rises.

I have to diversify more though, with my current basket of AUDUSD, EURCHF, EURGBP, EURJPY, EURUSD, GBPJPY, GBPUSD, NZDUSD, USDCAD, USDCHF, USDJPY, I have at time had positions on in all of them which puts me heavily at the mercy of the dollar. I need to scale back the position size and add a couple of cross-currencies, if they backtest OK. Easiest would be if IB offered AUX and silver and cash indices, futures would be more difficult with the contracts, and getting historical data would be another hurdle.
 
broker = IB
data = eSignal
software = Amibroker

IB and NinjaTrader combined is a continuing nightmare.

I've almost ditched IQFeed but I'm still keeping it for a while just in case.

I don't like the idea of trading with one broker off the price feed from another provider.

Zenfire have got a great name but don't do forex. Other than that, what else's on offer as far as combined broker + data feed?
 
live trading 2 weeks worth, prelim. check against backtest

Yeah, thanks for replying about the data, unlike disktrading, who, after almost 2 days, still has not replied anything. Maybe they're all on vacation.

Regarding the discrepancy, I don't think it's big. But there is a discrepancy. If an order is triggered even just 2 seconds later, which is the case with my two servers probably, then (on my simple systems) you're going to have that kind of discrepancies: 20% of 1-tick discrepancies and 1% of orders not triggered or going in the opposite direction (long instead of short). So if that's a big discrepancy, which it isn't in my opinion, then you're never going to be happy with any comparison between 2 different sets of data, because when back-testing on 2 different sets of data you're definitely going to have more discrepancies than what you have between two identical servers/platoforms/systems 8000 kilometers away whose orders are triggered or received by IB at a distance of 2 seconds, due to either a different computer clock (which in turn causes different moving averages and prices), or different distance from IB.

If you have a 75% correspondence and if that is the type of matching I said (75% correspondence in profit, or 75% of "same trades in same direction same day...": forget having identical execution prices), then I say be happy with what you got.

Now I've got two weeks of live trading results, simulated trading results and backtesting results to compare.

I guess I have to admit you were totally correct.

Several interesting points came out of the comparison - which I did by eye rather than crunching the numbers, which I might be able to do later if I have the time - or perhaps I'll wait til I've got a month's worth.

The live system occasionally stayed in positions that the simulated and backtested systems exited - and that meant that the latter two systems then went on to do trades which the live system didn't.

I haven't actually seen any opposing trades yet.

The analysis also changes depending on whether you're taking the trade entry date/time or the exit.

The live system had on average worse fills than in simulation on IB. The ones I noticed were generally either just one tick worse, or just disastrously worse e.g. 10 ticks. There may have been more at the 5th digit level, but on the whole the majority were the same, but the differences favoured the simulated system.

Fortunately all systems were more or less in the same area - nothing like the 75%, more like 95% similar.

I can see why the live system is different though. My stop orders were sometimes just not triggered. For instance I had a sell stop in GBPJPY and I watched the bid coming down and go below it, and then the ask went past, down 2 clear ticks, spent about 5 mins below it without filling me and then went back up.
 
Code:
[FONT=Courier New]  
  Instrument    SpreadDisplay
    $AUDCAD          1.5
    $AUDCHF           2
    $AUDJPY           1
    $AUDNZD          1.5
    $AUDUSD           1
    $CADCHF          1.5
    $CADJPY           2
    $CHFJPY          1.5
    $EURAUD          1.5
    $EURCAD          3.5
    $EURCHF           2
    $EURGBP           1
    $EURJPY          1.5
    $EURNZD           5
    $EURSEK          14
    $EURUSD          0.5
    $GBPAUD           2
    $GBPCAD           2
    $GBPCHF           2
    $GBPJPY          2.5
    $GBPNZD           6
    $GBPUSD          1.5
    $NZDCHF           2
    $NZDJPY           2
    $NZDUSD           2
    $USDCAD          1.5
    $USDCHF           1
    $USDJPY          0.5
    $USDSEK          10

[FONT=Arial]
I need some more cross-currencies to keep me from being bludgeoned by the dollar and the yen.

These ticks above are the spreads on IB. The Aussie Dollar is no worse than the sterling. I could take AUDCAD and AUDCHF with those spreads.

The unseen risk is probably the amount of gaps and spikes that appear on those lower volume cross-currencies. But I've already felt that today in the GBP-USD to the tune of 17 pips slippage, which I never thought would happen. I wonder what the slippage on the future would have been.
[/FONT][/FONT]
 
Last edited:
Top