Be part of a better internet.
Get 20% off membership for a limited time
AI image created on MidJourney V6 by the author
This member-only story is on us. Upgrade to access all of Medium.
Member-only story
52% Returns in 30 Days: Your GPT-4o Quant
Trading Bot Strategy
How to Profit in Any Market Condition with GPT-4o’s Mean Regression Strategies
Henrique Centieiro & Bee Lee · Follow
Published in Limitless Investor
6 min read · May 21, 2024
Listen Share More
Q uant trading can be profitable, but it has been reserved only for traders with
extensive resources, coding, and math skills or for large institutions.
That’s no longer the case! Now, thanks to ChatGPT, you can also benefit from quant
trading.
A quant trader is someone who uses computer algorithms and programs based on
mathematical and statistical models to analyze market data and find trading
opportunities.
Let’s go ahead and find a profitable quant trading strategy with the help of GPT-4o. I
will show you how simple it is!
One last thing before we start: I’m a guy who focuses on ‘fundamental analysis’ and
‘value investing’. If you follow me, you know that. These are the fundamentals of
successful long-term investing. The goal of this article is to open up possibilities. I
didn’t use the trading bot in this article with real money, and you shouldn’t either,
unless you understand it very well.
How GPT-4o is a Big Leap For Traders
GPT-4o was recently released and has new capabilities compared to previous LLM
models.
First, it understands images very well. This is great because now you can upload a
chart, and ChatGPT will help you create an indicator or strategy adapted to that
chart.
Second, GPT-4o is way faster and more accurate than previous models. Although
Claude is also pretty impressive and accurate, GPT-4o is better at understanding
images.
AI Large Language Model ranking leaderboard. Source: Stanford CRFM Holistic Evaluation of Language Models.
According to the HELM leaderboard above, which tracks the performance of
different models across different domains, GPT-4o comes right after Claude in
terms of the accuracy of the answers.
Image to Language leaderboard. Source: Stanford CRFM Holistic Evaluation of Language Models.
When it comes to VLMs—Visual to Language Models—GPT-4o is way ahead of the
competitors. This is great because we want it to understand our charts well and
create a trading strategy based on a chart that we upload to GPT-4o.
If you want to get the best out of any of these AIs, I’d recommend keeping an eye on
the leaderboards above, as they evolve extremely fast.
Let’s go ahead and create a profitable trading strategy with ChatGPT. To start, I’d
recommend reading this article if you haven’t done it yet:
Use This ChatGPT Trading Bot to Beat 99% of Wall Street
Investors!
Step-by-Step of How to Create a Profitable Trading Bot & How to
Backtest it with Zero Coding Knowledge Needed.
medium.datadriveninvestor.com
Create Your Quant Trading Bot with GPT-4o
Full disclosure: I created a bot that generated a 52% return in one month. However,
nothing in trading is guaranteed, and past results, as much as we might hope, may
not correspond to future returns.
Considering this, the goal of this article is to equip you with the tools to imagine,
create, test, and eventually profit from your AI-assisted quant trading strategy.
We will use TradingView to test our AI trading strategy. If you don’t have a free
TradingView account, feel free to use my affiliate link at no extra cost to you. Thanks for
the support!
Let’s get straight into it.
Step 1 — Select Your Asset
For quant trading strategies such as mean reversion, assets that trade sideways often
produce better results. So, I decided to select Ethereum, as it has been trading
sideways for months.
I want to see if we can create a trading bot that profits when the market is sideways
or even declining.
Open in app
Search
Chart from TradingView.
Step 2 — Prompt GPT-4o with the Chart
Simple prompts are often more effective than very long and complex ones. Your
prompt needs to be clear and simple. In this case, I prompted the AI the following
together with the chart:
Create a profitable mean regression Pine 5 quant strategy for the asset in the
chart.
Source: Poe/GPT-4o screenshot by the author.
GPT-4o replied with a strategy that consists of using Bollinger Bands together with
RSI.
Step 3 — Copy/Paste the Pinescript Code to TradingView
Go to the Pine Editor on TradingView and paste the code there. Then, add it to the
chart. The strategy should now be backtested on the chart and in the Strategy Tester
tab.
If you don’t know how to backtest your strategy on TradingView, I would highly
recommend checking the steps in the articles below:
Use This ChatGPT Trading Bot to Beat 99% of Wall Street Investors!
Build the Best ChatGPT Trading Bots with my “DEBOPIE” Framework
If you have added the strategy correctly to TradingView, you should see something
like the chart below: some open trades on the chart and the backtesting results at
the bottom.
Chart from TradingView.
Step 4 — Fine Tune Your Quant Strategy
Now, you have to manually optimize your strategy in addition to testing it a hundred
times more.
Test your strategy across different time frames and different parameters. Play
around with all these values and see which ones produce the best results.
Chart from TradingView.
It’s crucial to test your strategy extensively before applying it to real money.
My Outstanding Returns (On Backtesting)
In my backtesting, the strategy created by GPT-4o produced very impressive results,
as you can see:
Backtesting from TradingView.
Over a 1-month period, the strategy generated an amazing 52% return trading
Ethereum (ETH/USD).
In the chart above, the blue line represents a “buy-and-hold” strategy, which would
have returned -7% during this period.
So, a 52% profit was generated using the bot, vs. a
7% loss for the buy-and-hold strategy.
This shows that the mean regression strategy created by AI can be profitable even
when the market is trading sideways or even in downtrends.
If you have been following along, you know that I’m building an antifragile
investment portfolio that benefits from any market situation.
Although the results above require more testing, I’m glad to see that outstanding
returns can be generated even when the market is not favorable.
Conclusion
Your work doesn’t stop here. To perfect your trading strategy, you will have to
continue backtesting it, optimizing it, and extending it.
To help with this process of optimizing your trading bot, I’ve written this article:
Build the Best ChatGPT Trading Bots with my “DEBOPIE”
Framework
Follow my unique DEBOPIE framework if you want to achieve great
results with ChatGPT trading bots.
medium.datadriveninvestor.com
Remember, the key to trading success is not just having a profitable strategy but also
continuously refining and adapting it to changing market conditions.
With the help of AI tools like GPT-4o and your commitment to ongoing learning and
improvement, you can take your trading to the next level, even in challenging
market environments.
— Henrique Centieiro
If you found any value in this article, throw me some Medium love!
What you can do to support my work:
Clap up to 50, leave a message to share your thoughts &
be sure to follow.
Follow my Limitless Investor publication for more valuable content in the future:
Limitless Investor
Financial Freedom | Wealth Management | Investing | Passive
Investing | Value Investing | Portfolio Managment | Stock…
medium.com
Stay in touch:
Your Place for Crypto, AI, Blockchain & Investment Knowledge |
Linktree
Click to check *Limited Discount Vouchers* for all my online courses
where I have over 55,000 students, my social media…
linktr.ee
ChatGPT Artificial Intelligence Trading Bot Trading Investing
Follow
Written by Henrique Centieiro & Bee Lee
19.3K Followers · Editor for Limitless Investor
8X Top Writer | Crypto, AI, MidJourney, Tech, Investing, Mindset | Founder of https://medium.com/be-
limitless | Stay in Touch: https://linktr.ee/cryptohenri
More from Henrique Centieiro & Bee Lee and Limitless Investor
Henrique Centieiro & Bee Lee in The Generator
Top 20 GPT-4o Use Cases That Actually Improve Your Everyday Life
These Are Mindblowing AI Use Cases!
Jun 26 2.7K 47
Henrique Centieiro & Bee Lee in Limitless Investor
How to Get “Fuck You Money”
How You Can Truly Reach the “Fuck You Money” State That Goes Beyond Wealth
Jul 2 1.96K 21
Henrique Centieiro & Bee Lee in Limitless Investor
How to Maximize Your Crypto Passive Income
How I Transformed My Idle Digital Assets Into A Steady Stream Of Revenue.
Jun 24 503 9
Henrique Centieiro & Bee Lee in DataDrivenInvestor
I Beat 98.4% of Wall Street Investment Funds Last Year. Here’s How.
This might be the most important investment article you’ve read to build wealth with the stock
market (and also crypto).
Jan 30 1.6K 20
See all from Henrique Centieiro & Bee Lee
See all from Limitless Investor
Recommended from Medium
Henrique Centieiro & Bee Lee in DataDrivenInvestor
Build the Best ChatGPT Trading Bots with my “DEBOPIE” Framework
Follow my unique DEBOPIE framework if you want to achieve great results with ChatGPT
trading bots.
Feb 15 889 5
Abhay Parashar in The Pythoneers
17 Mindblowing Python Automation Scripts I Use Everyday
Scripts That Increased My Productivity and Performance
4d ago 5K 37
Lists
ChatGPT
21 stories · 736 saves
ChatGPT prompts
48 stories · 1847 saves
What is ChatGPT?
9 stories · 402 saves
AI Regulation
6 stories · 524 saves
Hesam Sheikh in Towards AI
Learn Anything with AI and the Feynman Technique
study any concept in four easy steps, by applying AI and a Noble Prize winner approach
Jul 8 1.3K 13
Alexander Nguyen in Level Up Coding
The resume that got a software engineer a $300,000 job at Google.
1-page. Well-formatted.
Jun 1 15.3K 235
Khyati Jain in In Fitness And In Health
You Destroy Your Brain Health Rapidly With These 4 Stupid Daily Habits
Your lifestyle is the main culprit for a distracted brain.
Apr 25 11.4K 183
Onyedikachukwu Czar in The Startup
I Asked Google Gemini To Come Up With Business Ideas Not Found
Elsewhere; I Got Blown Away
How to use AI to iterate ideas and come up with what stands out.
Jul 12 1.93K 34
See more recommendations