Algorithmic trading is a method of executing orders using automated pre-programmed trading instructions accounting for variables such as time, price, and volume. This type of trading attempts to leverage the speed and computational resources of computers relative to human traders (According to Wikipedia)
I took a great class at Hult International Business School called Financial Trading in Python in the Summer of 2022. Highly recommend it!
They had us prep for the course by taking this course on Datacamp: https://app.datacamp.com/learn/courses/financial-trading-in-python
This course was very helpful in setting up the foundation.
I am sharing my own work and any other subscripts I used to create my own works.
We used Anaconda, its a tool to help you install your environment for Python and getting an IDE setup. We downloaded and installed Anaconda from here: https://www.anaconda.com/products/distribution
Install Help for Anaconda & Spyder (my IDE of choice)
How to install one a Mac: https://www.youtube.com/watch?v=2JeoNlCcLOM
How to install on Windows 10: https://www.youtube.com/watch?v=a7Ylbn1ikF0
Which we then installed & used Spyder, an IDE, from there. Its like a Jupyter Notebook but different. Spyder and Jupiter both allow you to fiddle with the data frames, variables, and the plots and graphs.
Everything we did to download data from Yahoo Finance and put it into data frames was done using this package called BT for everything:
You may need to install it using “pip install bt” in a console window.
We used numpy and matplotlib. Great and very useful libraries for Finance and plotting.
I posted some of my sample code here on my Github: https://github.com/Thareja/FinancialTradingPython
Feel free to reach out to me if you have any questions.
I will say though the one thing we realized is with markets going up and down from anomalies like Markets Crashes 2008 or Covid or War – the buy and hold strategy legitimately is the best strategy. Value investing like what Warren Buffet does is the best way to build wealth.
No matter how amazing the strategy we built when tested on one of these anomaly periods we lost money. Overall we made money but never more than buy and hold. Good luck!
Leave a Reply