Skip to content

DanishjeetSingh/algo_trading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithmic Trading using GPT and Alpaca

Stock trading bot built on Inverse Cramer Strategy

How does it work?

  • Get last 50 tweets from jim cramer's Twitter handle
  • Feed it to a GPT model and ask for stock tickers to sell
  • Buy the first stock with 90% of your buying power through Alpaca

How to use this bot?

Setup a cron job to run trading.py

crontab -e

the below command ensures the code runs at 9 AM from M-F (remember to change the time incase your machine is not in EST)

0 9 * * 1-5 python3 trading.py

stuff to do

  • the twitter endpoint doesn't work anymore, switch to scraping
  • send the log messages to a discord server as well.

helpful tips

  • you can modify the logging in trading.py to be a QueueHandler and create a thread worker to capture those
  • which later on can be captured by the discord bot in bot.py to send the messages to your channel.

Helpful resources

About

Algorithmic Trading using GPT and Alpaca based on the Inverse Cramer Strategy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published