WP Tutorials

Algorithmic Trading Using Python – Full Course

Algorithmic Trading Using Python – Full Course

Algorithmic Trading Using Python – Full Course



Learn how to perform algorithmic trading using Python in this complete course. Algorithmic trading means using computers to make investment decisions. Computer algorithms can make trades at a speed and frequency that is not possible by a human.

After learning the basics of algorithmic trading, you will learn how to build three algorithmic trading projects.

💻 Code: https://github.com/nickmccullum/algorithmic-trading-python

✏️ Course developed by Nick McCullum. Learn more about Nick here: https://nickmccullum.com/

⭐️ Course Contents ⭐️
⌨️ (0:00:00) Algorithmic Trading Fundamentals & API Basics
⌨️ (0:17:20) Building An Equal-Weight S&P 500 Index Fund
⌨️ (1:38:44) Building A Quantitative Momentum Investing Strategy
⌨️ (2:54:02) Building A Quantitative Value Investing Strategy

Note that this course is meant for educational purposes only. The data and information presented in this video is not investment advice. One benefit of this course is that you get access to unlimited scrambled test data (rather than live production data), so that you can experiment as much as you want without risking any money or paying any fees.

This course is original content created by freeCodeCamp. This content was created using data and a grant provided by IEX Cloud. You can learn more about IEX Cloud here: https://iexcloud.io/

Any opinions or assertions contained herein do not represent the opinions or beliefs of IEX Cloud, its third-party data providers, or any of its affiliates or employees.

source

