Equity Strategist
NewThe Equity Strategist is a public-markets analyst agent. Ask it about individual stocks — valuation, recommendations, supporting rationale — through the standard chat.responses.create entry point with model: EQUITY_MODEL.
Make your first call
import { Chaos, EQUITY_MODEL } from '@chaoslabs/ai-sdk';
const chaos = new Chaos({ apiKey: process.env.CHAOS_API_KEY! });
const response = await chaos.chat.responses.create({
model: EQUITY_MODEL,
input: [{ type: 'message', role: 'user', content: 'Is NVDA fairly valued at the current price?' }],
metadata: { user_id: 'demo-user', session_id: 'demo-session' },
});
for (const message of response.messages ?? []) {
if (message.type === 'block') {
console.log(message.data.block);
}
}What you get back
Responses are V2 message envelopes. The agent emits text messages (interim thinking) and block messages (structured payload). For Equity Strategist, the block payload is one of two shapes today:
info—{ type: 'info', content: string }— text rationale or summary.table—{ type: 'table', title?: string, tableHeaders: string[], tableRows: unknown[][] }— stock comparison grid (e.g. valuation metrics). Values arrive in wire shape — strings, numbers, or null. Cast or coerce at the consumption site.
A terminal status message with data.status === 'done' signals end of stream.
Multi-turn conversations
Equity Strategist supports multi-turn through the Conversation class:
import { Chaos, Conversation, EQUITY_MODEL } from '@chaoslabs/ai-sdk';
const chaos = new Chaos({ apiKey: process.env.CHAOS_API_KEY! });
const conversation = new Conversation(chaos, {
model: EQUITY_MODEL,
userId: 'demo-user',
});
await conversation.send('Is NVDA fairly valued?');
await conversation.send('Compare it with AMD on the same metrics.');
for (const message of conversation.messages) {
console.log(message);
}Attach a portfolio (stocks)
For real portfolio analysis (concentration, VaR, beta, fundamentals, correlation, stress test, optimization), pass stock_positions under metadata. The agent runs every portfolio tool over the holdings you provide. ticker is required; provide at least one of quantity, value_usd, or weight_pct per row.
import { Chaos, EQUITY_MODEL } from '@chaoslabs/ai-sdk';
const chaos = new Chaos({ apiKey: process.env.CHAOS_API_KEY! });
const response = await chaos.chat.responses.create({
model: EQUITY_MODEL,
input: [{ type: 'message', role: 'user', content: 'What are the concentration risks in my portfolio?' }],
metadata: {
user_id: 'demo-user',
session_id: 'demo-session',
stock_positions: [
{ ticker: 'NVDA', weight_pct: 30 },
{ ticker: 'AAPL', weight_pct: 25 },
{ ticker: 'MSFT', weight_pct: 25 },
{ ticker: 'AMD', weight_pct: 20 },
],
},
});Next steps
- Open the Playground
- Create an API key
- Equity Strategist SDK reference
- Benchmark a stock with Equity Strategist