Deadline June

Thanks for not having me killed. I appreciate. At the moment my only mortal enemy is vito.
 
Re: the Saviour system - how robust are parameters and conditions?

The meat of the algorithm that I haven't really changed in 5 days of work consists of two things - filters and a trigger.

The main filters are MA trend filters, using 3 MAs - short, medium and long. For a long trade, the short must be either below the medium and catching up, or above the medium and pulling further away. The same for the medium vs the long. So that's two filters. I haven't really played around with the MA lengths much or tried optimising them - I just use 3 Fibonacci series numbers.

What I want to check for robustness is the third filter - currently the ADX set to the same period length as the shortest MA.

Secondly part of the core system is the trigger - I enter at the market when the price crosses the short MA (assuming the filters allow it). Not exactly inventive, I know. More KISS.

I also want to do a full check of the profit and loss on different time frames. I wrote the system using 55 min bars, but I'd like to see its performance against minutes/bar - jagged seismograph or nice little up and down plot? It should be easy enough to pump out the stats for 10, 15, 30, 45, 60, 75, 90, 120, 240, daily. I've already done a quick check and it doesn't look good.

Further, a check on the ADX filter with period length. Then using the same period length, I should check out further strength filters, such as RAVI and anything else that comes to mind. At the moment nothing else comes to mind but a google search should turn up some useful possibilities.

The exit mechanism is very simple, I'm just using fixed targets and stop losses. I set the stop 2 ATRs away - where the ATR is the 100 bar average on the current time frame - and the target is 6 ATRs away.

I have no concept of how the trades look in real time as I do for the live system, but I guess I run the NinjaTrader simulator to get a grasp on it and see how the exit mechanism can be improved. I tried a trailing stop and the raw performance was far worse.

But initially I can do robustness tests on the fixed distances of the stops & targets.
 
Last edited:
Thanks, and in the same way I would spare you and even Brettus.

I only read your two journals and that JahDave's. I have a habit of picking out talent. I'm not sure what Travis's is yet. I think your life should be turned into a version of Curb your Enthusiasm. Thanks for keeping me alive btw.
 
Yeah, first hand experience is more reliable. No academic bull****.
 
Saviour: first PNL result set

HTML:
Instrument	PF		Avg Trd	Total Net	Max. DD	Trds	% Profit	Avg Win	Avg Loss	Max Loss	Avg Win/Loss	Avg MFE
$AUDJPY_DTC	0.81		-60.24	-6325.00	-7580.00	105	21.0%	1208.18	-396.45	-930.00	3.05		518.29
$AUDUSD_DTC	1.84		164.06	14765.00	-2770.00	90	36.7%	980.91	-308.86	-565.00	3.18		567.22
$CHFJPY_DTC	1.05		12.19	1365.00	-6605.00	112	25.9%	1071.72	-358.01	-580.00	2.99		466.79
$EURCHF_DTC	1.12		39.33	4090.00	-6315.00	104	27.9%	1275.52	-438.67	-660.00	2.91		645.48
$EURGBP_DTC	0.76		-49.02	-4755.00	-5250.00	97	20.6%	752.25	-257.14	-345.00	2.93		349.12
$EURJPY_DTC	1.64		227.22	14315.00	-7690.00	63	31.7%	1833.00	-519.65	-750.00	3.53		930.00
$EURUSD_DTC	1.19		53.55	4070.00	-4185.00	76	28.9%	1178.18	-404.63	-600.00	2.91		579.21
$GBPCHF_DTC	1.07		46.47	5205.00	-18275.00	112	26.8%	2762.00	-947.01	-1660.00	2.92		1329.91
$GBPJPY_DTC	1.14		85.46	8290.00	-13685.00	97	28.9%	2339.46	-829.20	-1440.00	2.82		1321.19
$GBPUSD_DTC	1.57		189.62	17635.00	-4185.00	93	34.4%	1517.34	-506.89	-680.00	2.99		839.41
$USDCAD_DTC	1.41		108.53	10310.00	-5130.00	95	31.6%	1172.00	-382.31	-615.00	3.07		582.95
$USDCHF_DTC	1.51		171.41	14570.00	-4180.00	85	31.8%	1600.00	-493.62	-820.00	3.24		816.35
$USDJPY_DTC	1.00		0.05  	 5.00 	-7765.00	100	25.0%	1252.20	-417.33	-595.00	3.00		567.05
COMBINED 	1.20		67.97	83540.00	-7433.77	1229	28.2%	1473.29	-484.91	-1660.00	3.04		730.68

