To query the different indices available on the SigTech platform, use the following code block:
IndexGroup.get_names()
['ASX INDEX GROUP',
'CAC INDEX GROUP',
'CBOE INDEX GROUP',
'DAX INDEX GROUP',
'EURONEXT INDEX GROUP',
'EUROSTOXX INDEX GROUP',
'FTSE INDEX GROUP',
'FTSE JSE INDEX GROUP',
'FTSE ROME INDEX GROUP',
'FTSE RUSSELL ASIA INDEX GROUP',
'FTSE RUSSELL INDEX GROUP',
'HANG SENG INDEX GROUP',
'KOSPI2 INDEX GROUP',
'MSCI INDEX GROUP',
'NASDAQ INDEX GROUP',
'NASDAQ OMX STOCKHOLM INDEX GROUP',
'NIKKEI INDEX GROUP',
'NSE INDEX GROUP',
'RUSSELL INDEX GROUP',
'S AND P CANADA INDEX GROUP',
'S AND P INDEX GROUP',
'SMI INDEX GROUP',
'TWSE INDEX GROUP']
All instruments within the SigTech platform and a large range of other objects, such as contract groups, calendars, or strategies can be accessed through the platform's object API. In practice, this means calling sig.obj.get(object_name)
sp_indices = sig.obj.get('S AND P INDEX GROUP')sp_indices
S AND P INDEX GROUP <class 'sigtech.framework.instruments.indices.IndexGroup'>[4387612560]
As an example, the S&P index group object is created above using the method query_instrument_names. A list instrument names, in this case indices, contained within the group is returned:
It is also possible to query the instrument objects within a group, using query_instruments:
sp_indices.query_instruments()
[NZSE10 INDEX <class 'sigtech.framework.instruments.indices.EquityIndex'>[5377318864],
SPX INDEX <class 'sigtech.framework.instruments.indices.EquityIndex'>[5377318816],
SPXSET INDEX <class 'sigtech.framework.instruments.indices.EquityIndex'>[5389968768],
SPXT INDEX <class 'sigtech.framework.instruments.indices.EquityIndex'>[5389969008]]
An individual index is retrieved through the object API:
spx = sig.obj.get('SPX INDEX')spx
SPX INDEX <class 'sigtech.framework.instruments.indices.EquityIndex'>[5377318816]
Accessing historical time series data is done through a call to the history method, common to all instruments