My latest post at http://quantsjourney.blogspot.co.uk/2017/09/time-of-day-effects-in-fx.html was on time of day effects in FX and I was claiming that you can actually make money with simple strategies depending on time of day.

Below you will find 2 very simple strategies you can play with and make some money. Do not forget sending my 20%, I know I can trust you.

I will now test these strategies with M15 bars with my quick and dirty backtester on 15 currency pairs including majors. Backtesting period is 01.01.2007 - 05.05.2017. The charts are profit in pips for the pairs where the strategy has positive P&L, these are not equity curves with equally spaced time, the horizontal axis is number of trades. But obviously equity curves will be similar with some gaps due to days with no trades.

I almost did not optimize these strategies, there is room for improvement.

Strategy one: Short at GMT 09:15 am, do this on Wednesday, Thursday and Friday, close after 5 hours. Check out EURUSD!

```
bt.test_all(hypo, 'ALL', 'original')
```

Strategy two: Short at GMT 00:15 am and close after 5 hours, do this all weekdays.

```
bt.test_all(hypo, 'ALL', 'original')
```

For a partial explanation of what is happening here, check this article https://c.mql5.com/forextsd/forum/206/ranaldo_000.pdf

As a next step, I encourage you to split your data into 3 segments, use segment one for optimization, segment 2 for out of sample testing, and segment 3 for the real out of sample testing. The rationale of segment 3 is that in general it is very hard to be diciplined enough for not to go back and change things after seeing segment 2 results. This is one of my big problems, I optimize on segment one, I look at segment two, if it is not good enough I go back and tune segment one till I see a smoother segment 2 backtest:) This is fooling myself, so I always keep an unseen segment 3.

The EURUSD strategy is simply benefiting from the strong down trend since 2008. If you enter a EURUSD short at 9am everyday then close after 5 hours the EURUSD will produce a nice equity curve. Try the same strategy from 2000 to 2007!

ReplyDeleteYou are correct that there is down trend starting from 2008 and this strategy benefits from it, however, this does not mean that it makes money out of this, consider these:

Delete- sell and hold would be a terrible strategy, see the chart of EURUSD for the last 10 years here http://www.xe.com/currencycharts/?from=EUR&to=USD&view=10Y. There are 6 months to 2 years of up-trends between and 2007 and 2017 where this strategy continues to perform. Additionally, if you count up and down days in this period, it is close to 50-50.

- As mentioned in the article linked in my post, there are structural dynamics behind this, like commercial and liquidity related cycles of the economic agents like the banks and companies holding FX positions in their balance sheets. Despite being a part of a larger macroeconomic frame, there is no relation between these cycles and the overall trend.

- For 2000 - 2007 period, assuming the same structural dynamics, I would say that profits can still be made. The version of these strategies that I trade have other filters for compensating the effect of the overall trend, as I have mentioned, there is room for improvement. This strategy holds whatever the overall trend is as long as you figure out a way of filtering out days with strong upside moves.

Give me any security or tradable financial instrument with a strong downtrend since 2008 and I'll build you a short only strategy with a great equity curve and good payout ratio. If you eliminate the trend bias the EC and payout ratio will not look very attractive.

DeleteDeal:) GBPUSD, from 2 to 1.3 in the last 10 years, even more down than EURUSD. But one rule, no overfitting as this will be backward looking, keep it simple like my strategy, at 3 parameters max.

DeletePlease publish your results here and the rules so that i can backtest.

GBPUSD short ONLY: Spread 2, slippage 1, commission $3.8 per round turn

DeleteDate: 10/09/7 to 11/04/2017 (STOPPED HERE IN CASE YOU WANT SOME DATA FOR TRUE OOS)

Enter short before 9am gmt on 15min bar close when SMA(97) Crosses Above SMA(74) And SMA(28) > SMA(30)

Close after 12 hours or forty eight 15min bars

4268 pips gain

Year Dollars

2007 - $1167

2008 + 5640

2009 +12019

2010 +2239

2011 +10245

2012 +658

2013 +3919

2014 +1187

2015 +4238

2016 +1385

2017 +1696

I forgot just how good I am at this!

Impressed:) Despite 6 optimized parameters. What is your view on the second strategy, shorting USDJPY?

DeleteI haven't reviewed it but to be honest I only trade strategies that have long/short symmetry.

ReplyDeleteHey QTJ, thanks for sharing your experiences along the journey.

ReplyDeleteI implemented the first strategy in the QuantConnect platform, here you can check the results.

Some implementation details:

- I used the EURGBP, AUDUSD and EURUSD pairs.

- I used a leverage of 10 and for each operation I went short by a fixed proportion (the exposure) divided by the number of trading pairs (three in this example).