Obviously this is just the poor NinjaTrader supposed portfolio combined output, but NinjaTrader doesn't do any portfolio calculations, it just averages or sums the columns - so max drawdown and anything remotely useful like Sharpe Ratio are invalid.

These are the results I get after manually playing with all the different parameters and conditions as I outlined in the posts above. Considering how much I played around with it, my guess is that it's probably already considerably optimised and I don't want to overdo the process and curve fit the system.

Before I do the robustness tests, I need to go over the Checklist for Good Systems and straight away I see I've invented a system that only makes $60 per month with a bet size of $100K and all 13 instruments combined.

OK I need to look at the frequency of the trades - obviously 1000 over an 8.5 year period is not enough. It might prove robust but the risk to get that profit isn't worth it - and I need to look at the individual profitability per trade.

So back to tinkering.

I'm testing the first idea that came into my head regarding the small profits. The target is simply too close - 6 45 min ATRs away from the entry. So I just launched an optimisation - from 6 to 20 ATRs for the target.

I already know however that there's a big problem with having a huge target - I tried it already with a previous incarnation of the 3 Ducks system. When the target is miles away from the entry and the stop is also fixed, that means the risk is huge when the price is almost at the target - the distance to the stop is a mammoth risk. I think I'll ignore that at the moment.
 
Last edited:
Massive optimisation

I'm prepared to admit upfront without any further investigation that this profit and loss result set is over-optimised and curve-fit, but I found something that I'm having problems comprehending.

I optimised both the fixed target and the fixed stop independently.

Most of the instruments came back with predictable best values e.g. 5 ATRs target / 2 ATRs stop or 7/3. This makes sense - the target is further than the stop.

But three of the forex pairs - EUR/GBP, EUR/CHF and CHF/JPY have the opposite - 2 ATRs target / 6 ATRs stop.

I can't work out why it would be like that. I'm going to do the washing up and think about it.
 
The hardest thing

I just experienced the most difficult 60 minutes of my trading career, although I guess if I had decided the other way, I wouldn't have thought it was difficult.

I realised I had to reduce my leverage on the TurningPoints system I'm running, trading it on 21 forex pairs. It was trading 100K positions, and I knew I had to reduce it but I didn't want to. I really didn't want to.

It was logical to reduce my position size because after a mediocre December, withdrawing my living expenses and then taking a battering on Friday, my equity fell below £30K sterling and another couple of bad weeks at this leverage would take me down to the system stop-out level at £20K.

Since I've got a couple of systems in the pipeline and putting them live would require me to reduce my leverage all round anyway, it should be a no-brainer but it wasn't. I kept thinking, it's going to go well now and the equity will climb back up so I should leave it as it is.

How difficult can it be to understand? But something somewhere in my head was not listening. The decision was simple - what do I have to gain by leaving the leverage as it is at $100K per position? An unknown x thousand dollars. What do I have to lose by leaving it at $100K? A career and a dream and ten thousand dollars.

Although I've now reduced my leverage to $50K per position and I should be happy that I overcame my avarice, I'm not happy because the final reason why I decided to reduce it rather than leave it is that I noticed I'd just lost $500. Considering the minute-by-minute variation of the equity with 10 positions at $100K per position could easily reach $500, that means I was only helped at the last minute by my own cowardice.

What a fantastic trader.
 
Last edited:
Saviour: second PnL result set

I still can't get the T2W forum wysiwyg editor to post columns properly - the columns in the posts above might look good to some browsers but on my other machine it looks hopeless. So here's the summary stats from the last run I did on the 2000-2008 data for 13 pairs:

Total Net Profit $166055.00
Gross Profit $2011105.00
Gross Loss $-1845050.00
Commission $0.00
Profit Factor 1.09
Cumulative Profit $13231.90
Max. Drawdown $-11315.01
Sharpe Ratio 0.08

