Contents
India Equity
Requesting Data
Introduction
Request India Equity data in your algorithm to receive a feed of asset prices in the OnData
method. For more information about the specific dataset we use for backtests, see the India Equities dataset listing.
Create Subscriptions
To create an India Equity subscription, in the Initialize
method, call the AddEquity
method. The AddEquity
method returns an Equity
object, which contains a Symbol
. Save a reference to the Symbol
so you can use it in OnData
to access the security data in the Slice
.
_symbol = AddEquity("YESBANK", market: Market.India).Symbol;
self.symbol = AddEquity("YESBANK", market=Market.India).Symbol
If you set the brokerage model to an India brokerage, you don't need to pass a market
argument. To view the integrated brokerages that offer India Equities, see Brokerages.
To view the supported assets in the India Equities dataset, see the Data Explorer.
Resolutions
The following table shows the available resolutions and data formats for India Equity subscriptions:
Resolution | TradeBar | QuoteBar | Trade Tick | Quote Tick |
---|---|---|---|---|
Tick | ||||
Second | ||||
Minute | ![]() | |||
Hour | ![]() | |||
Daily | ![]() |
The default resolution for India Equity subscriptions is Resolution.Minute
. To change the resolution, pass a resolution
argument to the AddEquity
method.
_symbol = AddEquity("YESBANK", Resolution.Daily, Market.India).Symbol;
self.symbol = self.AddEquity("YESBANK", Resolution.Daily, Market.India).Symbol
To create custom resolution periods, see Consolidating Data.
Supported Markets
LEAN groups all of the India Equity exchanges under Market.India
. To set the market for a security, pass a market
argument to the AddEquity
method.
_symbol = AddEquity("YESBANK", market: Market.India).Symbol;
self.symbol = AddEquity("YESBANK", market=Market.India).Symbol
The brokerage models have a default market for each asset class. If you set a brokerage model, you may not need to specify the market to use.
Margin and Leverage
LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. The amount of margin that's available depends on the brokerage model you use. For more information about the margin requirements of each brokerage, see the Margin and Leverage section of the brokerage guides. To change the amount of leverage you can use for a security, pass a leverage
argument to the AddEquity
method.
_symbol = AddEquity("YESBANK", market: Market.India, leverage: 3).Symbol;
self.symbol = self.AddEquity("YESBANK", market=Market.India, leverage=3).Symbol
Data Normalization
The data normalization mode defines how historical data is adjusted for corporate actions. The data normalization mode affects the data that LEAN passes to OnData
and the data from history request. By default, LEAN adjusts India Equity data for splits and dividends to produce a smooth price curve. The following data normalization modes are available:
We use the entire split and dividend history to adjust historical prices. This process ensures you get the same adjusted prices, regardless of the backtest end date.
To set the data normalization mode for a security, pass a dataNormalizationMode
argument to the AddEquity
method..
_symbol = AddEquity("YESBANK", market: Market.India, dataNormalizationMode: DataNormalizationMode.Raw).Symbol;
self.symbol = AddEquity("YESBANK", market=Market.India, dataNormalizationMode=DataNormalizationMode.Raw).Symbol
To set the data normalization mode for all securities in an algorithm, set the DataNormalizationMode
universe setting before you create the security subscriptions.
UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
self.UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw