← Latest papers
🤖 AI

Moira: Language-driven Hierarchical Reinforcement Learning for Pair Trading

The paper proposes "Moira," a language-driven hierarchical reinforcement learning framework that utilizes large language models for both high-level pair selection and low-level execution, optimizing them exclusively through prompt updates based on textual feedback to address credit assignment challenges in pair trading.

Original authors: Polydoros Giannouris, Yuechen Jiang, Lingfei Qian, Yuyan Wang, Xueqing Peng, Jimin Huang, Guojun Xiong, Sophia Ananiadou

Published 2026-05-06
📖 4 min read☕ Coffee break read

Original authors: Polydoros Giannouris, Yuechen Jiang, Lingfei Qian, Yuyan Wang, Xueqing Peng, Jimin Huang, Guojun Xiong, Sophia Ananiadou

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are running a very sophisticated trading firm, but instead of hiring a team of humans, you have two specialized AI assistants working together. This paper introduces a system called Moira that uses these two AI assistants to make money by trading pairs of stocks (buying one and selling another simultaneously).

Here is how Moira works, explained through simple analogies:

1. The Problem: The "Blame Game"

In traditional trading systems, if you lose money, it's often a mystery. Did you pick the wrong stocks to trade? Or did you just buy and sell at the wrong times? It's like a chef serving a bad meal and not knowing if the problem was the recipe (the high-level plan) or the cooking (the low-level execution). Because the feedback (profit or loss) comes days or weeks later, it's hard to know who to blame or how to fix it.

2. The Solution: A Two-Manager Team

Moira solves this by splitting the job into two distinct roles, just like a business has a Strategist and a Tactician.

  • The Strategist (The "Selector"): This is the high-level boss. Their only job is to look at the big picture—economic news, long-term trends, and market sentiment—and pick one pair of stocks to trade for the next month. Once they pick a pair, they step back. They don't touch the buttons.
  • The Tactician (The "Trader"): This is the hands-on worker. Once the Strategist picks a pair (e.g., Amazon and Meta), the Tactician takes over. Their job is to watch the price movements minute-by-minute and decide exactly when to buy or sell to make a profit.

3. The Secret Sauce: "Talking" to Improve

Usually, AI learns by adjusting complex math equations (gradients). Moira does something different: it learns by talking to itself.

  • How it works: Both the Strategist and the Tactician are powered by Large Language Models (like the AI behind this explanation). Instead of changing their internal math, the system changes the instructions (prompts) given to them.
  • The Feedback Loop:
    • For the Tactician: After a week of trading, a "Critic" AI looks at the trades made. It writes a note in plain English: "You bought too early when the news was bad. Next time, wait for the news to settle." The system then rewrites the Tactician's instruction manual to include this advice.
    • For the Strategist: At the end of the month, the Critic looks at the total profit. It writes a note: "You picked a pair that was too volatile. Next time, look for pairs with more stable news." The system rewrites the Strategist's instruction manual.

4. Why This is Better

The paper tested this against other methods (like old-school math formulas and other AI models) using real US stock market data.

  • The Result: Moira made significantly more money and took less risk than the others.
  • The Analogy: Imagine a flat AI trying to do everything at once (picking stocks and timing the trades). It gets confused, like a person trying to write a novel while simultaneously cooking dinner. Moira separates the tasks. The Strategist focuses on the "story" (which stocks), and the Tactician focuses on the "action" (when to trade).
  • The "Tuning" Effect: The paper found that if you just give the AI a basic instruction without letting it "learn" from its mistakes via these text updates, it performs poorly. But once the AI starts rewriting its own instruction manual based on feedback, it becomes a disciplined, profitable trader.

Summary

Moira is a trading system that uses language to teach AI how to trade. It separates the job of choosing what to trade from the job of executing the trade. By having the AI "critique" its own performance in plain English and update its own instructions, it learns to avoid mistakes and capture profits much better than traditional methods.

Key Takeaway: The paper claims that by separating the "big picture" decision from the "nitty-gritty" execution and using language to update the AI's rules, you can solve complex financial problems where it's usually hard to tell who is at fault for a loss.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →