Back

Two Strategies you can start trading tomorrow (Not really)

Hey folks,

Here you have two lousy algorithms, the idea is to test he strategies shared by QTJ in this blog entry.

First strategy 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 also implemented one of the ideas in the comments (attached below). Is a little more advanced and I made use of an auxiliary class to check the state of two moving averages.

I know, you all want some money maker ideas, but the quant path is full of testing bad strategies. I think the best you can take from this post is how to implement an strategy from one of the many resources out there.

Hope you enjoy it.

Update Backtest






The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.



Here is the another algorithm.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hey JayJayD,

Appreciate your time for the tests. However, there is a misunderstanding, proposed pairs are EURUSD and USDJPY, you might want to retest applying Kelly capital allocation scheme.

EURUSD: Short at GMT 09:15 am, do this on Wednesday, Thursday and Friday, close after 5 hours

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

And as a note, before trading these tomorrow, one needs to do a couple of hours tuning:)

Thanks,

0

Hey QTJ, nice to see you here!

You’re right, I actually made two mistakes, I misinterpreted the algorithm and becasue of a typo, the USDJPY wasn’t trading.

Attached is the algorithm with both fixes, the performance is better. From Sharpe 0.4 to 0.8!

The interesting thing is the 51% win rate, maybe with some kind of stop loss-take profit and/or trailing stuff the losses can be limited.

I didn’t implemented Kelly, maybe you can share how much improves with the sizing criteria.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hi JayJayD,

Actually, in the original version of this strategy, I use two filters, one for volume and one for trend. And I employ EURUSD-6 and USDJPY-4 leverage. I do not use stops but it can improve yes. I also have one of my grandpa filters which interestingly works:) post is at this link Grandpa Filter.

After these modifications sharpe is a bit above 1 however, the performance started detoriating this year.

If you would like to have a look at, long versions of these two strategies also works in other times of the day. That makes 4 strategies, 2 short and 2 long and a smoother equity curve.

Thanks,

1

Pretty interesting Grandpa filter!

> If you would like to have a look at, long versions of these two strategies also works in other times of the day.

Yes! Can you please show me the rules so I can implement it and share here?

Another alternative is to implement a risk manager, I implemented one and is being broadcasted in the DailyFX algorithm, you can take a look and clone from there.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


:))) if I give you everything, it will be easy money.

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed