Falls and recoveries of a stock or fund
smartfin_calculate_crash_recoveryEvery fall of a chosen size (default 20%) for one US-listed stock or index ETF, on daily closing prices adjusted for stock splits with dividends reinvested, the way SmartFin's Crash & Recovery page measures it. A fall starts at the highest close since the last fall ended. It counts once a close is fall_pct or more below that high. It ends when it recovers (the first close at or above that high), or at a close fall_pct or more above its lowest close. A fall not yet recovered by to_date can also hold a drop of fall_pct or more to the same low, from a lower close on the way down with no higher close between it and that low, that recovered to its own starting close by to_date, before any close below that low. The biggest such drop is its own fall, with inside_fall_from set to the high date of the fall that holds it; it counts toward the total, at most one per fall, and the time limit runs from its own start. ended_by says whether a fall ended by recovering to its high ("high") or on a rise of fall_pct or more off its lowest close ("rebound"); end_date is that close and rebound_pct the rise from the lowest close to it. For a drop inside a fall (inside_fall_from set), "high" means it recovered to its own starting close, not to the high of the fall that holds it. Nothing after to_date is used, so a rise or a recovery after it shows as not yet. Only prices from from_date to to_date are used; the high is the highest close in those dates, or since the last fall ended. A fall counts only if it reached fall_pct within the time limit (within). For each fall: the high date and close, the bottom date and close, the depth, the recovery date, the first close at or above the high (this can come after later falls, or not yet), and the months from the high to the bottom and from the high to recovery. A summary: how many falls, the deepest, the longest and median months to recover, how many have not yet recovered (not_yet_back), and the latest close against the all-time high up to the to date. For the deepest fall: what a buy at the high and a buy at the bottom did, SPY from its own close on the same high date (the benchmark), and buys at the first close 10, 20 and 30% below the high. The same dates at 10, 20, 30 and 50%. With mode crash it measures the symbol's own fall during one named S&P 500 crash instead (dotcom: SPY's 2000-03-24 high to its 2002-10-09 low; 2008: SPY's 2007-10-09 high to its 2009-03-09 low; covid: SPY's 2020-02-19 high to its 2020-03-23 low; 2022: SPY's 2022-01-03 high to its 2022-10-12 low). amount (default 1000) is bought at each counted fall's high, at the first close fall_pct below it, and at its low, each valued at the to_date close (data.buys). Use when someone asks how far a stock or fund fell and how long it took to recover, e.g. "how long did Apple take to recover from 2008", "NVDA biggest falls and recovery time" or "how many 20% drops has SPY had". Do not use for forecasts or whether something will recover, for intraday moves, for symbols outside the supported list, or for a price-only basis: every figure includes reinvested dividends. For what an amount became between two dates use smartfin_calculate_investment_return. Limits: today's S&P 500 companies and major index ETFs, prices in US dollars, daily closes; the last 10 years by default, or the full history if shorter; every claim is dated and none is a prediction.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"symbol": "<symbol>"
},
"name": "smartfin_calculate_crash_recovery"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | size (default): every fall of fall_pct or more over the dates. crash: the symbol's own fall during the named S&P 500 crash, from its highest close between a year before SPY's high and SPY's low | |
| crash | No | The crash for mode crash: dotcom (dot-com), 2008 (2008), covid (COVID), 2022 (2022) | |
| amount | No | The same amount bought at each counted fall: at its high, at the first close fall_pct down, and at its lowest close, each valued at the to_date close, in US dollars. Default 1000 | |
| symbol | Yes | Stock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI. | |
| within | No | How fast a fall had to reach fall_pct, counted from its high: 1m, 3m (default), 1y, any, or a whole number of days from 1 to 3650. Ignored with mode crash | |
| to_date | No | Last date, YYYY-MM-DD. Omit for the latest close. Ignored with mode crash | |
| fall_pct | No | A fall counts once a close is this % or more below the highest close since the last fall ended. A rise of this % or more from its lowest close ends it. Default 20. Ignored with mode crash | |
| from_date | No | First date, YYYY-MM-DD. Omit for 10 years before the latest close, or the full history if shorter. Ignored with mode crash |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cite | Yes | How to credit this result | |
| data | Yes | ||
| next | Yes | Suggested follow-up calls | |
| links | Yes | ||
| how_to | Yes | Steps for the user to see or redo this on smartfin.fyi | |
| source | Yes | ||
| summary | Yes | Plain-language result the assistant can quote |