One stock against the S&P 500 (SPY)
smartfin_analyze_stockOne US-listed stock or index ETF against SPY, a fund that tracks the S&P 500, on the same dates, from daily closing prices adjusted for stock splits with dividends reinvested, the way SmartFin's Stock Analysis page measures it. Returns, for the stock and for SPY: total return and yearly rate (CAGR) over the dates and over 1, 3 and 6 months, year to date, 1, 3, 5, 10 and 20 years and since both started, the first close both have (with the gap in percentage points); each full calendar year; every 1-, 3- and 5-year holding period on month-end closes (highest, lowest, median, share with a gain); full months (highest, lowest, share up, average up and down month, median in each calendar month); largest one-day and Monday-to-Friday weekly rise and fall, share of days up; yearly volatility (sample spread of daily returns x sqrt 252), volatility in each full year, downside deviation, the last 20 trading days' volatility against its median over 5 years, skew and excess kurtosis; falls from a closing high until it recovered, at the first close at or above it (deepest, the 5 deepest, longest recovery, average of those 10% or more, counts of 10, 20 and 30% or more, the distance below the highest close in the data, Ulcer Index); historical one-day Value at Risk 95% and 99% and Expected Shortfall 95%; Sharpe, Sortino, Calmar and Martin ratios with a fixed 5% risk-free rate, and the information ratio; beta, correlation, R-squared and tracking error against SPY, and the plain average monthly return in the months SPY rose and fell; and at the to_date close: the 20-, 50-, 100- and 200-day simple averages with the distance from each, the last 50- and 200-day crossing dates, days above the 200-day average in the last 252, the 52-week closing high and low, and the 14-day RSI (Wilder's smoothing). Use when someone asks how a stock has done against the S&P 500, or for one of these measures for a stock, e.g. "nvda vs s&p 500 over 10 years", "apple 200 day moving average", "ko sharpe ratio", "tsla 52 week high" or "msft rsi". Do not use for buy or sell signals, forecasts or recommendations: it states past figures only, and RSI, the averages and the crossing dates are measurements of past closes, not signals. For two stocks against each other use smartfin_compare_two_stocks; for every fall of a chosen size use smartfin_calculate_crash_recovery. Limits: today's S&P 500 companies and major index ETFs, prices in US dollars, daily closes; the days both the stock and SPY traded, so no comparison starts before SPY's first close (29 Jan 1993); 3 years by default, or the full history if shorter. A figure the dates can't give is null, with the reason in notes.
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_analyze_stock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Amount for the growth figures, in US dollars. Default 1000; every percentage and ratio is the same at any amount | |
| period | No | Years back from the latest close (or to_date), or max for the first close both have. Default 3. Ignored when from_date is given | |
| 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. | |
| to_date | No | Last date, YYYY-MM-DD, with from_date. Omit for the latest close | |
| from_date | No | First date, YYYY-MM-DD; a weekend or holiday uses the nearest trading day. Omit to use period |
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 |