Instruments

Instruments#

AnalystGroup

A class representing an analyst group.

AnalystIndex

A class representing an analyst indices.

BaseTotalReturnSwapInstrument

Base class for underlying instrument of the total return swap.

BondFutureOption

A class implementing bond future option instruments.

Cash

Cash object representing an instrument that is always worth 1 in a given currency.

CashIndex

A class implementing a cash asset based on interest rate fix instrument, e.g.

DefaultUniverses

Access the default universes of returns series for quick assessment of signal potential.

EconomicIndex

A class representing economic indices.

EconomicSeriesDatabaseGroup

A class representing The economic series database group.

Exchange

Exchange class, detailing timezone and trading hours.

FrameworkObject

Object base with includes db cache and comparison

Fund

Class used to represent Funds.

FundGroup

A class representing a fund group.

FundShareClass

A class representing a fund share.

HistoricalFrameworkObject

A class supporting historical levels on a series of reference dates.

Index

A class representing published indices.

IndexForward

IndexForwardGroup

A class implementing an index forward group.

IndexGroup

A class representing an index group.

IndexSwap

This class implements as index swap.

Instrument

A class representing any object that can be held within a portfolio.

InternalFund

A class representing an internal fund.

IntradayInstrument

A class implementing a tradable wrapper over an index with ability to generate intraday orders.

Margin

Margin object representing an instrument that is always worth 1 in a given currency.

MultiContractGroup

A class representing data common to a group of instruments.

MultiDimensionalObjectBase

Joint base class for curves and surfaces.

OTCInstrumentWithPeriodicFlows

An extension of OTCInstrument with periodic coupon payments - adding the generic cashflow logic to be used in strategies.

Quote

A class representing quotes.

SIGMasterBase

SIGMaster single stocks API.

SIGMasterPOPO

Plain-Old-Python-Object SIGMaster implementation.

SwapQuote

Class representing swap quotes

SwapQuoteGroup

Class representing swap quote groups.

TotalReturnIndexTotalReturnSwapInstrument

A class implementing a TRS for total return indices.

TotalReturnSwap

Class implementing a total return swap on a given underlyer.

TradableCSVIndex

A class implementing a tradable wrapper over an index to load from a CSV file.

TradableIndex

A class implementing a tradable wrapper over an index.

TradableInstrument

An instrument that is directly tradable.

TradableTSIndex

A class implementing a tradable wrapper over a timeseries.

YieldIndex

A class representing yield indices.

ZeroCouponCashDepositQuote

Class representing a Cash Deposit Zero Coupon Quote

ZeroCouponQuote

A class representing a generic Zero Coupon Quote

sigtech.framework.instruments.utils.expiry_date_calculated(contract_month, contract_year, expiry_day, expiry_month_offset: int, expiry_week_n: int, expiry_adjust_by_cd: int, expiry_bdc: str, expiry_adjust_start: bool, expiry_offset: str, holiday_calendar: str, expiry_adjust_start_bdc: Optional[str] = 'PREVIOUS') date

Calculates the expiry date of a contract given its month, year and other inputs.

Parameters:
  • contract_month – Index of contract month (1 ... 12).

  • contract_year – Contract year.

  • expiry_day – Either a calendar day number, an English weekday or 'EOM'. Defines the reference point for later adjustments.

  • expiry_month_offset – Number of months to offset the reference date from the contract/delivery month.

  • expiry_week_n – Which instance of the given weekday to start the reference date from. (E.g. 3rd Wednesday) Must be non-zero for expiry_adjust_by_cd to take effect. Can be -1 (-2), in which case the last (second to last) weekday will be picked.

  • expiry_adjust_by_cd – Number of calendar days to adjust reference date by.

  • expiry_bdc – Business day convention to use for final adjustment, i.e. 'FOLLOWING', 'MOD_FOL', 'PRECEDE', 'MOD_PRE', 'NONE_RULE'

  • expiry_adjust_start – Whether to adjust the reference date to fall on a business day.

  • expiry_offset – Final adjustment to reference date. (E.g. '2BD' or '-3D')

  • holiday_calendar – Calendar string identifier.

  • expiry_adjust_start_bdc – Business day convention to use for adjustment of reference date (either 'PREVIOUS' or 'FOLLOWING').

Returns:

Calculated expiry date.

sigtech.framework.instruments.utils.expiry_date_calculated_from_ticker(ticker, expiry_day, expiry_month_offset: int, expiry_week_n: int, expiry_adjust_by_cd: int, expiry_bdc: str, expiry_adjust_start: bool, expiry_offset: str, holiday_calendar: str, expiry_adjust_start_bdc: Optional[str] = 'PREVIOUS') date

Calculates the expiry date from a given ticker and inputs.

Parameters:
  • ticker – Ticker of contract.

  • expiry_day – Either a calendar day number, an English weekday or 'EOM'. Defines the reference point for later adjustments.

  • expiry_month_offset – Number of months to offset the reference date from the contract/delivery month.

  • expiry_week_n – Which instance of the given weekday to start the reference date from. (E.g. 3rd Wednesday) Must be non-zero for expiry_adjust_by_cd to take effect. Can be -1 (-2), in which case the last (second to last) weekday will be picked.

  • expiry_adjust_by_cd – Number of calendar days to adjust reference date by.

  • expiry_bdc – Business day convention to use for final adjustment, i.e. 'FOLLOWING', 'MOD_FOL', 'PRECEDE', 'MOD_PRE', 'NONE_RULE'

  • expiry_adjust_start – Whether to adjust the reference date to fall on a business day.

  • expiry_offset – Final adjustment to reference date. (E.g. '2BD' or '-3D')

  • holiday_calendar – Calendar string identifier.

  • expiry_adjust_start_bdc – Business day convention to use for adjustment of reference date (either 'PREVIOUS' or 'FOLLOWING').

Returns:

Calculated expiry date.

sigtech.framework.instruments.utils.future_contract_year(ticker: str)

Returns the contract year of the provided ticker.

Parameters:

ticker – String input ticker

Returns:

Contract year of provided ticker