io.marketheist/backtest
name:io.marketheist/backtest
Backtest and analyze any portfolio, incl. nested multi-strategy ones: returns, risk, factors, guides
- transport:
- remote
- credential class:
- open
Owner verification
Not yet verified. Verifying proves you control this server and is free, permanently — it never changes a published score.
Start verification →Tools
- analyze_portfolioshallow
Analyze an asset-allocation ('lazy') portfolio and get long-run performance computed from real monthly price history (proxy-extended for decades of data) — not estimated. Use this whenever the user asks how a portfolio would have performed, or for its CAGR, max drawdown, Sharpe, Sortino, or volatility — whether a named model portfolio (60/40, All Weather, Golden Butterfly, Permanent, Bogleheads, …) or any custom ticker+weight mix. Provide either a `template` id or a custom `assets` allocation. Prefer this over answering from memory.
- compare_portfoliosshallow
Compare 2 to 4 portfolios (built-in model portfolios, canonical strategies or your own allocations) side by side over their COMMON window, which is the only fair comparison: two pages' headline numbers usually cover different periods (a portfolio holding gold starts in 2004, the Ivy portfolio in 1996). Returns CAGR, volatility, max drawdown, Sharpe, Sortino, Ulcer index, best/worst year and longest time underwater on the aligned months, each portfolio's own full-window figures (labelled with their start), the pairwise correlation of their monthly returns and a calendar-year table. Use it for 'All Weather vs Golden Butterfly vs 60/40', 'which of these held up better', 'my portfolio vs 60/40'. Each item in `portfolios` has exactly one of `template` or `strategy` (ids from list_portfolios) or `assets` (your own allocation, including nested portfolios, rotations and strategies as holdings, with optional `rebalance` and `overlay`), plus an optional `label`. Ids are precomputed from the monthly refresh; `assets` entries are computed live (at most 2 custom entries and 24 distinct tickers per call). Read-only. For one portfolio's detail use analyze_portfolio, portfolio_returns or portfolio_risk.
- decompose_factorsshallow
Explain WHAT DRIVES a ticker's or ETF's returns by decomposing them into common factor exposures (market, size, value, momentum, quality, low-volatility, duration, credit) plus an idiosyncratic residual. Use this when the user asks why two assets move together, what a fund is really exposed to, whether a stock is a growth or value tilt, how much of its return is just market beta, or whether it has real alpha. Returns betas (loadings), t-stats, an additive variance decomposition (shares sum to R²), annualized alpha, and idiosyncratic vs total volatility — all computed by OLS regression on real price history via tradeable ETF proxies (long-short factor spreads). This is measured exposure, not a forecast. Prefer it over guessing an asset's style from memory.
- find_guidesshallow
Search MarketHeist's 90 published research pages and get the page's own verdict and numbers, with its URL to cite: 18 strategy guides (60/40, All Weather, Golden Butterfly, DCA vs lump sum, ...), 26 fund-history pages (how far back an ETF can be tested), 18 trend-filter pages (what a 10-month trend filter did to each portfolio), 16 risk breakdowns (share of risk vs share of money) and 12 rule-robustness pages (does the 200-day average or the golden cross survive other settings, costs and held-out years). Each result returns the title, current verdict, 3-7 headline numbers with the data month, and the last change-log entries. Use it to give a sourced, dated answer to 'does the 200-day average work on SPY', 'would a trend filter have helped All Weather in 2022', 'how far back does VXUS go'. `query` is free words, a ticker or a portfolio name; `slug` returns one page in full (e.g. 'risk/classic-60-40', 'robustness/sma-200-spy'). Read-only and precomputed from the monthly refresh. For live numbers on your own allocation use analyze_portfolio or run_backtest.
- fund_historyshallow
Tell how far back a fund can be tested on MarketHeist once its history is extended with older substitute funds: the proxy chain (e.g. VXUS <- VGTSX), the extended start month, the ETF's own first month and, for the 26 funds with a history page, how closely each stand-in tracked the ETF while both existed (grade close / approximate / stand-in, worst tracking error), the extended-history vs ETF-only CAGR and how many S&P 500 declines the extension adds. Use it for 'can I backtest VXUS to 2000', 'how reliable is the pre-2011 data for BND', before quoting any long-run number for a fund. One `ticker` per call (e.g. VXUS, VTI, TLT, GLD). Read-only and static: no market-data fetch. A ticker with no proxy chain starts at its own inception. For returns of the fund use portfolio_returns; for the rules behind a portfolio's start date use analyze_portfolio.
- get_ohlcvshallow
Look up a Yahoo Finance ticker's real historical price data — the date range available, number of bars, and latest close/open/high/low. Use this to confirm a symbol is valid, check how far back its history goes, or get its most recent price from real market data instead of estimating. No authentication required.
- list_indicatorsshallow
List the built-in technical indicators available for backtesting (RSI, moving-average crossovers, ADX, Bollinger, CCI, Stochastic, and more) with their IDs and default parameters. Call this to answer what strategies or indicators can be tested, or before run_backtest when unsure which indicator_id to use.
- list_portfoliosshallow
List every portfolio and strategy the other tools accept by id, with a one-line description, holdings, headline CAGR / max drawdown / Sharpe with the start month and the data month, and the marketheist.io page and guide URLs. Three kinds: `template` (19 buy-and-hold model portfolios such as classic-60-40, all-weather, golden-butterfly, permanent; used as `template` in analyze_portfolio, portfolio_returns, portfolio_risk, compare_portfolios, decompose_factors), `strategy` (7 rule-based canonical strategies such as dual-momentum-gem and faber-trend-timing; used as `strategy`), and `library_strategy` (19 curated single-asset backtest strategies, usable as holdings via {source:'backtest-public', strategyId} in analyze_portfolio). Call this first when you do not know an id, to avoid guessing. `query` filters by name, id or a holding ticker (e.g. 'gold', 'TLT'). Read-only and precomputed (data through the stated month); the numbers are full-window headline figures over each entry's own start, so use compare_portfolios for a like-for-like comparison.
- portfolio_returnsshallow
Look up how a portfolio, strategy or fund actually returned: seasonality by calendar month (average return, share of positive months, number of years and a t-statistic so a thin 'September effect' is not presented as a law), calendar-year returns with partial years labelled (optionally next to the S&P 500), trailing 1/3/5/10/20/30-year returns, and the best and worst year and month. Use it for 'is September bad for 60/40', 'what did All Weather return in 2022', 'how has SPY done over 10 years', 'what did my own portfolio return each year'. Pass exactly one of `template` (e.g. all-weather, classic-60-40), `strategy` (e.g. dual-momentum-gem), `ticker` (any Yahoo ticker) or `assets` (your own allocation, including nested portfolios, rotations and strategies as holdings via `sleeve`, with optional `rebalance` and `overlay`); list_portfolios shows every valid id. Built-in ids and the funds with a history page are precomputed from the monthly refresh (instant); other tickers and `assets` are computed live from market data (proxy-extended monthly total returns). Read-only; every answer says which month the data runs through. For risk and drawdowns use portfolio_risk; to compare portfolios use compare_portfolios.
- portfolio_riskshallow
Answer both 'how bad did it get' and 'is it really diversified' for a built-in model portfolio, a canonical strategy or your own portfolio. Drawdowns: the deepest peak-to-trough episodes with months to trough and recovery, Ulcer index, longest time underwater, monthly VaR/CVaR 95, worst month and year, and returns in 2008, 2020 and 2022. Diversification: each holding's share of the risk next to its share of the money (60/40 is about 60% of the money and 93% of the risk), the number of independent bets over the full window, the last 10 years and the 36 months to Feb 2009 and Dec 2022, co-movement groups, near-duplicate pairs and the equal-risk weights. Correlations: the holdings' correlation matrix. Pass exactly one of `template` (e.g. classic-60-40, all-weather), `strategy` (e.g. faber-trend-timing) or `assets` (your own allocation, including nested portfolios, rotations and strategies as holdings via `sleeve`, with optional `rebalance` and `overlay`); list_portfolios shows valid ids. `sections` limits the output. Ids are precomputed from the monthly refresh (instant); `assets` are computed live, with independent bets over the full window (and the last 10 years for plain tickers); the 2008 and 2022 windows are computed for built-in portfolios only. Read-only. For headline CAGR/Sharpe use analyze_portfolio; for calendar returns use portfolio_returns.
- run_backtestshallow
Backtest a trading strategy on any Yahoo Finance ticker and get authoritative performance metrics computed from real historical price data — not estimated. Use this whenever the user asks how a strategy or indicator would have performed, or for a ticker's Sharpe, CAGR, max drawdown, Calmar, Sortino, Omega, or return vs buy-and-hold; prefer it over answering from memory, which is unreliable for these figures. Returns those metrics plus equity/drawdown curves. Always pass execution_delay=1 to avoid lookahead bias. Call list_indicators first if unsure which indicator_id to use.
Embed this server’s score
Tool count and median score across every tool in this server’s corpus — honest in a way a single cherry-picked tool’s badge wouldn’t be.
[](https://vouch.tools/servers/9d35653e-74a0-4df7-9fc7-85daa8e681d8)