I've always been a long-term buy-and-hold investor, but recently it seems like everyone is making big money off of technical analysis and automated trading. As someone who knows how to code, I decided to leverage generative AI to beat the market, going beyond just asking ChatGPT for investment advice.
This article narrates my journey in building an AI-powered stock trading algorithm using Google's Gemini Pro Vision model, its trials and tribulations, and eventually compares its performance against my handpicked stock portfolio.
Initially, I wanted to find out if an AI could even understand stock charts. To do this, I started with Google’s Maker Suite. I tested it with simple images and stock charts. Surprisingly, it recognized the patterns and could identify stock prices and trends from the screenshots.
With an AI capable of understanding stock charts, I moved on to build the bot:
To test the effectiveness of my AI, I pitted it against my handpicked stock portfolio over one week. I allocated $ 1,000 for the AI to invest and chose 10 stocks that I thought would perform best.
The bot started by recommending stocks like Tesla, Nvidia, and Microsoft. By the end of Day 1, my handpicked portfolio was up 2.96%, while the bot was only up $ 3.
The bot showed more creativity in its strategy, buying and selling stocks, but it still had mixed results. Meanwhile, I made no changes to my handpicked portfolio, waiting for concrete news.
As the week progressed, the bot made several confusing moves, buying and selling stocks frequently. However, it slowly caught up to my handpicked portfolio’s performance. By the end of Day 5, the bot had technically won, making $ 62.65 compared to my $ 78.
Though the AI made some money, the peace of mind from not having to trade every day made me favor the traditional investing approach. While the bot showed potential, it still required considerable oversight and tweaks. It was a fascinating journey, and I learned a lot about the capabilities and limitations of modern AI in stock trading.
[Final thoughts on improving the bot and learning costs]
Q1: What is the main goal of building the AI stock trading bot? A1: The main goal was to leverage generative AI to read stock charts and make profitable trading decisions, aiming to outperform traditional long-term investing methods.
Q2: Which AI model did you use for this experiment? A2: I used Google's Gemini Pro Vision model for this experiment.
Q3: How did the AI perform compared to the handpicked portfolio? A3: Over one week, the AI made $ 62.65, while my handpicked portfolio made $ 78, showing that the bot was competitive but fell short of the human approach.
Q4: What were the main challenges faced while building the bot? A4: The main challenges included getting the AI to reliably recognize stock chart patterns, debugging code issues, and ensuring the AI used the actual images instead of guessing from URLs.
Q5: Will you continue using the AI bot for trading? A5: While the AI bot showed potential, I prefer the peace of mind that comes with traditional investing and do not plan to rely on the bot for daily trades.
In addition to the incredible tools mentioned above, for those looking to elevate their video creation process even further, Topview.ai stands out as a revolutionary online AI video editor.
TopView.ai provides two powerful tools to help you make ads video in one click.
Materials to Video: you can upload your raw footage or pictures, TopView.ai will edit video based on media you uploaded for you.
Link to Video: you can paste an E-Commerce product link, TopView.ai will generate a video for you.