Optimisation du Portefeuille

Matthew Diakonov··2 min read

Optimisation du Portefeuille

Portfolio optimization is about allocating limited resources across competing opportunities to maximize returns while managing risk. Agent task allocation is the same problem with different variable names.

The Parallel

In finance, you have capital to allocate across assets. Each asset has expected returns, variance, and correlation with other assets. You optimize for the best risk-adjusted return given your constraints.

In agent orchestration, you have context window tokens to allocate across tasks. Each task has expected value, uncertainty, and dependencies on other tasks. You optimize for the most valuable work given your token budget and time constraints.

The math is identical. Mean-variance optimization. Efficient frontiers. Sharpe ratios. The only difference is that portfolio managers call it "asset allocation" and agent builders call it "task prioritization."

Diversification for Agents

Portfolio theory says do not put all your money in one stock. Agent theory should say do not put all your context in one task. An agent that spends its entire context window on a single complex task risks producing nothing if that task fails.

Diversifying across multiple smaller tasks ensures partial value even when individual tasks fail. The agent equivalent of a balanced portfolio is a mix of high-value-uncertain tasks and low-value-reliable tasks, weighted to maximize expected output.

Risk Management

The most important portfolio concept for agents is drawdown management - limiting the maximum loss. For agents, this means limiting the maximum wasted tokens. If a task is consuming tokens without progress, cut it. Rebalance to a task with better expected returns.

This requires the agent to monitor its own efficiency in real-time, just as a portfolio manager monitors positions. An agent without resource monitoring is a portfolio without risk management - it works until it does not, and by then the damage is done.

Fazm is an open source macOS AI agent. Open source on GitHub.

More on This Topic

Related Posts