Discovery
Run Bounded Factor Backtest
run_backtestPro and above
A SMALL, BOUNDED, in-Worker sanity-check backtest — NOT a full-universe backtesting engine. Answers a quick question like 'does this factor actually work on these 5 names over the last year' inline, mid-conversation, without leaving MCP. Composes two existing tools (`get_pit_u...
Example Call
example_call.pypython
# Using the Valuein MCP server from Python (via MCP SDK)# Or call directly from Claude / Cursor after setup result = await client.call_tool( "run_backtest", arguments={ "tickers": [], "rebalance_dates": []})print(result)Direct tool call:run_backtest(...)
Inputs
| Parameter | Type | Required | Description |
|---|---|---|---|
tickers | array | required | 1-10 stock ticker symbols, e.g. ["AAPL","MSFT"]. |
rebalance_dates | array | required | 1-12 historical dates (YYYY-MM-DD) to snapshot valuation multiples on. Order does not matter — the tool sorts them chronologically. Forward return is computed from each date to the NEXT one in the sorted list. |
factors | array | optional | Which of get_pit_valuation_ratios's own output fields to include as factor_values. One or more of: pe_ratio, ps_ratio, pb_ratio, ev_ebitda, ev_revenue, fcf_yield_pct, gross_margin_pct, operating_margin_pct, net_margin_pct. Omit to include all of them. |
Output Fields
methodgrid_cellscells_computedpit_safecappedsource_tools_usedcaveatstickersrebalance_datesfactorsdroppedcellssummarystreamsnext_stepnoteExample Response
Illustrative
response.jsonjson
{ "method": null, "grid_cells": null, "cells_computed": null, "pit_safe": null, "capped": null, "source_tools_used": null, "caveats": null, "tickers": null}Shape only — field names match the live schema; values are placeholders, not real filings. See MCP server for the structured response shape.
Notes
Available from the Pro plan and above.
Plan Access
Sample (guest)
Not includedBenchmark (token)
Not includedPro
AvailableInstitutional
AvailableRelated Tools
Index names are trademarks of their owners; Valuein is not affiliated with or endorsed by any index provider.