Showing posts with label trading system. Show all posts
Showing posts with label trading system. Show all posts

Monday, December 31, 2012

Presenting my brand spanking new "Daikoku" trading system

I've been quietly working on this trading system for a few weeks now. My first-round backtesting was finished today and the system is looking very profitable.
 
It's a low volatility breakout system, based on the weekly timeframe.
 
My backtest details:
 
Years tested: 2001 to mid 2012
Pairs tested: EURUSD, USDJPY, GBPUSD, AUDUSD, USDCAD, USDCHF, EURJPY, NZDUSD, GBPJPY, AUDJPY, NZDJPY
Timeframe: 1W
 
Sample trades collected: 403
Profit factor: 2.49
 
There are no indicators involved. I initially backtested using ATR to measure volatility, but didn't find it useful in this timeframe. I then merely measured changes in volatility by comparing the current week's range with the previous week. If it's less than 50%, we have an entry signal.
 
We look for entry signals over the weekend after the trading week is over. We then place pending orders that will last for all of next week.
 
Entry signal: At the close of the week, the week's range must be less than 50% of last week's range. On Monday morning when the markets open, we place a pending long at the high of the week + 1 pip, and a pending short on the low of the week - 1 pip. The orders should be set to expire at the end of next week.
 
Stop loss: If going long, the low of the week - 1 pip. If going short, the high of the week + 1 pip.
 
Take profit: 25% of your stop loss
 
Some people may raise their eye brows at the level of the take-profit. At this level, our reward-to-risk is 0.25:1, which is a little unconventional. But I cannot deny my backtest results. This is one of the best R:R ratios to use. All R:R ratios are profitable, but 0.25:1 R:R almost maximises my profit factor, up to 2.49, which I think is very good for a mechanical system with little optimisation.
 
Here's a graphical example of a trade:

 
 
Everything about this system is preliminary at the moment. I would like to further optimise but even at this stage, the system is tradable. My main concern is the relatively small sample size of 400 trades, although it has been tested 10+ years across all the majors and Yen crosses. The high profit factor makes this alluring.

Wednesday, December 5, 2012

Optimisation of Hermes

My optimisation of my "Hermes" low-volatility breakout system is proving to be very messy.
 
The trouble with optimisation is that you can take it in any direction. At the moment I added an RSI filter to check how the sytem performs when going with and against the trend.
 
There is a noticable improvement in profit factor when trading with the trend. I have also noticed that the system performs best against the trend if I use a Reward:Risk ratio greater than 2, while trading with the trend performs best with a Reward:risk ratio of less than 2.
 
I suppose this makes sense. If you are trading with the trend, the likelihood of running into the end of the trend is relatively high. On the otherhand, if you trade against the trend and the trend-reversal is strong, it can turn into a new trend and you succeeded in catching the beginning of this trend. This would explain the bigger pay-off if trading with a larger reward:risk ratio.
 
With that in mind, I have also noticed other behaviour that can be used to "optimise" my system further. For example, I have noticed that trades perform better when you have a multitude of entry signals on the same day. I guess the entry signals on different pairs reinforce each other. Trading only on days with multiple signals may improve my profit factor, but at what point does it end being an exercise in optimisation, and the start of curve-fitting?
 
To be safe, I may stick with one level of filtering only. I also feel that I'm getting sidetracked. Mechanical systems are not intended to be perfect. They should be "rough but ready", and ideally deployed as part of a portfolio of independent trading systems. To win mechanically, you should trade with a low risk per trade, and let high frequency and exponential growth do the heavy lifting. To do this, though, you'll need more systems to trade with. I'll return my attention to system development.

Monday, September 24, 2012

"Hermes" low volatility daily breakout system

Disclaimer: this system is not intended as financial advice. I'm purely posting this for feedback and discussion. As always, perform your own due diligence before trading.
 
I backtested this system back in August and made a few blog posts about it. I did some further work this week, testing a few more pairs and cleaning up my results.
 
I dub this system "Hermes". It is a low-volatility daily breakout sytem.

SUMMARY

System Type: Breakout
Trade frequency: 8 trades per month
Backtest sample size: 1203 trades
Pairs tested: EURUSD, AUDUSD, USDCAD, USDJPY, EURJPY, EURGBP, USDCHF, GBPUSD
Dates tested: 2001 to mid-2012
Reward-to-risk: 2
Win rate: 40.87%
Profit Factor (approximate after spread): 1.26
Grade: B

Equity Curve from 2001 to mid-2012 – $10,000 initial balance, 1% risk. 2 R:R
 
 
 
Profit factor from pairs tested (after spread):
 
 
SYSTEM DETAILS
 
System Type
 
Breakout
 
System Description
 
Look for a daily range that is half or less than ATR(14). Setup two pending orders in the next day to trade the break of the daily high and low.
 
To trade the break of the high, setup a pending long with entry = yesterday's high + 1 pip. To trade the break of the low, setup a pending short with entry = yesterday's low - 1 pip.
 
Stop loss will be situated at yesterday's low - 1 pip if going long, and ysterday's high + 1 pip if going short.
 
Rationale of System
 
A daily range < 50% of ATR(14) suggests one or more of the following:
 
