Algorithmic Trading Strategy in Python

Sdílet
Vložit
  • čas přidán 6. 09. 2024
  • In this video we learn how to implement an algorithmic trading strategy in Python.
    DISCLAIMER: This is not investing advice. I am not a professional who is qualified in giving any financial advice. This is a video purely about programming using financial data.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine...
    💻 The Algorithm Bible Book: www.neuralnine...
    👕 Programming Merch: www.neuralnine...
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine...
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/Neu...
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/

Komentáře • 77

  • @dany2685
    @dany2685 Před 3 měsíci +1

    I would combine this algorithm with a DCA one so for example if it says buy we have two cases:
    1. Sell when reaching buy level + 100 pips
    2. Buy more using a step let's say 100 pips each step. After multiple buy trades if we have a profit of 100 points with our DCA we'll sell all trades
    Do the same for a first sell trade but reversed

    • @dany2685
      @dany2685 Před 3 měsíci

      Also you will not have access to yahoo finance anymore. I offer free downloads of csv on my website for forex.

  • @lakeguy65616
    @lakeguy65616 Před 3 měsíci +1

    Have you ever considered a video about linking a trading bot with a brokerage account? Or a video about how to trade using the Schwab API for traders? thank you.

  • @jorgeoliveiralawinskyfilho7069

    Please, how could we include ADX for confirmation? With different values for ADX, +DI, -DI? This would improve a lot the results, believe me. Gratitude Master.

  • @robertjulesyoung9994
    @robertjulesyoung9994 Před 2 lety +2

    it would be awesome if you could put the algorithm in real use, using a sandbox may be, to see how much would you make in a month or so. but, what I'm gonna do is, I will use this algorithm and try to adjust the parameters for different stocks. it would be really good for swing trading. thanks a lot for your time, great video!

  • @deekshitpatel4647
    @deekshitpatel4647 Před měsícem

    We can code indicators and male a strategy but can you please make a video on
    VOLATILITY CONTRACTION PATTERN OF MARK MIVERNI IN PYTHON

  • @birdkiller1234
    @birdkiller1234 Před 3 lety +3

    Dude, you are in beast mode... Awesome videos. Much love, thanks for making your videos

  • @rtr195807
    @rtr195807 Před 3 lety +4

    panda Datareader has probs with connection at the time.
    pandas_datareader._utils.RemoteDataError: Unable to read URL

    • @user-kq5cd7bd3o
      @user-kq5cd7bd3o Před 3 lety

      I ran into the same problem with this and another tutorial. Seems like the yahoo finance service is down at the moment....

    • @rtr195807
      @rtr195807 Před 3 lety +3

      @@user-kq5cd7bd3o You can use instead:
      import pandas
      from pandas_datareader import data as pdr
      import yfinance as yfin
      yfin.pdr_override()
      then
      df = pdr.get_data_yahoo("TSLA", start="yyyy-mm-dd", end="yyyy-mm-dd")
      print(df)

    • @erictovbin4200
      @erictovbin4200 Před 3 lety

      @@rtr195807 Thank you!

    • @user-nr9zn3de3r
      @user-nr9zn3de3r Před 3 lety

      @@rtr195807 Thank you

  • @redacted5594
    @redacted5594 Před 3 lety +3

    Great tutorial! I have one question though, when I generate the plot, all of the dates on the x axis are very congested. I tried to maximise the window like you did but it stated the same. Any help would be greatly appreciated. Thanks!

    • @redacted5594
      @redacted5594 Před 3 lety +1

      I figured it out. Pycharm was generating the plot in the scientific window as a png rather than as a figure in its own window

  • @chapmansbg
    @chapmansbg Před 3 lety +1

    Nice python work but the prices you are getting are daily closes, wouldn't you be better off using yfinance so that you can specify the chart time frame?

  • @ubermedic8
    @ubermedic8 Před 3 lety +1

    Is there anyway using Pandas Datareader to get different time frames of data. For example, right now using the Yahoo source, we are getting daily adjusted closes, but I'd like to make an SMA algorithm using 4 hour adjusted closes instead.
    Thanks

  • @asmodeus4310
    @asmodeus4310 Před 3 lety +1

    Great video man, today, i can finally say, that i got real knowledge

  • @rvforte8
    @rvforte8 Před 2 lety

    Great tutorial man, thanks!
    What PyCharm theme is it you're using?

  • @larrygranda6447
    @larrygranda6447 Před 2 lety

    Good day to you You make it look so easy!. Would be nice to have a no code option like PlutoHQ Trading or Three Commas or FXTrader but do they work?

  • @alifebz5312
    @alifebz5312 Před 7 měsíci

    hi! how are you? can I ask which software you used for making the code, Im using vscode and I tried used the same code it showed me a lot of errors.. I just start started learning programming recently and id like to know more and be better coder.

  • @qitube7476
    @qitube7476 Před 2 lety

    Hallo Florian, welche Python-Programmier-Plattform nutzt Du für Dein Coding?
    Ich bin Python-Anfänher.
    Danke für Deine Unterstützung & Frohe Weihnachten!
    Beste Grüße
    Frank

  • @MatBat__
    @MatBat__ Před 3 lety

    Nice bro! Will try this algo, thank you. Keep them comming

  • @bigden288
    @bigden288 Před 3 lety +1

    Great video, can you make a video on how to code to trade with real money in a broker's platform. Else please share some insights about it and can I use the knowledge of this video

  • @fabulousr2d2
    @fabulousr2d2 Před 2 lety +1

    I'm new to this and I keep getting this:🤣🤣
    KeyError: 'Adj CLose'

  • @srmyrm
    @srmyrm Před 3 lety

    How to setup this program to give the next future signal? , i believe re-running the program will change the past buy/sell signal based on incremental data and we lost track of previous buy/sell points, please advice

  • @kavekaaveau9289
    @kavekaaveau9289 Před rokem +1

    does the data reader already have access to the yahoo api? i try to Run the same as you did in the video but no data prints. im new to coding but any help is much appreciated

    • @andyn6053
      @andyn6053 Před měsícem

      same here, I cant get any data. api is not working...

  • @maiconreis9276
    @maiconreis9276 Před 3 lety

    Perfect video. I like this very much. Thank man.

  • @jorgeoliveiralawinskyfilho7069

    Amazing Video, Gratitude! Gratitude!

  • @melsaied101
    @melsaied101 Před rokem

    This was awesome. Thank you.

  • @milikest
    @milikest Před 3 lety

    Good coding section. A better way to test an algo on stocks, it is better to test it on down-trends. Because many theories can make you earn on an uptrend. If the algo profits on downtrend than it can be said that it is working. And unfortunately sma, ema , bollinger bands or rsi, they can give an idea about trades. There are many things to consider, but I think correct elliot wave count is the best way to predict the future. And here important word is 'correct'.

    • @usamasaad9334
      @usamasaad9334 Před rokem

      But elliott is sometimes gets so much complex and i dont think it is easy to make a bot out of elliott

  • @CodeTradingCafe
    @CodeTradingCafe Před 3 lety

    Nicely explained!

  • @rakeshjat5127
    @rakeshjat5127 Před 2 lety

    Please make a detaile video on ccxt python

  • @priyamd4759
    @priyamd4759 Před 2 lety

    Please show how to handle live stream data.

  • @gabrielmessias7814
    @gabrielmessias7814 Před 3 lety

    Thanks bro..... helped a lot....

  • @moali173
    @moali173 Před 3 lety

    Is it possible to build a trading bot with okex platform ?

  • @sazamhashmi
    @sazamhashmi Před 3 lety

    Nice video, thanks, how can i contact you ? and one more question what the icon for which is black with fan symbol in the bottom tab. hope to hear from you soon.

    • @NeuralNine
      @NeuralNine  Před 3 lety +1

      Depends on for what you want to contact me. For business inquiries use the mail. For anything else social media or discord. But I don't do troubleshooting

    • @sazamhashmi
      @sazamhashmi Před 3 lety

      @@NeuralNine well, it could turn out to be a good business for us both.

  • @saidud1459
    @saidud1459 Před 3 lety

    the fact that my brain has still not developed but he is developing my brain

  • @prod.ot5
    @prod.ot5 Před 3 lety

    this video is very good but Invert the buy and sell it would perform better

    • @1queijocas
      @1queijocas Před 2 lety

      This strategy is only good to learn how to code; not for actually trading

  • @krispyren
    @krispyren Před 3 lety

    Thank you! Great tutorial. What about implementing a percentage gain and including it in the if statement? Wont that guarantee gains?

  • @sauelac3898
    @sauelac3898 Před 2 lety

    what program are you using

  • @ventiladorbueno1846
    @ventiladorbueno1846 Před 2 lety

    Thxs

  • @TejrajParab
    @TejrajParab Před 3 lety

    Wow!

  • @GameSmilexD
    @GameSmilexD Před 3 lety

    Your content is top quality, but fintech is kinda a waste of talent, just my opinion, good work

  • @shourya9998
    @shourya9998 Před 3 lety +7

    This guy has got the skills, he should learn how to code

    • @gus.stviaaa
      @gus.stviaaa Před 3 lety

      Yeah totally

    • @destiny_02
      @destiny_02 Před 3 lety

      And you should learn how to set profile photo on CZcams

    • @shourya9998
      @shourya9998 Před 3 lety +2

      @@destiny_02 that joke went above your head, didn't it?

  • @gorge9774
    @gorge9774 Před 3 lety

    Can someone give me the code ?

    • @destiny_02
      @destiny_02 Před 3 lety +1

      Just use Google lens

    • @andyn6053
      @andyn6053 Před měsícem

      @@destiny_02 how?

    • @destiny_02
      @destiny_02 Před měsícem

      ​@@andyn6053google lens will let you copy text from a screenshot of this video.

  • @danx_x155
    @danx_x155 Před 3 lety

    Code code plzz

    • @NeuralNine
      @NeuralNine  Před 3 lety

      watch my Q&A episode 1

    • @danx_x155
      @danx_x155 Před 3 lety

      @@NeuralNine I'm getting errors need to compare it to mine

  • @north32street
    @north32street Před 3 lety +1

    this video doesn't make sense where are the predictions?????????

    • @robinweaver4690
      @robinweaver4690 Před 3 lety

      No predictions, it provides an indication of when might be good to buy and when might be good to sell

    • @north32street
      @north32street Před 3 lety +1

      @@robinweaver4690 i know that, but it oldy provides old indications

  • @Tendo_27
    @Tendo_27 Před rokem

    Thank you so much for this video!!