Instruments

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.

Exchange

Exchange class, detailing timezone and trading hours.

Margin

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

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.

TradableTSIndex

A class implementing a tradable wrapper over a timeseries.

TradableInstrument

An instrument that is directly tradable.

IntradayInstrument

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

FrameworkObject

Object base with includes db cache and comparison

HistoricalFrameworkObject

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

BaseTotalReturnSwapInstrument

Base class for underlying instrument of the total return swap.

TotalReturnIndexTotalReturnSwapInstrument

A class implementing a TRS for total return indices.

IndexSwap

This class implements as index swap.

MultiDimensionalObjectBase

Joint base class for curves and surfaces.

BondFutureOption

A class implementing bond future option instruments.

Index

A class representing published indices.

IndexGroup

A class representing an index group.

Instrument

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

SIGMasterBase

SIGMaster single stocks API.

SIGMasterPOPO

Plain-Old-Python-Object SIGMaster implementation.

OTCInstrumentWithPeriodicFlows

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

IndexForward

IndexForwardGroup

A class implementing an index forward group.

MultiContractGroup

A class representing data common to a group of instruments.

EconomicSeriesDatabaseGroup

A class representing The economic series database group.

Quote

A class representing quotes.

SwapQuote

Class representing swap quotes

SwapQuoteGroup

Class representing swap quote groups.

ZeroCouponQuote

A class representing a generic Zero Coupon Quote

ZeroCouponCashDepositQuote

Class representing a Cash Deposit Zero Coupon Quote

Fund

Class used to represent Funds.

FundGroup

A class representing a fund group.

FundShareClass

A class representing a fund share.

InternalFund

A class representing an internal fund.

AnalystGroup

A class representing an analyst group.

AnalystIndex

A class representing an analyst indices.

EconomicIndex

A class representing economic indices.

YieldIndex

A class representing yield indices.

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