Start Date 01/01/2000
End Date 30/06/2008

Total # of Trades 6563
Percent Profitable 41.92%
# of Winning Trades 2751
# of Losing Trades 3812

Average Trade $25.30
Average Winning Trade $731.05
Average Losing Trade $-484.01
Ratio avg. Win / avg. Loss 1.51

Max. conseq. Winners 5
Max. conseq. Losers 8
Largest Winning Trade $3645.00
Largest Losing Trade $-1660.00

# of Trades per Day 2.12
Avg. Time in Market 1.05 days
Avg. Bars in Trade 24.2
Profit per Month $136.38
Max. Time to Recover 1497.08 days

Average MAE $372.29
Average MFE $462.77
Average ETD $437.47

This is the unoptimised run using 2 ATRs stop and 3 ATRs target. To get more trades I just ditched the ADX filter. Since it didn't make such a big difference to the profits, it makes me wonder why I wanted to start using it in the first place. I think I was using the trailing stop at that point which performs woefully.

So version 2 produced 6500 trades - this is still not really enough. For an hourly system, I would like to see at least 100 trades a year per market. This isn't far away but I think I should aim for that as a minimum.

This is something I still have to quantify in a way that makes sense personally - the overall risk I'm taking with the system in comparison to the pay-off. The combined risk across all traded instruments at $50K per trade for the TurningPoints system is approximately $25K drawdown occuring in the last 2 years, or $50K drawdown occuring in the last 10 years. The pay-off over the last 2 years was $125K so that makes sense to me, and in fact the system was hot for 2010 so I hoped to net better than average monthly profits. I did for a while I think but now the heat's probably gone.

The slight problem is that I have to compile the equity curves myself to obtain the combined max drawdowns occuring, since NinjaTrader won't do this.

The average trade has to be considerably in excess of $25 to give a good chance of profitability after costs - especially since I add to the slippage through mistakes and software crashes and any combination of events leading me astray.

As for now though I'm out of ideas about how to increase the trading frequency apart from just reducing the time frame.

I can optimise the fixed stop and target per market and check for robustness there in the meantime.

After that I can compile an equity curve to check on the overall risk.
 
Is that Sharpe ratio correct, 0.08? This implies incredibly volatile returns.. any idea why it's so choppy?
 
Sharpe Ratio, severely disabled

Is that Sharpe ratio correct, 0.08? This implies incredibly volatile returns.. any idea why it's so choppy?

Hi Jacob,
this is the the average Sharpe Ratio of all instruments, not the portfolio Sharpe Ratio.

To be honest I hadn't even looked at it because NinjaTrader is so weak in this area.

The first thing that comes to mind is that the average win is ~$720 and the average loser is ~$480 which gives a ratio of 1.5 Then the max win is $3645 and max loss is -$1660 so that's quite a wide distribution with lots of room for variance.
 
Even if it's only the average of individuals, it's too low, but I don't know what calculations NT is doing.

