The bull and the bear: cheatsheet
For education only. Multi-agent architecture taught via stock analysis; not investment, financial, or trading advice.
The one idea
Section titled “The one idea”Force the argument, then judge it. Two agents argue the same evidence with opposite mandates, the debate is capped at a small number of turns, and a separate, more capable judge reads both cases and commits to one decision. (Anchored to the TradingAgents framework, frozen snapshot 7e9e7b8.)
Why not just ask one agent?
Section titled “Why not just ask one agent?”A single pass gives you one slanted view and the confidence to match. It underweights whatever does not fit its lean. You cannot prompt that away; you fix it with structure, by giving the counter-case its own dedicated advocate.
The two researchers
Section titled “The two researchers”- Bull (
agents/researchers/bull_researcher.py): told to build the case for. Opening instruction: “You are a Bull Analyst advocating for investing in the stock.” - Bear (
agents/researchers/bear_researcher.py): the mirror. Opening instruction: “You are a Bear Analyst making the case against investing in the stock.” - Both read the same four analyst reports. Each also reads the other’s last argument and is told to rebut it. That rebuttal is what makes it a debate, not two monologues.
- Each turn appends to a running transcript, records who spoke, and ticks a turn counter up by one.
The turn limit
Section titled “The turn limit”| Question | Answer | In the code |
|---|---|---|
| Stop yet? | Enough turns happened, hand off to the judge | if count >= 2 * max_debate_rounds: return "Research Manager" |
| Whose turn? | If the bull just spoke, the bear is next | if current_response.startswith("Bull"): return "Bear Researcher" |
| Otherwise | The bull goes | return "Bull Researcher" |
Default is one round: one bull turn, one bear turn, then the judge. (The file has a loose “3 rounds” comment; the behavior follows the number, which defaults to one.) Raise the number for longer debates; the structure does not change.
The judge
Section titled “The judge”The Research Manager did not argue either side. It reads the full transcript and must commit to exactly one of five stances:
Buy Overweight Hold Underweight SellIt runs on the more capable model (the two advocates run on the cheaper one), the same “spend capability at the judgment point” idea from lesson 1. Its decision is written into shared state as the investment plan. (These labels are the system’s own architectural choice, not advice to you.)
How to follow along
Section titled “How to follow along”Read it free in your browser at github.com/TauricResearch/TradingAgents (pinned snapshot). No account, no Git, no programming knowledge needed. The short code 7e9e7b8 marks one frozen version, so the lessons match what you see.
Build your own (the transferable pattern)
Section titled “Build your own (the transferable pattern)”- Assign opposite mandates over the same evidence; each role must answer the other’s strongest point.
- Cap the rounds, so the debate ends whether or not anyone “won.”
- Hand the transcript to a separate judge (ideally your most capable model) that must commit to one option from a fixed set.
Pitfalls to dodge
Section titled “Pitfalls to dodge”- A single advocate weighing its own pros and cons (the counter-case needs its own dedicated voice).
- An unbounded debate (two advocates will not converge; the stop has to be designed).
- A judge that is also an advocate (that is letting the winner score the match).
Words to use precisely
Section titled “Words to use precisely”- Bull / bear: the optimistic advocate (argues it goes up) and the pessimistic advocate (argues it goes down).
- Bounded debate: a back-and-forth capped at a fixed number of turns, then ended.
- Judge: a separate agent that reads both cases and commits to one decision; here, on the more capable model.