This is a stock market trading bot that aims to utilize various methods of technical analysis to buy and sell securities with the intent of outperforming the market.
This bot operates by implementing numerous techinical trading strategies that operate independently of each other. The end user will eventually be able to designate how much of each strategy is utlized in their portfolio. The project utilizes the various API's and packages to get data and execute trades.
Source | Purpose |
---|---|
TwelveData API | Get real time technical indicators for analysis. |
YFinance Package (temporary) | Get more static stock data for initialization (such as market capitalization). |
Alpaca API | Read current positions and execute paper trades. |
RobinStocks Package | Get real time stock prices (temporary) and execute real money trades (coming soon). |
DISCLAIMER: This project is designed to use no paid APIs and therefore uses some unorthodox methods to get data and perform technical analysis, such as using multiple APIs and time delays to get around API limits.
Below is how the project is setup:
/TradingBot
/General
/Data
{CSVs containing general stock information}
- helper.py
/Strategies
/Algo Trading Strategy
/Data
{CSVs containing strategy specfic stock information}
/Logs
{CSVs containing day-to-day trade information}
-implementation.py
/Secrets
-keys.py
-main.py
-requirements.txt
Name | Purpose |
---|---|
General | Contains general stock information and helper methods to assist with algorithm implementation. |
Strategies | Contains each trading strategy and implementation |
main.py (coming soon) | Contains interface for end user to view all trading strategies and build their portfolio. |
requirements.txt | Contains all dependencies. |
Secrets | Contains api keys. |
- Clone repository onto local machine
git clone https://github.com/prajwalshah19/TradingBot.git
- Navigate to directory
cd TradingBot
- Install Dependencies
pip install -r requirements.txt
- Open
Secrets-Demo
, update the keys inkeys.py
and renameSecrets-Demo
toSecrets
Note: If your local machine is running Python 3.11, please set up a virtual environment with Python 3.10 to ensure dependency compatibility.
Coming Soon
Trading bot uses the following packages
pandas
andnumpy
for data analysis and csv formatting.requests
for making API calls to the TwevleData APIalpaca-py
for executing paper trades.yfinance
as a temporary solution for getting stock data.robin-stocks
to access stock information and eventually execute real money trades.time
,datetime
,pathlib
, andaiohttp
for other administrative tasks.
Contributions are welcome and encouraged. Please fork and make changes. For anyone with experience in algorithmic trading, feel free to implement your own strategy!
Pull requests are welcomed.
MIT License