EquityInstrument#
-
class sigtech.framework.instruments.equities.EquityInstrument
Baseclasses:
TradableInstrument
Subclasses:
SingleStock
,ExchangeTradedFund
A class representing an equity instrument.
-
bbg_unique_id: Optional[str]
-
company_id: Optional[str]
-
company_name: Optional[str]
-
composite_bbg_ticker: Optional[str]
-
composite_us_bbg_ticker: Optional[str]
-
corporate_actions_override: Optional[list]
-
country: Optional[str]
-
currency: Optional[str]
-
currency_multiplier: Optional[int]
-
cusip: Optional[str]
-
db_history_end_date: Optional[date]
-
delist_date: Optional[date]
-
eq_identifier: str
-
property expiry_date
date contract expires, or last date on which we can trade
-
property full_adjusted_activity_history
Adjusted volume history for validation.
-
property full_adjusted_price_history
Cash adjusted history for validation.
-
property fundamental_fields: dict[str, list[str]]
Fundamental fields available for this underlying.
- Returns:
dict of fundamental field to list of possible frequencies.
-
fungible_id: Optional[str]
-
isin: Optional[str]
-
issuer: Optional[str]
-
liquid_date: Optional[date]
-
market_impact: Optional[float]
-
primary_bbg_ticker: Optional[str]
-
primary_us_bbg_ticker: Optional[str]
-
region_code: Optional[str]
-
sec_code: Optional[str]
-
sec_master_id: Optional[int]
-
us_ric: Optional[str]
-
adjusted_activity_history(start=None, end=None)
Adjusted volume history for validation.
- Parameters:
start – Input start date (optional).
end – Input end date (optional).
- Returns:
Adjusted volume history.
-
adjusted_activity_history_cached(start=None, end=None)
Cached adjusted volume history for validation.
- Parameters:
start – Input start date (optional).
end – Input end date (optional).
- Returns:
Cached adjusted volume history.
-
adjusted_price_history(adjust_regular_cash, adjust_special_cash, start=None, end=None, field=None, adj_withholding_tax=False)
Get single stock adjusted price which removes the impact caused by cash/dividend, split/reverse split, etc.
- Parameters:
adjust_regular_cash – Bool type, choose to adjust regular cash payment or not.
adjust_special_cash – Bool type, choose to adjust special cash payment or not.
start – Start date.
end – End date.
field – Field used in the history call.
adj_withholding_tax – Bool type, if True include withholding tax in the dividend price adjustment
- Returns:
-
adjusted_price_history_cached(adjust_regular_cash, adjust_special_cash, start=None, end=None, field=None)
Get single stock adjusted cached price which removes the impact caused by cash/dividend, split/reverse split, etc.
- Parameters:
adjust_regular_cash – Bool type, choose to adjust regular cash payment or not.
adjust_special_cash – Bool type, choose to adjust special cash payment or not.
start – Start date.
end – End date.
field – Field used in the history call.
- Returns:
-
adjustment_factors(adjust_regular_cash, adj_abnormal_cash, adj_capital, adj_spinoff, prefer_source_spinoff_factors=True, start=None, end=None, adj_withholding_tax=False)
calculates and caches all adjustment factors once per adjustment configuration
-
adjustment_factors_full(adjust_regular_cash, adj_abnormal_cash, adj_capital, adj_spinoff, start, end, adj_withholding_tax=False)
Creates a time-series of adjustment factors for date range and adjustment configuration.
-
analyst_estimate_series(field, metric, period_end_date=None, historical_period_index='FY1')
Return an analyst estimate series available for the equity instrument.
Example:
stock = sig.obj.get('1000045.SINGLE_STOCK.TRADABLE') stock.analyst_estimate_series('Net Sales or Revenues', 'mean_est', '2021-09-30')
- Parameters:
field – Field name, e.g.
'Price/Earnings Ratio'
.metric – Metric name, e.g.
'std_dev'
,'high_est'
,'low_est'
,'mean_est'
,'median_est'
.period_end_date – Date for which the estimate is being made (if None, the entire history is returned).
historical_period_index – Identifier of the historical period index (default is ‘FY1’).
- Returns:
pandas Series.
-
static batch_load(names: Sequence[Union[str, Identifier]], symbology: Optional[Symbology] = None, history_fields: Optional[Sequence[str]] = ('LastPrice',), load_corporate_actions: bool = True, load_fundamentals: bool = True)
Does a bulk load of EquityInstruments
- Parameters:
names – object names/identifiers
symbology –
symbology (e.g. SIG, CSI, etc.)
history_fields – list of field names to load. If None, no history is loaded.
load_corporate_actions – if True, bulk load corporate actions for these instruments
load_fundamentals – if True, bulk load fundamentals data for these instruments
- Returns:
tuple of list[EquityInstrument] and a dictionary of instrument name to list of exceptions caught during corporate action loading/parsing
-
corporate_actions(effective_start_date=None, effective_end_date=None)
List all the corporate actions during the period.
- Parameters:
effective_start_date –
effective_end_date –
- Returns:
-
dividend_withholding_tax_ts()
Construct the timeseries of dividend withholding taxes.
- Returns:
pandas series.
-
estimate_summaries()
Raw dataframe of estimate summaries data
- Returns:
pandas dataframe
-
fundamental_series(field, frequency, raw=False, data_as_of=None, include_restatements=True, restatements_as_of=None, split_adjusted=True)
Return a fundamental series available to the equity instrument.
- Parameters:
field – Field name, e.g.
'Price/Earnings Ratio'
.raw – Bool, if True just return raw quarterly/annual data, if False interpolate to daily.
frequency – Frequency, e.g.
'Annual'
,'Quarterly'
,'Quarterly - Cumulative'
.data_as_of – As of date/datetime of the data to be used. Defaults to environment as of date.
include_restatements – Bool, if True include restatements in the fundamental data to be used.
restatements_as_of – As of date/datetime of restatements to be used. Defaults to environment as of date.
split_adjusted – Adjust for splits, defaults to True.
- Returns:
pandas Series.
-
fundamentals()
Raw dataframe of fundamental data
- Returns:
pandas dataframe
-
holidays()
List of holiday calendars for this instrument.
-
liquid_start_date()
First date shares are offered to public.
-
realign_history(series)
Overwrite this method as we would like to ignore the unexpected check.
-
sizing_price(sizing_dt, ccy=None, execution_dt=None)
Price on valuation date, adjusted for corporate actions till execution date.