Skip to main content

Two Strategies you can start trading tomorrow - Time of Day effects in FX continued

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!

EDIT Nov 5th, 2017: Strategy one is only for EURUSD, which has the best equity curve below.
In [5]:
bt.test_all(hypo, 'ALL', 'original')
[]
['EURGBP']
['EURGBP']
['EURGBP', 'EURUSD']
['EURGBP', 'EURUSD']
['EURGBP', 'EURUSD', 'AUDUSD']
['EURGBP', 'EURUSD', 'AUDUSD']
['EURGBP', 'EURUSD', 'AUDUSD']
['EURGBP', 'EURUSD', 'AUDUSD']
['EURGBP', 'EURUSD', 'AUDUSD']
['EURGBP', 'EURUSD', 'AUDUSD']
['EURGBP', 'EURUSD', 'AUDUSD']
['EURGBP', 'EURUSD', 'AUDUSD']
['EURGBP', 'EURUSD', 'AUDUSD']
['EURGBP', 'EURUSD', 'AUDUSD']
Strategy two: Short at GMT 00:15 am and close after 5 hours, do this all weekdays.
In [3]:
bt.test_all(hypo, 'ALL', 'original')
[]
[]
[]
[]
['USDJPY']
['USDJPY']
['USDJPY']
['USDJPY']
['USDJPY']
['USDJPY']
['USDJPY']
['USDJPY']
['USDJPY']
['USDJPY']
['USDJPY']
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.

EDIT Nov 5th, 2017: After reading some comments here and at other places, please note that strategy 1 and 2 traded together with the correct capital allocation scheme and two volume and trend filters gives a Sharpe of 1 for out of sample testing. Yes you can trade these tomorrow but you need to do a couple of hours of work before sun rise.

Comments

  1. 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!

    ReplyDelete
    Replies
    1. You 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:

      - 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.



      Delete
    2. 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.

      Delete
    3. Deal:) 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.

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


      Delete
    4. GBPUSD short ONLY: Spread 2, slippage 1, commission $3.8 per round turn
      Date: 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!

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

      Delete
    6. With as much parameters even I can make a backtest look like gold

      Delete
    7. Please do, Esteban; and kindly show us. I am sure there are others like me who would like to expand their knowledge.

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

    ReplyDelete
  3. Hey QTJ, thanks for sharing your experiences along the journey.

    I 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

    ReplyDelete
    Replies
    1. Hi JJD,

      Thank 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.

      Delete
    2. Sure!

      Here 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?

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

      Delete
    4. And the times i sell and buy is also slightly different.

      Delete
    5. QTJ, please check the Statistics tab in the backtest with just EURUSD and leverage 1, the SharpeRatio is (casually?) 0.6.

      Delete
    6. Hi JJD,

      I 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.


      Delete
    7. Note: USDJPY is all weekdays.

      Delete
    8. Here 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.

      In 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.

      Delete
    9. Trend needs to be filtered out yes.

      My 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...

      Delete
    10. IMHO there is a long way from My 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... to Two Strategies you can start trading tomorrow.

      Anyway, thank you again for sharing yours experiences.

      Delete
    11. @JDD, I have reviewed the statistics related to both your posts, but cannot figure out the:

      1. Average trade, or the
      2. Average losing trade

      I am totally unfamiliar with the QuantConnect platform. Would appreciate help. Thank you.

      Delete
  4. Hi QTJ,

    I'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

    ReplyDelete
    Replies
    1. DOWNLOAD THEM FROM HERE:

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

      Delete
  5. 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.

    I 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.

    ReplyDelete
    Replies
    1. Hi Khalid,

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

      Delete
    2. And Khalid, try the filter that i am mentioning in this post:
      http://quantsjourney.blogspot.ae/2017/06/trading-decisions-of-your-stone-age.html


      Delete
    3. QTJ, Thank you. I have read the post a couple of times; and though I gathered the general idea, I have miss the details. I do not understands codes, other than Easy Language / Power Language! Printing it today to see if I fully understand the thing.

      Delete
  6. 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
  7. Thank you so much for providing a great information. I appreciate this. We are providing a trading services ofForex Tips

    ReplyDelete
    Replies
    1. Hi Garima,

      Thank you for the nice words. Would you share the metrics of your strategies that generates the signals that you are providing? Sharpe etc...

      Delete
  8. Thank you for sharing such useful information, nicely described. For more stock related news and tips can checkout Profit Vista Reviews.

    ReplyDelete
  9. GET RICH WITH BLANK ATM CARD ... Whats-app: +1(209)-643-1515

    I want to testify about Oscar White blank ATM cards which can withdraw money from any ATM machines around the world. I was very poor before and have no job. I saw so many testimony about how Oscar White hackers send them the ATM blank card and use it to collect money in any ATM machine and become rich. ( oscarwhitehackersworld@gmail.com ) I email them also and they sent me the blank ATM card. I have use it to get 75,000 dollars. withdraw the maximum of 4,500 USD daily. Oscar White is giving out the card just to help the poor. Hack and take money directly from any ATM machine vault with the use of ATM programmed card which runs in automatic mode.
    Email:oscarwhitehackersworld@gmail.com
    Text & Call or Whats-app: +1(209)-643-1515

    ReplyDelete
  10. I found your this post while searching for information about blog-related research ... It's a good post .. keep posting and updating information. how much do stock brokers make

    ReplyDelete
  11. The Casino of New Jersey: The Best Casino in America - JTG
    The Casino of 동해 출장마사지 New 순천 출장샵 Jersey is one of the only casinos in the Garden State that 강원도 출장샵 offers real money casino games. As such, 강원도 출장마사지 the property is situated on 계룡 출장샵 a river.

    ReplyDelete
  12. If you want to get rich within 24hours to 48hours with a programmed
    blank atm card, It all depends on how fast you can be to get the new
    PROGRAMMED blank ATM card that is capable of hacking into any ATM
    machine,anywhere in the world. I got to know about this BLANK ATM CARD
    when I was searching for job online about a month ago..It has really
    changed my life for good and now I can say I’m rich and I can never be
    poor again. The least money I get in a day with it is about
    $50,000.(fifty thousand USD) and i only spent $250 to get the
    card.Only serious individuals should contact him because he is very
    straight forward if you don’t have the money don't even bother to
    contact him and his series is 100% trusted i am a living testimony.
    Every now and then I keeping pumping money into my account. Though is
    illegal,there is no risk of being caught ,because it has been
    programmed in such a way that it is not traceable,it also has a
    technique that makes it impossible for the CCTVs to detect you..For
    details on how to get yours today, email: oscarwhitehackersworld@gmail.com
    tell your loved once too, and start to live large
    whatsapp..+1(510)-777-9243 or Text him +1(510)-984-6924

    ReplyDelete


  13. Hack and take money directly from any ATM Machine Vault with the use of ATM
    Programmed Card which runs in automatic mode. email
    oscarwhitehackersworld@gmail.com
    whatsapp..+1(510)-777-9243

    ReplyDelete
  14. Waow im 100 percent satisfied with the informations i got here today and will be hoping to get more of such intellectual content from you again soon,i will emmidiately save your rss, not withstanding i will take this advantage to share with you some informations regarding the following services such as fake-bank-statement hacked credit card numbers with cvv and zipexpungement-lawyercovid-19-vaccination-cards

    ReplyDelete

