← All Articles
From Aurora's Insights: The AI-Focused Finance Blog
AI-Powered Finance

Background

Two weeks ago, I launched an experiment for something that has never before been done – creating, optimizing, and deploying automated trading strategies generated by ChatGPT. The procedure was simple – have OpenAI generate a trading strategy that it thinks will be profitable, and then optimize those strategies using genetic algorithms. Today, we're going to give an update and see exactly how well those portfolios have performed over time. 

For the first update on these AI-Generated portfolios, check out this article: I launched 5 different AI-Generated Portfolios into the market. Here’s what happened over the past week.

Re-optimized portfolio

How did our portfolios perform?

Buy and Hold SPY

The stock market has been especially tumultuous these past few weeks. The S&P 500 experienced a fall of 3%.

Experiment – Buy and Hold SPY

ChatGPT-Generated Portfolio

Ironically, the unoptimized ChatGPT portfolio had the best performance by far. Because the strategies were leveraged bullish strategies and the market was bearish these past two weeks, the portfolio that didn't execute any trades had the best performance.

GPT-Generated Portfolio

It would be awesome to conclude that ChatGPT is simply a trading genius under the hood. Unfortunately, this is simply not a reality. The base strategy generated by ChatGPT has parameters that are extremely unlikely to execute in any scenario. Nevertheless, it's a funny conclusion that the untouched GPT-Generated Portfolio performed the best.

Backtest Performance of GPT-Generated Portfolio in the Past 5 Years

One and Done Optimized Portfolio

The "One and Done Optimized Portfolio" was optimized once when the experiment launched, and was never re-optimized. This portfolio did the next best, losing around 6% these past 2 weeks.

Sliding Window Optimized Portfolio

The sliding window portfolio was optimized initially, and is re-optimized each week. For each subsequent optimization, we increment the start and end date. The Sliding Window Optimized Portfolio didn't perform great; it lost more than $1,000 in the past 2 weeks. 

This is significantly worse than even Buying and Hold TQQQ, the asset that this portfolio is trading.

Expanding Window Optimized Portfolio

The expanding window optimized portfolio is similar to the sliding window portfolio. The only difference is that the expanding window portfolio keeps the start date the same and increments the end date during each subsequent optimization. This portfolio performed the worse, losing even more money than the sliding window optimized portfolio.

Experiment – Expanding Window Optimized Portfolio

We can draw some interesting conclusion from these preliminary results.

Lessons Learned

Risk Management

Something that I overlooked when choosing the new optimized portfolio is the risk management strategy. When optimizing a portfolio, it generates a population of high-performing portfolios. Some individuals in the population may have higher returns with higher risk, and other individuals may have a lower drawdown with less return. 

When choosing a new optimized portfolio, I initially focused on the raw gains. As a result, the newly optimized portfolios had strategies that caused them to spend all of their buying power on TQQQ, a triple-leveraged highly volatile stock. This works well if the market is bullish, but horrendously when the market is bearish, as demonstrated by these results. 

In hindsight, we should've chosen a more balanced portfolio, similar to the One and Done Optimization Portfolio. This would have given us options when the market is bearish and bullish.

Choosing the right fitness function

Similarly, during optimization, I focused on the sharpe ratio, sortino ratio, and raw percent change. While there's nothing inherently wrong with this approach, it caused me to overlook the potential drawdown of some of the options I was presented with. In hindsight, looking at max and average drawdown could've caused us to choose a portfolio that was less risky.

During this subsequent optimization, I looked at the drawdown of the new portfolios and deliberately chose ones that had lower drawdowns.

New Sliding Window Optimized Portfolio

Updates to the Optimization Engine

Different Initial Starting Positions

When optimizing a portfolio, NexusTrade reset the initial positions that were in the portfolio. As described in this article, a major goal for NexusTrade is maximum configurability. Thus, we've improved the optimization process by including many options for the initial positions, including random positions, no positions, and the current positions in the portfolio that we're optimizing.

Bug Fixes 🐛

Initially, there was a bug for optimizing compound indicators. The system wouldn't perform crossover and mutation operations for these indicators correctly. This bug has been identified and fixed.

Aside: NexusTrade Referral Program

The optimization engine is one of the most powerful and unique features that NexusTrade has to offer. However, it's very computationally expensive. Thus, we're doing a slow launch for a small subset of power-users on the platform.

 

Do you want early access? Here's what you have to do!

  1. Confirm your email address by going to the profile page.
  2. Invite your friends with your unique referral code.
  3. Make sure your friends confirm their email addresses.
  4. Email us at nexustrade@starks-technology.com saying that you want early access to the optimization engine.

What are the exact rewards? They are outstanding!

  • Invite 5 2 friends for 1 week of access 😲
  • Invite 10 5 friends for 1 month of access 😱
  • Invite 25 15 friends for 6 months of access 💀
  • If you invite more than 15 people, you will receive a special invitation from the creator of NexusTrade, Austin Starks 🥳

Referring your friends is the ONLY way to get access to these premium features for FREE. 

Final Thoughts

It's far too early to draw any major conclusions from these results. Yet, even this early in the experiment, we've already had some interesting insights on the efficacy of these ChatGPT-generated portfolios. We learned some interesting lessons regarding risk management and our choice of fitness function, and these lessons can be applied when launching our next experiment.

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

 

📚 Follow our thought pieces on Medium 

 

🤝 Connect with me on LinkedIn

 

👨‍💻 Explore our projects on GitHub

 

📸 Catch us on Instagram

 

🎵 Dive into our TikTok 

Discussion

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

No comments yet.