Python and Alpaca API
Automated Stock Trader
Live paper trading
Project snapshot
I used Alpaca's API and my personal strategies written in Python.
I built an automated stock trader that gathered historical market data, tested strategies against that data, and then connected the final version to live Alpaca data.
The materials I used are:
- Alpaca's API
- Python
- Historical stock data
- Strategy backtesting
- Live paper trading data
Code
Python code
I began with learning the basics of stocks and stock trading.
Then I began with gathering past data from Alpaca to see if I could find any patterns. This is when I began creating strategies to test on historical data.
I compared my results from different strategies.
Once I chose my final strategy (strategy6) I connected it to live data. I was able to earn a 3.8% increase in 10 days, while the average increase is 0.38% on the S&P 500.