Post a Comment

Popular posts from this blog

Struggling Quant Episode 1: How I lost USD 500.000 while figuring out the link between questions, math, stats, coding and trading

Say that you are 30 years old and you have a good 25 years to work hard. Instead of going down the easy way of working for someone else during the day and killing time in the evenings and weekends, you have chosen the hard path of quantitative trading and started the heavy work. How many profitable trading ideas you can find in 25 years. Lets say you can figure out and test ideas in 10 days, 36 ideas a year and 900 ideas in 25 years right. Since this is my post, I am rounding 900 to 1000. Assuming a hit rate of 5%, 50 profitable ideas in 25 years, 2 per year and lets also say a profitable idea makes 20% per year. Depending on your initial capital, you will make X USD in 25 years. Lets say this X is USD 12.500.000 for me. USD 500.000 per year in average. This is my potential if I start doing things right now, right? So if I do things wrong for a year, I lose USD 500.000, this is what I did last year. I could not figure out how to operationalize all the scientific literature, ...

Trading Decisions of Your Stone Age Grandpa can Make You Money in FOREX

Why Ferrari or Rolex does not price their products at 149.999 or 12.999 but most of the items you see in your supermarket is priced like 4.99? Because they never like to be positioned as a bargain. Did you know that we tend to chose the price with less syllables even if the two prices have the same written lenght? These are some of the pricing strategies used by marketers. This is a very interesting topic and you can even find yourself deep in neuroscience while reading about it. Check this site, it gives 42 pricing methods to influence your brain, crazy, https://www.nickkolenda.com/psychological-pricing-strategies/ We also deal with prices when trading and I believe there are some sub-concious forces in play. Knowing some articles on things like the effect of round numbers in trading, I see some more potential here and I find this worth digging more not as standalone trading strategies but more as filters. At the end of the day, no one knows how the price feed effects the primit...