Skip to content

Tool reference

Compare Nifty Bank, Nifty IT and other indices

compare_indices — Compare NSE indices on return, volatility and drawdown. 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 compare_indices for you and answers from the figures it returns.

EXAMPLE PROMPTS

  • How did Nifty Bank do against Nifty IT over the last year?
  • Compare Nifty 50 and Nifty Midcap 150 on return and drawdown over three years.
  • Which had the larger drawdown this year, Nifty Pharma or Nifty FMCG?

Parameters and response fields

compare_indices

Compare NSE indices on return, volatility and drawdown

USE WHEN

Put 2 to 10 NSE indices side by side over the same window: price return, annualised volatility, maximum drawdown and the largest daily rise and fall, from NSE's own daily closes.

PARAMETERS

compare_indices parameters
NameTypeRequiredDefaultDescription
indicesstring[]Yes—2 to 10 NSE index names, such as "Nifty 50" and "Nifty Bank" (case-insensitive; a miss lists the valid names).
daysinteger | nullNo365Days back from the newest stored day, up to 1825.
from_datedate | nullNo—Optional ISO start date instead of days.
to_datedate | nullNo—Optional ISO end date.

RESPONSE DATA

  • Per index: price return %, annualised volatility of daily returns (x sqrt 252), maximum drawdown, and the best and worst day.

NOTES

  • Arithmetic on published closes. For one index's OHLC and P/E use get_index_valuation.

See the same data on DalalOS

Public pages that need no sign-in and show data from the same source.

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.