A full stack application to help choose stocks for trading algorithms. This also includes a SQLite database of historical data to train the algorithms on.
With inspiration from several trading and investors across the internet, the goal is to create a full stack application that I can deploy and use as a market trading platform but also a way to find new opportunities.
So far this is a fairly simple project with only limitted support for trading strategies. But I will continue to add more generic strategies and custom ones going forward.
There are also plans to support options and algorithmic trading in the future.
I would love to create a bot that trades throughout the day and posts it's trades/value on a live chart.
This app is built on FastAPI and Uvicorn. To start a local Uvicorn server run:
uvicorn main:app --reload
Most development happens in the main.py file but there are other scripts to populate your database with stock data.
This app is not ready for deployment as of yet, but to run it locally you need to populate a secrets.py file.
After creating the secrets.py file, you need to run a sequence of scripts to build oyur backend and database.
Run create_db.py to build your SQLite database and schema.
python create_db.py
Run populate_stocks.py to populate the SQLite database with the ticker symbols and information about each company/etf/fund.
python populate_stocks.py
Run populate_prices.py to gather the historical data for each symbol from the Alpaca API.
python populate_prices.py
- Generate project scaffolding.
- Build database and schema.
- Make scripts to populate DB.
- Populate the DB.
- Create front end to display, sort, and find symbols.
- Create details page to display symbol info.
- Create trading strategies.
- Allow application of trading strategies by stock.
- Basic trading algorithm/bot.
- Execute trades by user direction.
- Execute trades by bot direction.
- Create trade tracker
- SQLite - Database
- FastAPI - Server Framework
- Semantic UI - Frontend Framework
- Uvicorn - Server Environment
See also the list of contributors who participated in this project.
Check out Part Time Larry for inspiration and tutorials.