a) Neutral traders have left the market for the day, standing by to re-enter when a trend (re-)establishes itself
b) The preceeding momentum has stalled, meaning trend-followers are closing their positions and/or the big money are accumulating positions for a trend reversal.
c) Traders in general have left the market, particularly during a holiday period (e.g. XMAS to NYE), but stand ready to flush the market with orders once they return.
 
All three scenarios increase the probability that a day of low volatility will be followed by high volatility, which is where we will make our profit. The daily high and low are good places to place our entries. We use a 1 pip buffer as volatility is currently very low.
 
We trade both the break of yesterday's high and low in the same day. Pending orders should only stand for 24 hours from the start of the new market day. This means that during some days, both our long and short will trigger. The first break may be an unsuccessful fake-out or stop-hunt, but with a 2:1 reward-to-risk, a successful second break will mean that we will still finish in profit.
 
We trade the top 8 liquid pairs. They are:
 
EURUSD
GBPUSD
AUDUSD
USDCAD
USDCHF
USDJPY
EURJPY
EURGBP
 
Indicators Used
 
Average True Range (14) to measure volatility.
 
Entry
 
Break of yesterday's high + 1 pip if long, and break of yesterday's low - 1 pip if short.
 
Stop Loss
 
If long, yesterday's low - 1 pip. If short, yesterday's high + 1 pip.
 
Take Profit
 
2R, where R = |entry point – SL|
 
Example Trade
 
 
Thoughts
 
- Sample size is good, around 1,200, across the top eight liquid pairs from 2001 to mid-2012. The  system seems robust enough.
 
- Some entry signals will occur across multiple pairs on the same day. I'm not sure of the best of trading this. My preference would be to trade no more than 4 signals simultaneously, so with 1% risk per trade, I'm risking 4% on the same day.
 
- During quiet periods and holidays (XMAS to NYE, Easter), you may receive a glut of entry signals as traders leave the market. I took care not to trade on Christmas and New Year's Day themselves, but the days surrounding these holidays will also be quiet and relatively illiquid. My backtest indicate that it's still profitable to trade during these periods, but the glut means your risk exposure may be higher if you trade all of them.
 
- I'd like to test this system on the 4H and weekly charts.

Wednesday, September 19, 2012

"Mercury" fractal breakout trading system

Disclaimer: this system is not intended as financial advice. I'm purely posting this for feedback and discussion. As always, perform your own due diligence before trading.
 
I've been sitting on this system for awhile. To be honest, I'm not happy with it. The backtest results are positive, but I'll explain my thoughts towards the end.
 
I'm naming my systems after gods of trade and commerce. I dub this one "Mercury".


SUMMARY

System Type: Breakout
Trade frequency: 3.5 trades per month
Backtest sample size: 492 trades
Pairs tested: EURUSD, AUDUSD, USDCAD, USDJPY, EURJPY, EURGBP, USDCHF, GBPUSD
Dates tested: 2001 to mid-2012
Reward-to-risk: 2.75
Win rate: 32.37%
Profit Factor (after spread): 1.26
Grade: C

Equity Curve from 2001 to mid-2012 – $10,000 initial balance, 1% risk. 2.75 R:R

Profit factor from pairs tested (after spread):
 
 

 
 
SYSTEM DETAILS
 
 
System Type
 
 
Breakout
 
 
System Description
 
 
Look for the start of a ranging period where ADX(14)(High + Low / 2) is equal or less than 18. When this occurs, apply pending orders at the break of the most recent upper fractal + 5 pips, and lower fractal – 5 pips.
 
 
Stop loss will be situated at 0.75 * ATR(14) pips from the entry price.
 
 
Rationale of System
 
 
A low ADX(14) indicates a ranging period. When ADX(14) < 18, the ranging has become extreme, stops have accumulated outside the range and a breakout is imminent.
 
 
A fractal is most likely to be situated near short-term resistance and support. If a breakout is to occur, the fractal must be broken first. We apply a 5 pip buffer to our entry to increase our odds of entering a genuine breakout.
 
 
We trade the top 8 most liquid pairs only as these tend to provide the most accurate technical signals. They are:

EURUSD
USDJPY
GBPUSD
AUDUSD
USDCAD
USDCHF
EURJPY
EURGBP

Indicators Used

ATR(14) Close for stop loss

ADX(14) High + Low / 2 to filter for ranging conditions

Bill Williams' Fractals indicator

Entry

Break of the most recent upper fractal + 5 pips, or lower fractal – 5 pips

Stop Loss

If long, entry price – 0.75 * ATR(14). If short, entry price + 0.75 * ATR(14)

Take Profit

2.75R, where R = |entry point – SL|
 
Example Trade
 
(from Forex Tester 2)
 
 
Thoughts
 
The system has some weaknesses as it is.
 
#1. Sample size is around 500. I'd prefer it to be closer to 1,000, but the market history only provides 492 trade signals. On the otherhand, it has been tested on eight pairs, with seven out of eight showing positive results, so it seems robust enough.
 
#2. The system has been in drawdown since 2011. I'm really not happy with this, even though the overall equity curve is positive. I'd recommend a position size of 1% or less for this system to reduce the drawdown magnitude.
 
#3. I just get the gut feeling that there's a better entry point than just fractals. When a market's ADX(14) drops below 18, it usually doesn't stay there for long.