Python For Finance - Backtesting MACD trading strategy

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 พ.ค. 2021
  • In this video I will backtest a MACD trading strategy on a number of indices and compare the results to determine if the MACD is a profitable trading indicator
    Code for video: github.com/russs123/MACD_test...
    Strategy link: www.ig.com/uk/trading-strateg...

ความคิดเห็น • 15

  • @harshdhami3065
    @harshdhami3065 3 ปีที่แล้ว +1

    Amazing work bro
    :)

  • @tecozu22
    @tecozu22 หลายเดือนก่อน

    Congrats on the project ! What if you out the system to enter long when the lines Cross (like you did) and to short when Cross again ?
    This way, Maybe trading long and short gets best results. What do you think?

  • @MrMalcovic
    @MrMalcovic 2 ปีที่แล้ว

    Great work paisano! Something I've noticed with this MADC calculation is that it produces different results to what you'd get from Tradingview. Apparently there are different approaches to doing it. Any idea on how to adjust it or use an alternative method?

  • @oongasboongas7374
    @oongasboongas7374 3 ปีที่แล้ว +2

    Thank you so much for this video, it fills so many holes I needed in my tool kit. Thank you thank you.
    What happens if the system drawdown is 0.0?

    • @CodingWithRuss
      @CodingWithRuss  3 ปีที่แล้ว

      Thanks! Glad it helped. System drawdown of 0.0 would mean the system never loses so it's pretty much impossible! If you are getting that result then it may be the drawdown isn't being calculated right.

  • @matthewrenegar6559
    @matthewrenegar6559 2 ปีที่แล้ว

    Great video!
    How would you change when the sale of the stock occurred? Is there a way to play around with the management of the trade?

    • @CodingWithRuss
      @CodingWithRuss  2 ปีที่แล้ว

      Thanks. For this example I used end of day price data only as it is a quick way to simulate the system. It gets a bit more complicated if you want to manage entries and exits through the day as you would need to load in more data and handle the trades. It's doable but the code would have to be adapted to do that

  • @swickz3271
    @swickz3271 ปีที่แล้ว

    Great video ! what if we set signal = range(10, 40, 1) and macd =range(10, 40, 1) and then program a loop, for python to find the best parameters for signal and macd to have the best returns ?

    • @CodingWithRuss
      @CodingWithRuss  ปีที่แล้ว

      Thanks! I haven't worked on this stuff in a long time tbh but if you have python and jypyter notebook installed, you can copy my code and make those tweaks to see what you get

  • @insert9124
    @insert9124 3 ปีที่แล้ว +1

    Astonashing!

  • @moeinrahimi4853
    @moeinrahimi4853 2 หลายเดือนก่อน

    can i use it on 5 minutes timeframes?

    • @CodingWithRuss
      @CodingWithRuss  2 หลายเดือนก่อน

      Yes you can run the test on any time frame that you have data for.

  • @sameersadventures4932
    @sameersadventures4932 3 ปีที่แล้ว

    More game in. Pygame pls