- The backtest starts in January 1st 2010 and finished September 1st 2017.

- The starting capital is $25.000.

- I used OANDA as broker to have a very accurate measure if the transaction cost; as you know OANDA only charges spread so with the price you have all the costs included. There is not a slippage model, but it can be easily added if the results worth it.

I tried to implement the algorithm in a way that is simple to make changes in pairs, leverage, etc. But to be honest, I don’t think the strategy worth it. As you can see, the results aren’t promising, particularly since beginning of 2017.

I also tested the Anonymous strategy and the results are even worse.

Thanks again for your generosity and best of luck with your quant journey!

JJD

Hi JJD,

DeleteThank you for doing this. Could you please test EURUSD only with no leverage. Just to replicate my results.

I would also propose combining EURUSD and USDJPY strategies with the Kelly capital allocation scheme to get a better equity curve. I use 6 to 4 leverage in my live strategies for these two pairs.

And ofcourse, I did not give my entire model, I use one volume filter and a trend filter in the version that I trade.

Sure!

DeleteHere is the backtest with just EURUSD and leverage 1, I started the backtest in 2015 (ten year minute backtest are long) but you can change it yourself.

And here is the algorithm with EURUSD and USDJPY and total leverage 10 equally weighted. Again, the starting point is 2015.

As you can see the date time rules by itself generates a lousy performance… one that Kelly cannot improve to the point of making it a good strategy.

May I ask how much better is the complete framework with the volume and trend filter?

Sure, sharpe is 1.7 for backtest, 1.4 for out of sample and 0.6 for live since Jan 2017.

DeleteAnd the times i sell and buy is also slightly different.

DeleteQTJ, please check the

DeleteStatisticstab in the backtest with just EURUSD and leverage 1, the SharpeRatio is (casually?) 0.6.Hi JJD,

DeleteI checked your code, I think you are using the same entry and exits for USDJPY, it needs to be 00:15 and 05:15. Please also adjust the leverage to 6 for EUR and 4 for JPY.

On top of this, applying my filters and slightly different entry and exit times (traders secret) and testing this between 01.01.2015 - 05.05.2017, I get the following results with my own backtester.

Sharpe : 1.03225035842

Kelly : 2.0048412411520653

Max DD % : 18.4681365376

DD Duration in Days: 111.05208333333333

Profit % : 71.6309168200

CAGR % : 29.54386053549467

Number of Trades : 354

Win % : 52.259887005649716

Win/Loss Ratio : 1.274014654201525237837896155

Backtest complete.

Note: USDJPY is all weekdays.

DeleteHere is the backtest with the changes you suggested, is clearly better, but the results are far from the ones in your backtest. The 2015/01/01-2017/09/01 period have a Sharpe of 0.65, but if you run the backtest just for the 2017 (until 09/01) the Sharpe is a scary -0.33.

DeleteIn any case, I’d suggest to re-evaluate the viability of this strategy for the EURUSD in the short and term given the actual downtrend of the dollar vs. the euro.

Trend needs to be filtered out yes.

DeleteMy point in this post is more on the power of time of day in trading. Sometimes we get lost in research and complicate things, there are simpler ways...

IMHO there is a long way from

DeleteMy point in this post is more on the power of time of day in trading. Sometimes we get lost in research and complicate things, there are simpler ways...toTwo Strategies you can start trading tomorrow.Anyway, thank you again for sharing yours experiences.

Hi QTJ,

ReplyDeleteI'm not sure what JJD is on but the strategy I posted is highly profitable if applied to the GBPUSD with the specified rules. I'll send you a link to the performance reports and I will give you the MT4 strategy so you can test for yourself.

MB

DOWNLOAD THEM FROM HERE:

Deletehttps://1drv.ms/f/s!Ap6xWUat01w3gQJTnqT0bQEIgyY3

This comments thread yet again proves one cannot copy another traders strategy and be successful! However, taking a good idea and then modifying it to own sets of beliefs is another matter altogether.

ReplyDeleteI testify on basis of back tests AND real money trading, QTJ's time of day idea is ONE RICH SEAM. Tell me where to send the 20%?

Kudos also to Anonymous; it takes courage and generosity to post one's ideas for peer review.

Hi Khalid,

DeleteThank you for the encouraging comment. Please buy Etherium with my 20% and send me the money once it reaches USD 1m:)

And Khalid, try the filter that i am mentioning in this post:

Deletehttp://quantsjourney.blogspot.ae/2017/06/trading-decisions-of-your-stone-age.html

Here it is talking about two strategies of start a trading. this is very good. I appreciate this. We are providing a trading services of Comex Tips

ReplyDelete