Indices

Learn more: Example notebooks

Environment

Setting up your environment takes three steps:

  • Import the relevant internal and external libraries

  • Configure the environment parameters

  • Initialise the environment

import sigtech.framework as sig
from sigtech.framework.instruments.indices import IndexGroup

import seaborn as sns

sns.set(rc={'figure.figsize': (18, 6)})
sig.config.init();

Indices

To query the different indices available on the SigTech platform, use the following code block:

IndexGroup.get_names()

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

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:

sp_indices.query_instrument_names()

It is also possible to query the instrument objects within a group, using query_instruments:

sp_indices.query_instruments()

An individual index is retrieved through the object API:

spx = sig.obj.get('SPX INDEX')
spx

Accessing historical time series data is done through a call to the history method, common to all instruments

spx.history()
spx.history().plot(title='SPX Index Performance');

The method data_dict gives an overview of the static data related to an index:

spx.data_dict()

Last updated

© 2023 SIG Technologies Limited