← All Articles

I’ve deployed a ChatGPT-generated algorithmic trading strategy. It’s beating the market.

This November 3, 2023 update follows the October paper-portfolio experiment. Read the original Medium story.

  AI-Powered Finance

Background

In October 2023, I began comparing AI-generated and optimized portfolios in forward paper trading. The preceding update had them lagging the market; this November 3 update describes how their recorded performance changed. These are simulated portfolios, not funded brokerage returns. The later July 2024 brokerage launch describes NexusTrade’s earlier period as paper trading and research only.

Want to follow along? Try out the AI Chat on NexusTrade for free today!

For a comprehensive understanding of the methodologies and initial stages of this experiment, check out the first article in this series: Unleashing AI in Trading: A Real-World Experiment with ChatGPT-Generated Strategies

Read: ChatGPT generated my algorithmic trading strategy. It beat the market. Re-optimizing the Sliding Window Portfolio

How did our portfolios perform?

Buy and Hold SPY

The stock market has been especially volatile these past few weeks. The Fed’s decision to not raise rates has spurred a market rally, bringing our Buy and Hold SPY Portfolio to a much-anticipated break-even point.

Experiment — GPT-generated portfolio

ChatGPT-Generated Portfolio

Consistent with our previous updates, the unoptimized ChatGPT-generated portfolio remains inactive, having not executed any trades to date.

The first halve of the response from the AI Agent

One and Done Optimized Portfolio

The one-and-done portfolio was optimized once at the experiment’s start, with no later parameter changes. This November 3 update describes it as the leading forward paper portfolio and ahead of SPY. The prose does not give a common observation timestamp, numerical return or drawdown for that comparison; the original charts remain below.

One and Done Optimized Portfolio

The next chart is a separate historical backtest against buy-and-hold TQQQ. Its window and values are not transcribed here, so it must not be combined with the forward paper comparison above.

The red line is the portfolio’s performance and the gray line is TQQQ’s performance

(Note: Backtests don't include the current day's performance)

While it’s too early to make any conclusions of the efficacy of optimizing portfolios, it’s promising to see at least one optimized portfolio performing so well. If one combined the speed of generating portfolios with ChatGPT, the expertise of a professional trader, and the power of genetic optimization, one can imagine an unparalleled trading experience. This is very promising.

Sliding Window and Expanding Window Optimized Portfolios

The sliding window optimized portfolio is re-optimized periodically, incrementing the start and end date during each optimization. During a prior re-optimization process, the strategy that was generated was a very high-risk/high-reward trading strategy that didn’t pay off. Here’s how it’s doing now.

Experiment — Sliding Window Optimization

Similar to the sliding window optimized portfolio, the expanding window optimized portfolio has similar performance. This portfolio is also re-optimized periodically, but the start date remains constant across all subsequent optimizations.

Experiment — Expanding Window Optimization

These portfolios demonstrate that the optimization process is not magic, and one needs to pay attention to the parameters of the portfolio after re-optimizing. Is the portfolio making unnecessarily high risks? Are there sane contingency plans if things don’t go your way? All important questions one should ask themselves when using an optimized portfolio.

Read: Why the heck would I use a genetic algorithm? – Aurora's Insights

Discussion

When I started this experiment, my goal was never to prove that ChatGPT is secretly a Wall Street trading prodigy. My objective was transparent from the onset: to leverage ChatGPT as a catalyst for accelerating the strategy development process. Armed with this AI, traders armed with inventive strategies can now rapidly prototype, test, and refine trading tactics, a feat that previously would have demanded an extensive background in programming and statistical analysis.

Consider the configuration process of the past. Traders were required to grapple with programming in languages like Python and C++, tackle advanced statistical analyses, and tediously embed their trading hypotheses into lines of code. This necessity is relegated to the past, as ChatGPT ushers in a no-code era, enabling traders to pivot their focus to the essence of their craft.

While it’s encouraging to observe some of our optimized portfolios surpassing traditional Buy and Hold approaches, we approach these results with skepticism. Optimization is inherently retrospective, enhancing performance based on historical data. Yet, past success is no crystal ball into future market dynamics, which are ever-evolving and unpredictable.

Read: You've Missed Out On The Latest In AI And Finance. Here's What Happened – Aurora's Insights

A Next Generation AI Platform

The AI-Powered Chat by NexusTrade is nothing less than a paradigm shift. Traders are empowered to generate and backtest strategies, as well as undertake exhaustive financial analyses. This chatbot is a key competitive edge that sets NexusTrade apart in the realm of algorithmic trading platforms.

The implications of an AI-Powered chat extend far beyond trading. Envision educators effortlessly crafting a week’s worth of lesson plans, unencumbered by the nuances of prompt engineering and RAG pipeline complexities. Picture businesses streamlining operations through chat applications that demand no coding expertise.

That’s the idea behind NexusGenAI. NexusGenAI will make it possible for non-technical users to develop complex chat bots in a simple, intuitive user interface. It will borrow many ideas from NexusTrade, and prioritize ease-of-use, configurability, and delivering value for its users. The website is (obviously) not refined, but if you’re interested in integrating AI for your personal or professional use-cases, subscribe to NexusGenAI to stay up-to-date with its progress.

Final Thoughts

This is an early forward paper update, not proof that optimization produces a durable edge. The inactive unoptimized portfolio and the weaker sliding/expanding variants are part of the same experiment. More rules would be another hypothesis to test, not an assured improvement.

Thank you for reading! Stay tuned for our next update on these portfolios. Interested in applying AI to finance? Log on to NexusTrade today!

  Go to NexusTrade  

📚 Follow our thought pieces on Medium 

 

🤝 Connect with me on LinkedIn

 

👨‍💻 Explore our projects on GitHub

 

📸 Catch us on Instagram

 

🎵 Dive into our TikTok 

Put your research to work

Create a free account to research a company, build a strategy with Aurora, or inspect a historical backtest. Choose the task you want to try.

or

Free to browse. No credit card required.

Discussion

Sign in or create a free account to join the discussion.

No comments yet.