Skip to content

Step-by-step tutorial to extract data, analyze, and decide on stocks in the market using Django, Celery, TimescaleDB, Jupyter, OpenAI, and more.

License

Notifications You must be signed in to change notification settings

codingforentrepreneurs/Stock-Trading-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Trading Bot

Star this repo

Learn how to extract data, analyze, and decide on stocks in the market using Django, Celery, TimescaleDB, Jupyter, OpenAI, and more.

Thanks to Timescale for partnering with me on this tutorial.

Tech Stack

Tutorial

Getting Started

Download the following:

Open a command line (Terminal, VSCode Terminal, Cursor Terminal, Powershell, etc)

Clone this Repo

mkdir -p ~/dev/stock-trading-bot
cd ~/dev/stock-trading-bot
git clone https://github.com/codingforentrepreneurs/Stock-Trading-Bot .

Checkout the start branch

git checkout start
rm -rf .git
git init
git add --all
git commit -m "It's my bot now"

Create a Python vitual environment macOS/Linux/WSL

python3.12 -m venv venv
source venv/bin/activate

windows powershell

c:\Path\To\Python312\python.exe -m venv venv
.\venv\Scripts\activate

Install requirements

(venv) python -m pip install -r requirements.txt

Docker Compose Up (for local TimescaleDB and Redis)

docker compose -f compose.yaml up -d

If you don't have Docker, use TimescaleDB Cloud and Upstash Redis

Create .env in project root

mkdir -p ~/dev/stock-trading-bot
echo "" >> .env

Add DATABASE_URL and REDIS_URL to .env (these are based on the compose.yaml file):

DATABASE_URL="postgresql://postgres:postgres@localhost:5431/postgres"
REDIS_URL="redis://localhost:6378"

About

Step-by-step tutorial to extract data, analyze, and decide on stocks in the market using Django, Celery, TimescaleDB, Jupyter, OpenAI, and more.

Topics

Resources

License

Stars

Watchers

Forks