I created an bot that predicts daily stock movements with 100% accuracy. You can verify these predictions yourself by checking out my bot on X. While my bot is currently only running on SPY, I believe it can be generalized to any stock or even cryptocurrency.
Here’s the secret to the algorithm: hindsight is 20/20, hence the name 2020stockpicks. Once a day, my bot will make two predictions:
- The stock will go up.
- The stock will go down.
At the end of the day, my bot will check to see what direction the stock actually went and delete the incorrect prediction.
At first glance, you might think this is a useless. However, it is actually quite simple to use this bot to build generational wealth. The steps you should follow are:
- Check my Twitter/X feed to see what direction the stock moved today.
- Go back to yesterday and place the appropriate trade.
Step 2 is left as an exercise to the reader. Follow me for more financial advice.*
*This is clearly not financial advice. Past performance does not guarantee future results. You should carefully consider if time travel is aligned with your personal investment strategies, goals, and risk tolerance.
How the bot works
The algorithm the bot runs is simple. It just needs a little bit of integration to make it work.
Pre-Requirements
- Set up a Twitter/X account for the bot and get access to the API(I followed this turorial).
- Set up an Alpaca account and get access to the API.
Requirements
-
Once per day the bot should make a prediction for tomorrow’s stock movement.
a. Two tweets are published. One stating that the stock will go up and one stating that the stock will go down.
Prediction: SPY will close below open on 06/20 📉
— Stock Predictions (@2020stockpicks) June 19, 2024b. The IDs of these tweets are saved. (You could also use the Twitter/X API to fetch the IDs at a later time instead of saving them)
-
Once per day the bot should adjust the previous predictions to be correct.
a. Use Alpaca’s API to fetch the open and close value of the stock to determine whether it moved up or down.
b. Find the corresponding tweet id for the stock movement and delete it. E.g. if the stock moved down, find the tweet ID for the stock that predicted it would go up.
-
Once per day the bot should post the actual stock movement so it is easy for followers to see the bots accuracy
a. Using the data from step 2, publish a new Tweet with the actual stock movement.
Actual: SPY moved -0.05% from open on 06/21 📉
— Stock Predictions (@2020stockpicks) June 21, 2024 -
Predictions should only be made for days the market is open.
a. Use Alpaca’s API to determine what days the markets are open.
And that’s it. My only goal for this project was to build an introduction to the Twitter/X and Alpaca APIs and get a clickbait title out of it.