Tool reference
Indian stock return compared with the Nifty 50
get_stock_vs_index — One stock's return beside an NSE index. This is a read-only research or operational tool. It does not place trades or issue investment recommendations.
What you can ask
Connect DalalOS to Claude or ChatGPT and ask in plain English; the assistant calls get_stock_vs_index for you and answers from the figures it returns.
EXAMPLE PROMPTS
- How has Tata Motors done against the Nifty 50 over the last year?
- How has Infosys done against Nifty IT over three years?
- Compare HDFC Bank's return with Nifty Bank since January.
Parameters and response fields
get_stock_vs_index
One stock's return beside an NSE indexUSE WHEN
Put one stock's price return beside an NSE index's over the same window, with volatility, maximum drawdown, the largest daily rise and fall, and the difference in percentage points.
PARAMETERS
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbol | string | Yes | — | NSE equity symbol. |
index | string | No | Nifty 50 | NSE index name, such as Nifty Bank or Nifty IT. |
days | integer | null | No | 365 | Window in days, up to 1825. |
from_date | date | null | No | — | Optional ISO start date. |
to_date | date | null | No | — | Optional ISO end date. |
RESPONSE DATA
- Each side's return %, annualised volatility, maximum drawdown, best and worst day, and difference_pct (stock minus index, percentage points).
NOTES
- The stock's return compounds NSE's own close/prev_close, so splits and bonuses do not break it. Price returns, no dividends.
See the same data on DalalOS
Public pages that need no sign-in and show data from the same source.
Related tools
KEEP EXPLORING
Connect your AI to Indian stock market data
Sign in to DalalOS and connect your AI in one line of config. Free to start; paid plans when you need more.