Skip to main content
Glama
lodetomasi

Portfolio Copilot

by lodetomasi

backtest_picker

Replay a stock ranking strategy against a benchmark on historical price, earnings, analyst, and fundamentals data, with clear disclosures for survivorship and backfill bias.

Instructions

Disclosed PROXY backtest of the picker's ranking logic (portfolio.picker_backtest) on live free data: for each ticker, fetches price history (yfinance, tier B), earnings- surprise history (yfinance, tier B, see providers.yfinance_surprises), analyst rating- change events (yfinance, tier B, US-listed/ADR only) and as-filed annual fundamentals (SEC EDGAR XBRL, tier A, US filers only), then replays a quarterly-rebalance top-quintile strategy against benchmark. This is NOT the production scorer (scoring/engine.py) -- it is a narrower, point-in-time-honest proxy answering "would this ranking logic have beaten the benchmark on past data". Every mandatory disclosure (survivorship bias -- today's tickers only --, Yahoo backfill risk, no transaction costs, event-dated not true point-in-time consensus revisions) is always returned under disclosures; a ticker/benchmark with no usable price history is skipped and reported, never invented.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearsNo
tickersYes
benchmarkNoVWCE.MI
horizon_monthsNo
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so thoroughly: it discloses data sources and tiers, data limitations (US-listed/ADR only, US filers only), methodological caveats (survivorship bias, backfill risk, no transaction costs), missing-data handling, and guaranteed `disclosures` output. This is exemplary transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense and front-loaded with purpose and the critical 'not production' caveat. Every sentence adds value, though it is verbose in places with repeated qualification and could be lightly tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with no output schema and no annotations, the description covers purpose, data pipeline, strategy, limitations, and output disclosures well. However, it does not explain the `years` and `horizon_months` parameters or the full return-value shape beyond `disclosures`, leaving minor gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It gives context for `tickers` ('for each ticker') and `benchmark` ('against `benchmark`'), but `years` and `horizon_months` are not explained at all. The parameter semantics are only partially covered.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies a specific resource and action: a proxy backtest of the picker's ranking logic via portfolio.picker_backtest. It explicitly differentiates itself from the production scorer (scoring/engine.py), making the tool's purpose clear and distinguishable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states the intended question ('would this ranking logic have beaten the benchmark on past data') and explicitly says it is NOT the production scorer. This gives agents clear when-to-use and when-not-to-use guidance, including a reference to the production alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lodetomasi/portfolio-copilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server