Instruments#
Cash object representing an instrument that is always worth 1 in a given currency. |
|
A class implementing a cash asset based on interest rate fix instrument, e.g. |
|
Access the default universes of returns series for quick assessment of signal potential. |
|
Exchange class, detailing timezone and trading hours. |
|
Margin object representing an instrument that is always worth 1 in a given currency. |
|
Class implementing a total return swap on a given underlyer. |
|
A class implementing a tradable wrapper over an index to load from a CSV file. |
|
A class implementing a tradable wrapper over an index. |
|
A class implementing a tradable wrapper over a timeseries. |
|
An instrument that is directly tradable. |
|
A class implementing a tradable wrapper over an index with ability to generate intraday orders. |
|
Object base with includes db cache and comparison |
|
A class supporting historical levels on a series of reference dates. |
|
Base class for underlying instrument of the total return swap. |
|
A class implementing a TRS for total return indices. |
|
This class implements as index swap. |
|
Joint base class for curves and surfaces. |
|
A class implementing bond future option instruments. |
|
A class representing published indices. |
|
A class representing an index group. |
|
A class representing any object that can be held within a portfolio. |
|
SIGMaster single stocks API. |
|
Plain-Old-Python-Object SIGMaster implementation. |
|
An extension of OTCInstrument with periodic coupon payments - adding the generic cashflow logic to be used in strategies. |
|
A class implementing an index forward group. |
|
A class representing data common to a group of instruments. |
|
A class representing The economic series database group. |
|
A class representing quotes. |
|
Class representing swap quotes |
|
Class representing swap quote groups. |
|
A class representing a generic Zero Coupon Quote |
|
Class representing a Cash Deposit Zero Coupon Quote |
|
Class used to represent Funds. |
|
A class representing a fund group. |
|
A class representing a fund share. |
|
A class representing an internal fund. |
|
A class representing an analyst group. |
|
A class representing an analyst indices. |
|
A class representing economic indices. |
|
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