Telephone icon Quant Savvy
Pinterest Icon Hub Pages Articles Michael Singer Ezine article Michael Singer Quant Savvy Blog

#Algotrading #Serenity Bot #Futurestrading #AlogrithmicTrading #Daytrader #Daytrading

Second Day Gap Daytrading Strategy

12/03/15

If you are having difficulty finding an edge or need a little guidance where to
start then read the following post. Here we give you an example futures trading edge:

 

 

 

    We evaluate a mean reversion trading strategy

 

 

Second Day Gap Futures Trading Strategy

 

Introduction

After i explain what an edge is I often have many traders ask me how to find a edge. Many think an edge is some elusive holy grail or something so complicated only Nobel prize winners have the ability to come up with one. My answer is always the same, "an edge can be super simple or super complicated, it all depends on your style of trading and account size". The best edges are ones that can expose a true inefficiency in the markets but there are others which work of simple repeatable habits of the market.

 

Mean Reversion - The Nature Of The Markets

Many traders understand that markets tend to go to one extreme to another very quickly. Often when there is a big sell-off then after a couple of days we have a tremendous bounce or retracement. This is often due to the fact of market balance, often when markets start dropping fast, the players positions in the market become out of balance. It takes time for markets to ride out the storm and find balance between supply/demand and in the process of finding that balance the market will try to "screw over as many players as possible". Fear and greed is a natural trait in human evolution and is ever present in the futures markets. Even algorithms can suffer from the same problem as ultimately they are still programmed by humans which themselves are trying to capture the inefficiency of that fear and greed.

 

Creating A Simple Mean Reversion Algorithmic Trading Strategy

 

One Day Gap Fill

 

Turn This Losing Algorithmic Trading Strategy Into A Winning One Using Second Day Gaps Only

A lot of daytrader know that even though single gap days fail often a double gap day on the major indexes will close. The only problem is that the number of trades will be far less and system will trade infrequently. So lets test the same system but now we only enter if there is a two gaps in a row (either up gap or down gap). We add the following logic into our code:

  • If there is a gap on a single day and this gap fills at-least 90% of gap value then we presume this gap to be closed and the gap counter to be reset to zero.
  • If we have an open unfilled gap up or down yesterday and then today’s open is also a gap up or down - we can enter long/short at the market on opening of market.
  • The following is the results of two unfilled gaps in a row using same entry, stops and targets as before. In the first image is an example of some of the trades that were made, second image is the results:

  • As can be seen the long second day gaps strategy is pretty much flat with profit factor 0.97 including transaction costs but the short second day gap strategy is positive with profit factor 1.4. The only issue is that we only have 182 short trades and 186 long trades for our sample (which is quite low).

 

This is just one example of trying to find an edge with algorithmic trading. I am simply demonstrating something which an individual trader may have observed and now is testing whether there is any positive expectancy to their hypothesis. Even if something does not work we can think of other things around the original hypothesis which might work e.g. in this case we went for two gap days in a row. When looking for ideas always try to be creative, especially if you are looking for repeatable patterns or behaviour.

 

Adding Filters to Our Daytrading Strategy

From the previous example of second day gap i find it interesting that the short side made money, so i wanted to test why the long side does not make money. By looking at many of the trades what i find is that either the target is too small or stop is too big. So by following the old adage of having lower risk to reward on each trade - i consequently used an Average True Range stop and target and set it so targets were at twice then ATR than stops. So small risk and bigger reward on each trade.

  • Using a different stop and target rules and modifying the risk ratios we now get the following results:

  • We can see that both longs and shorts are now profitable. The longs have very small profit factor and shorts profit factor has actually improved and is now 1.69. The number of trades made is the same as before.
  • When evaluating a strategy we aim to have a smooth equity curve - if you do not have this then that means your strategy cannot perform in multiple market environments. We also want each year to be profitable either in bull or bear market, high volatility or low volatility the strategy should still perform. The equity curve and yearly pnl figures are below:

  • So the equity curve has some sharp drawdowns and is quite jagged but still the system has been profitable each and every year apart from 2014 (and even then the loss was very small).

 

Conclusion

For any new daytrader or potential algorithmic trader we can see from this post that we can pretty much start with a simple hypothesis and then work on the same hypothesis from a different angle. Then we can see that by modifying risk/reward for the strategy we can change a losing strategy into a winning one.

If you wanted to continue with this particular strategy you could figure out and design filters where you expect this system to fail.

 

Why We Would Not Trade This Strategy

Even though the filtered strategy shows some promise and is especially good on the short side we would not continue perusing this strategy or improving it for the following reasons:

  • The trade sample is too small, we would prefer at-least 250 trades short and long each minimum.
  • The strategy performs poorly on long side without the the new stops/targets - this shows us that the initial edge or entry does not show massive potential or positive expectancy
  • The profit factor is less than 2. On on daytrading strategy with number of trades less than 250 long or short you would expect much high profit factor: see the following post for further details:

 

I hope this post proves that you can pretty much test and find an edge in numerous ways - even testing sometimes a silly premise might yield promising unexpected results. Please keep following the blog too see new updates and example edges.

 

 

 

Quant savvy world map logo
Captcha Image
Pinterest Icon Ezine article Michael Singer Quant Savvy Blog Hub Pages Articles Michael Singer