# Coatue - The Investment Decision Function
A hedge fund is a function. It takes external and internal context and returns one tuple: ==what to buy, how much, and when==.
- Source: talk by the Head of AI at Coatue ($93bn hedge fund), [@fyxlong](https://x.com/fyxlong).
- Core claim: investing is a ==compression problem==. All of the world's information goes in. One decision comes out.
- The hard part is not the models. It is the complexity of the graph, and how the org absorbs it.
## 1. The decision function
```mermaid
graph LR
subgraph EXT[External context]
N[News]
P[Prices]
F[Filings]
end
subgraph INT[Internal context]
POS[Current positions]
LIQ[Liquidity + risk limits]
CS[Past case studies]
H[History with sector / mgmt]
end
EXT --> FN{{"f(external, internal)"}}
INT --> FN
FN --> T["(selection, size, timing)"]
```
- Principle: ==everything an investor sees on screen, an agent must see via API==.
- External data: news, prices, filings. All via API.
- Internal data: positions, liquidity and risk limits, past case studies, history with a sector or management team.
- Coatue's edge: decades of rigorous internal documentation. The internal context already exists as data.
- The reality: you cannot dump all of it into a [[Context Window]] and get "three magic numbers". It is not that easy.
## 2. The over-simplified version
```mermaid
graph LR
G[1. Gather<br/>internal + external] -->|output = input| A[2. Analyze]
A -->|output = input| D[3. Decide]
G -.- g1[dozens of sub-steps]
A -.- a1[dozens of sub-steps]
D -.- d1[dozens of sub-steps]
```
- Each step has an input and an output.
- The output of one step is the input of the next.
- Each step has dozens of sub-steps. Each sub-step needs the best tool for the job.
## 3. Pick the right runner per step
A "runner" is who or what does a step. Four options, in order of the complexity they can model:
| Runner | Strength | Example |
|---|---|---|
| Deterministic code | Fast, reliable, cheap | `if PE < 15: do X` |
| Classic ML | More complex relationships than code | Factor or pattern models |
| LLM | Even more complex relationships | Summarize an earnings transcript |
| Person | Judgment, trust, relationships | Meet the management team |
```mermaid
graph TD
S[Sub-step] --> Q1{Rule is explicit?}
Q1 -->|Yes| C[Deterministic code]
Q1 -->|No| Q2{Structured data,<br/>learnable pattern?}
Q2 -->|Yes| ML[Classic ML]
Q2 -->|No| Q3{Language / unstructured,<br/>no relationship at stake?}
Q3 -->|Yes| L[LLM]
Q3 -->|No| HU[Person]
```
%%The decision tree is my reading of the talk, not his slide.%%
- Goal: ==maximize absolute quality per step==. Not "as many steps LLM'd as possible".
- "There is no glory in automating things for the sake of automating things."
- People still matter. You do not send an LLM, or an `if` statement, into a management meeting. See [[Human-in-the-Loop Systems]].
## 4. The realistic version
```mermaid
graph LR
IN[Inputs] --> S1[Gather]
S1 --> B1{Branch}
B1 -->|path A| S2a[Analyze A]
B1 -->|path B| S2b[Analyze B]
S2a --> B2{Branch}
S2b --> S3[Cross-check]
B2 -->|path C| S3
B2 -->|path D| S4[Deep dive]
S4 --> S3
S3 --> OUT[Decision]
S2a -.- K["Knobs per node:<br/>runner(s), model size,<br/>thinking effort, hooks,<br/>skills, ..."]
```
- The real function is not linear. It has branching logic and many forks.
- Each node has an optimal runner. In practice, often several runners per node.
- Each node also has more knobs: model size, thinking effort, hooks, [[Agent Skills as Codified Domain Expertise|skills]], and more.
- Each data source has its own chain of steps. The firm-wide graph is "massively complex".
## 5. The search space is basically infinite
$
\text{configurations} \geq 20^{10 \times n} \quad (n = \text{nodes})
$
- His estimate: at least 10 knobs per node, at least 20 valid values per knob.
- One node alone gives $20^{10} \approx 10^{13}$ options.
- You cannot search this space by trial and error. You need to cut it into parts.
> [!question] The key question
> "What can I actually compartmentalize in a way that we can understand and evaluate?"
- Compartmentalize the graph into sub-graphs you can evaluate one by one.
- Each part needs a North Star metric to hill-climb. Without one, "you're just kind of… fidgeting around." See [[Evals]] and [[Domain Experts as Eval Builders]].
- The real challenge: lay the graph out so people understand it technically ==and absorb it culturally==. "That is the great challenge of applying AI in investing."
## 6. Beyond investing
- The general form: a ==state machine that takes in the world's information and understands it well enough to make coherent decisions==.
- The same pattern applies to policy, nonprofits, drug discovery, and corporate strategy.
> [!note] Link to Bridgewater
> [[Bridgewater PAT - Compiling Research into Deterministic Agents]] is a worked example of the same idea. Bridgewater compiles analyst workflows into deterministic code where it can, and uses LLMs only where it must.
----
tags: #boat #ai #investing
links: [[AI native hedge fund moc]] [[Bridgewater PAT - Compiling Research into Deterministic Agents]] [[Evals]] [[Human-in-the-Loop Systems]] [[Context Window]] [[Separate the Decision from the Implementation]]