EquityIndex#
-
class sigtech.framework.instruments.indices.EquityIndex
Baseclasses:
Index
A class representing equity indices.
-
property discount_curve_obj
Return an object representing the discount curve for the index.
-
property dividend_curve_name
Return the index name with a Dividend Curve identifier.
-
property dividend_curve_obj
Return an object representing the dividend curve of the index.
-
property dividend_curves
Return the timeseries of the dividend curve for the index.
-
property fundamental_fields: list[str]
Fundamental fields available for this equity index.
- Returns:
List of fundamental fields.
-
total_return: Optional[bool]
-
underlying_fixing_delay: Optional[int]
-
constituents(start_datetime: datetime = None) DataFrame
Index constituents.
- Parameters:
start_datetime – Starting point in time of the index constituents (optional).
- Returns:
pandas DataFrame containing the index constituents.
-
constituents_dict(dates: list = None, start_date: datetime = None, end_date: datetime = None) dict[datetime.datetime, list[str]]
Return a dict containing the index constituents given a range or list of dates. If no parameters are provided, the dict will contain the most recent list of constituents.
Example of usage:
import datetime as dtm import pandas as pd sig.obj.get('SPX INDEX').constituents_dict() sig.obj.get('SPX INDEX').constituents_dict([dtm.datetime(2021, 4, 4)]) start_date = dtm.datetime(2021, 1, 1) end_date = dtm.datetime(2021, 1, 3) sig.obj.get('SPX INDEX').constituents_dict(start_date=start_date, end_date=end_date) few_dates = pd.date_range(dtm.date(2019, 3, 4), dtm.date(2019, 4, 1), freq='7d') sig.obj.get('SPX INDEX').constituents_dict(few_dates)
- Parameters:
dates –
DatetimeIndex
ordatetime
list (optional).start_date – Start
datetime
(optional).end_date – End
datetime
(optional).
- Returns:
dict.
-
discount_curves(data_point=None, data_dates=None)
Return the timeseries of the discount curve for the index.
- Parameters:
data_dates – List of dates.
data_point – Data point (optional).
- Returns:
Timeseries.
-
fundamental_series(field, data_as_of=None)
Return a fundamental series available for the equity index.
- Parameters:
field – Field name, e.g.
'price_to_earnings_ratio'
.data_as_of – As of date/datetime of the data to be used. Defaults to environment as of date.
- Returns:
pandas Series.
-
fundamentals() DataFrame
Raw DataFrame of fundamental data.
- Returns:
pandas DataFrame.
-
underlying_forward_price(quote_date, maturity_date, spot_date=None, discrete_dividend=False, spot_override=None, curve_shift=0, data_point=None)
Forward price of the underlying.
- Parameters:
quote_date – Quote date of the underlying.
maturity_date – Maturity date of the underlying.
spot_date – Spot date of the underlying (optional).
discrete_dividend – Flag to replace dividend yield with discrete dividends if forwards are implied from discount factors and dividend (optional).
spot_override – Spot price to override (optional).
curve_shift – Curve shift (optional).
data_point – Data point (optional).
- Returns:
Forward price of the underlying.
-
underlying_forward_prices(quote_dates, maturity_dates, spot_dates=None, discrete_dividend=False, spot_overrides=None, curve_shift=0, data_point=None)
Forward prices of the underlying.
- Parameters:
quote_dates – Quote dates of the underlying.
maturity_dates – Maturity dates of the underlying.
spot_dates – Spot dates of the underlying (optional).
discrete_dividend – Flag to replace dividend yield with discrete dividends if forwards are implied from discount factors and dividend (optional).
spot_overrides – Spot prices to override (optional).
curve_shift – Curve shift (optional).
data_point – Data point (optional).
- Returns:
Forward prices of the underlying.