Comments (47)

  1. This is great content! I hope Freecodecamp does more about Algorithmic Trading for other languages (Rust, C++).

  2. The API no longer works. I dont really understand if what I am saying makes sense, but IEX Cloud is shutting down apparently. Could you please suggest a workaround?
    Just FYI, what this means is that the access to the API token provided in the video is restricted.

  3. Niceee

  4. Really helpful! Thank you👍

  5. Before you guys start . The API token is deprecated so stuck at 42min. !!!!

  6. which linux distro is he using?

  7. Audio sucks

  8. Could you do a course about vectorbtpro?

  9. Hello. I have no coding experience in Python. Could you please direct me to the freeCodeCamp course on Python, of which there are a few, that would prepare me best for taking your course on algorithmic trading? Thanks.

  10. The API token is not valid anymore, kindly correct it or suggest any other token that we can use

  11. It's June 2024 and it is giving the error "Sandbox environment is disabled for this subscription tier." , API key may have expired. Can you please update the key!

  12. totally left out section 2, regarding how to set up and get started, that would be really useful to have…

  13. What we can learn next? Can we have some resources where we can learn more.

  14. Hey I'm getting a JSON Decode Error while using batch calls, what do I do?

  15. after running again all the codes it shows the same error

  16. Halfway through and think this is very cool. However, I wish you didn't have the pip. It covers almost 25% of the window and obscures some important parts of the screen.

  17. in Tamilnadu almost all politicians and govt servants are against the Tamil. bribe, corruption, no justice, no respect, discrimination all done here itself. But the life outside India we get all these in countries like Singapore, USA,uae ETC

  18. link to buy your keyboard please 🙏

  19. The section on Parsing our API Call simply does not work using current versions of code (https://youtu.be/xfzGZB4HhEE?t=2727). Has anyone found an up to date solution (May 2024)?

  20. However, in real life we do not use Python for algorithmic trading 🙂

  21. To all those who are referring the course in 2024, following might help :

    instead of IEX we can use yfinance library

    import yfinance as yf
    tickerSymbol = 'AAPL'
    tickerData = yf.Ticker(tickerSymbol)

    # Get the historical prices for this ticker
    tickerDf = tickerData.history(period='1d', start='2024-05-09', end='2024-05-10')
    marketCap= tickerData.info['marketCap']

    price= tickerDf['Open']

    and also these prices are the live market value prices.

  22. Well said. Well reasoned. I have been doing the carnivore diet for more than a year now. I am super pleased with the results.

  23. wondering if anyone knows what are the dependencies to be installed mentioned at ~17:25, please?

  24. When making the api call I got a JSON decoder error. Wrapped it in a try-except block and got a 403 Client Error: Sandbox environment is disabled for this subscription tier.

  25. "Rewind back to the last section and install all of the dependencies." Is that section really in this video? What's the timestamp?

  26. Are there any pre- requsites for this tutorial?

  27. 💀

  28. There were a few questions I had while watching (I am a noob so sorry if any of them sound dumb):
    – How do you deploy that? I imagine you wouldn't want it running in Jupyter Notebook.
    – Is the accuracy-loss of floats safe to ignore?
    – While the concept of high-quality vs low-quality momentum makes sense, why is momentum a good metric? Isn't it likely that since you rely on data from a year ago, your model identify stocks that have already seen their growth and won't grow more? (Like making you buy at high, instead of low)
    – Would it be sensible instead of calculating a score to sort all the columns based on different return_percentiles?

    – Also, when do you know to sell? I know the premise was that we have a team of traders to whom we send our excel files, but while they'd be able to know how many stocks to buy based on our position and the filtering we did, how do they know when to sell?

  29. "Let's do something more reasonanle, like a **milion dollars**"… hahaha, I am learning algotrading to get there. But we're not there yet.

  30. Thank you!

  31. How much money has this guy lost in the market so far?
    LOL.

  32. Incredible course. Thank you very much!

  33. "how to loose money in 3 steps – full course"

  34. run in Chat GPT in 12 seconds

    # Define the stock symbol and date range

    stock_symbol = 'SPY' # Example: SPDR S&P 500 ETF Trust

    start_date = '2020-01-01'

    end_date = '2024-03-18'

    # Download historical stock data

    stock_data = yf.download(stock_symbol, start=start_date, end=end_date)

    # Calculate moving averages

    stock_data['50_MA'] = stock_data['Close'].rolling(window=50).mean()

    stock_data['200_MA'] = stock_data['Close'].rolling(window=200).mean()

    # Generate buy/sell signals based on Golden Cross

    stock_data['Signal'] = 0

    stock_data.loc[stock_data['50_MA'] > stock_data['200_MA'], 'Signal'] = 1 # Buy signal

    stock_data.loc[stock_data['50_MA'] < stock_data['200_MA'], 'Signal'] = -1 # Sell signal

    # Execute trades based on signals

    position = 0 # 0: No position, 1: Long, -1: Short

    for index, row in stock_data.iterrows():

    if row['Signal'] == 1 and position == 0:

    print(f"Buy {stock_symbol} at {row['Close']:.2f}")

    position = 1

    elif row['Signal'] == -1 and position == 1:

    print(f"Sell {stock_symbol} at {row['Close']:.2f}")

    position = 0

    # Optional: Visualize moving averages

    stock_data[['Close', '50_MA', '200_MA']].plot(figsize=(10, 6))

  35. helped greatly in my final project

  36. Hey, I just started this course and I am encountering error in the first project while importing the data using sandbox. Instead of response 200 i am getting 403 which i am unable to debug. If I am not wrong sandbox has been deprecated right?

  37. GOAT

  38. 4:40 I can't make out what you said.

  39. I'm finding issues with API pull as it returns code 403. Can anyone please help?
    Thanks

  40. 18:02 how to get these i am not getting these

  41. Honesty you are an amazing professional. Thank you so much for your teaching, this video is gold and opens the door to unbelievable trading strategies using Python and quantitative methods

  42. did this work very well? what were the results like before I start trying this?

  43. Where is the section on installing the dependencies?

  44. Hello everyone, I am newbie. Could you please advise which foundational knowledge I should learn before staring to follow this video? Thanks a lot and have a nice day!

  45. cant download the secrets.py file. need help.

Leave your thought here

Your email address will not be published. Required fields are marked *

Enable Notifications OK No thanks