compare_to_benchmark
Sets an allocation ETF, or a portfolio build_portfolio builds, beside an ETFIQ benchmark. With ticker (such as AOR): how the fund did against the benchmark for its band (set by its look-through stock share), over the same dates, as ETFIQ published it: total returns by window and the difference, risk and cost. With portfolio (the arguments build_portfolio took, its answer's compare.arguments.portfolio): the same portfolio built again beside an ETFIQ benchmark, the benchmark's own 1Y, 3Y, 5Y, 10Y and since-inception windows exactly as published, each with its dates and basis (hypothetical before the freeze date), and the differences in stock share and weighted fee in percentage points; and, in portfolio_returns, the portfolio's hypothetical returns beside the benchmark's over the same months, window by window, with each difference in percentage points. WHICH BENCHMARK: without benchmark, the default rule's (the ETFIQ strategic benchmark nearest the portfolio's looked-through stock share, the lower on a tie; for the band form, its band's), and choice.line says why in one line. When that one is more than 5 percentage points from the stock share, or the share is as near another strategic benchmark, the next-nearest is set beside it in also, with the same windows and differences, and choice.gap.line says so. When the reader names another ETFIQ benchmark ("compare it to Strategic 80 instead"), pass benchmark with their words or its id (etfiq-strategic-80): any benchmark list_benchmarks returns. That one is used, and choice.line still names the default and why. A name that matches no benchmark is refused (kind unknown-benchmark) with the list. Refuses, and estimates nothing, when ETFIQ has not published what is asked.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticker | No | An allocation ETF, such as AOR. | |
| benchmark | No | Optional, with portfolio: an ETFIQ benchmark the reader names, by id (etfiq-strategic-80) or name (Strategic 80). Leave it out for the default rule. | |
| portfolio | No | The arguments build_portfolio took: its answer's compare.arguments.portfolio. |