You would benefit enormously from using software which can do proper portfolio analysis, e.g. Amibroker, it will make your life far easier (.. although I think we've had this discussion before).
 
Yes we have had this discussion before - and yes I know and agree. Actually I have the software to do that, but it's got a big bug in it at the moment (I wrote it myself).

On the other hand, I can get all the information equivalent to Sharpe Ratio etc from looking at the equity curve, which I have to compile from the PnL trades in Excel. I plan to post it up here when it's done.
 
The advantage of Amibroker is you can do all your analysis within the program itself, code custom metrics, all kinds of stuff. No need to download anything to Excel with all the risk that entails.

Sharpe ratio seems to be annualized return divided by annualized standard deviation, although I've seen other variants.

Take the average daily % return multiplied by 260, and divide by standard deviation of % returns multiplied by square root of 260.
 
Saviour optimisation robustness surfaces for stop & target

An ideal surface is just a hill with a brow in the middle.

A totally non-robust optimisation is just a mess with no real single or at least very small number of peaks.

The surfaces which look like a hill with a broad brow with several values at the top are systems where are range of parameter values produce a profitable result. If a system on a particular market doesn't have that, it means that varying the parameter values on the system by small amounts will have a large impact on the profits.

To put this the other way around, if the market produces a good profit for one parameter value but produces significantly less for a nearby parameter value, then that's not a stable parameter. In this case when the market character varies and the characteristic that this parameter models changes, the parameter value will then be no good and it'll require re-optimisation just to remain profitable.

If the parameter had a broader range of values that were all similarly profitable, changes in the market wouldn't dent the profits like that.

So this is what I've got:

AUDJPY good
AUDUSD OK
CHFJPY good
EURCHF ok
EURGBP good
EURJPY good
EURUSD ok
GBPCHF ok
GBPJPY ok
GBPUSD ok
USDCAD bad
USDCHF bad
USDJPY bad

So they are not all OK, in other words for the bad ones at least the optimised value for this time period has little likelihood of being anywhere near the optimal value for the future.

One question that immediately arises is: why are 3 bad? Does this cast doubt on the 'OK' graded pairs? If I can show parameter stability in most, why not all? What different about the bad ones? Was the 8.5 year period not long enough to incorporate all the different market types that appear? Am I being too strict in my evalutation of the surfaces? Are they in fact all OK? Or am I being too slack? Perhaps they're really not mostly OK at all.

Now I'll take the optimised values from the widest, flattest peaks and make a result set using those values.

Only a walk-forward test on unseen data will prove whether there's any predictability in the optimised values.
 

Attachments

  • MyHTML1.gif
    MyHTML1.gif
    10.5 KB · Views: 124
  • MyHTML2.gif
    MyHTML2.gif
    11.1 KB · Views: 126
  • MyHTML3.gif
    MyHTML3.gif
    11.7 KB · Views: 136
  • MyHTML4.gif
    MyHTML4.gif
    11.9 KB · Views: 154
  • MyHTML5.gif
    MyHTML5.gif
    13.3 KB · Views: 139
  • MyHTML10.gif
    MyHTML10.gif
    12.7 KB · Views: 123
  • MyHTML9.gif
    MyHTML9.gif
    10.6 KB · Views: 130
  • MyHTML8.gif
    MyHTML8.gif
    12.9 KB · Views: 137
  • MyHTML7.gif
    MyHTML7.gif
    12.6 KB · Views: 132
  • MyHTML6.gif
    MyHTML6.gif
    12.2 KB · Views: 124
  • MyHTML11.gif
    MyHTML11.gif
    13.5 KB · Views: 123
  • MyHTML12.gif
    MyHTML12.gif
    12.3 KB · Views: 135
  • MyHTML13.gif
    MyHTML13.gif
    11.4 KB · Views: 132
Amibroker - optimal values - selecting the hilltop rather than the spike

That would be great as long as it allows you to select the optimal value from the broad parameter surface top as opposed to an outlying best value spike.
 
Last edited:
time frames

I'm doing this in the wrong order. I want to check the time frames for robustness first to see whether I'm justified using unusual time frames or whether I should just stick to the 60 min bars.

This is the backtest result set for the simple system with stop @ 2 ATRs and target @ 5 ATRs on 45 min bars:

Performance All Trades
Total Net Profit $315700.00
Gross Profit $2252910.00
Gross Loss $-1937210.00
Commission $0.00
Profit Factor 1.16
Cumulative Profit $25097.13
Max. Drawdown $-11161.96
Sharpe Ratio 0.12

Start Date 01/01/2000
End Date 30/06/2008

Total # of Trades 5847
Percent Profitable 31.38%
# of Winning Trades 1835
# of Losing Trades 4012

Average Trade $53.99
Average Winning Trade $1227.74
Average Losing Trade $-482.85
Ratio avg. Win / avg. Loss 2.54

Max. conseq. Winners 3
Max. conseq. Losers 13
Largest Winning Trade $6075.00
Largest Losing Trade $-1660.00

# of Trades per Day 1.88
Avg. Time in Market 1.73 days
Avg. Bars in Trade 39.5
Profit per Month $258.59
Max. Time to Recover 1168.58 days

Average MAE $404.65
Average MFE $640.15
Average ETD $586.15

Here's the chart of the total net profit per time frames.
 

Attachments

  • MyHTML2.gif
    MyHTML2.gif
    4.9 KB · Views: 144
Last edited:
Top