Oddbean new post about | logout
 Crisis to Innovation: My First AI Trading Strategy Addresses Food Costs
Flextiger / 摺叠虎


In the vast universe of investing, the initial step often poses a significant challenge. As one might hesitate before writing the first sentence of an email, designing an investment strategy can be daunting. While many may relate, especially when using tools like Composer, there’s good news. I leveraged my economic and investment knowledge to design an algorithmic strategy with AI help.

https://miro.medium.com/v2/resize:fit:4800/format:webp/1*ULPKZh4ybZAGT_OkJwl_yg.png

The Collaboration:

Our journey began by coaching the AI through examples and feedback to grasp nuances of Composer’s coding language. My core thesis was to benefit from rising food prices in late 2023–2024. The strategy pivoted investments to food stocks when they outperformed QQQ, an ETF tracking the tech-heavy Nasdaq-100. If QQQ performed better, it reverted investments there.

The initial generated code had errors. Rigorous backtesting revealed flaws, so the AI and I refined the strategy. Subsequent backtests were promising.
https://miro.medium.com/v2/resize:fit:4800/format:webp/1*kxKdEHglnPzx6UDgxCl9Lw.png


The Final Strategy: A Dynamic Food vs. Tech Approach

With global food costs rising, this strategy capitalizes on anticipated price surges. It compares food-related assets to the Nasdaq-100 index (QQQ ETF) and allocates funds accordingly. When food stocks show strength, it seizes the opportunity. Underperformance triggers a pivot back to QQQ for broader resilience.

Key Backtest Results:

Annualized Return: 56.4%
Max Drawdown: 7.2%
Sharpe Ratio: 2.73
https://miro.medium.com/v2/resize:fit:4800/format:webp/1*cT-rn066waJCH2ukQjhjdw.png
(Generated via simulation. Not indicative of actual performance.)


Reflections on Human vs. AI Collaboration:

In algorithmic strategy design, AI like Composer offers undeniable efficiency. However, human expertise remains irreplaceable. A strategy stems from understanding economics, portfolio theory, and risk preferences — insights an AI alone cannot replicate.

The AI acts as an able driver to efficiently translate our vision into rigorously tested code. But human knowledge provides the strategic roadmap and navigation. Together, we accomplish more than either could alone. This proves investing still requires human intuition.

As AI capabilities grow, remembering the value of human intellect will be critical. For now, and likely the future, investment strategies will thrive on human guidance and knowledge.

If you are interested in trying my Food Price vs. QQQ Strategy, here is the link to it (https://app.composer.trade/symphony/FoGFGuWwaOy1vD2wehjc/details). Here is the logic behind the strategy.
https://miro.medium.com/v2/resize:fit:4800/format:webp/1*0sbnl_4UH0hHWceUgwMBqQ.png


If this glimpse into creating an AI-assisted trading strategy was intriguing, I encourage you to try Composer using my referral code zpxGrUX-TRADE to register and trade. By signing up and trading through this link, you can help support my work in writing more fascinating articles like this one. Composer makes it easy for anyone to develop algorithms — whether you’re an experienced quant or just starting out. The intuitive interface translates ideas into profitable automated strategies. An AI can even learn the ropes with some guidance!

My LN Address: flextiger@getalby.com

My Nostr: 
npub1gu5m9syh529vkw4ncq688cevd8ye3ux5ke70lv30w0dywcr5kj5smavf6c

LinkedIn: https://www.linkedin.com/in/flex-tiger-23b930229/
Medium: Flextiger
Twitter: FlextigerA


Composer
Algorithmic Trading
Ai Trading
Stock Trading
Chatgpt Trading