Changes to default behavior of framework interface#

This page presents material changes to the output generated by

  • strategies execution methods,

  • instruments data retrieval methods, or

  • analytics calculation methods.

These outputs are directly under the user’s control via class constructors or functions parameter overrides.

Handling options maturity: removed target weekday default value#

When creating options using the get_option method of the OptionGroup class, the default value for the target_maturity_weekday parameter is now None (instead of 'Friday'). This allows a broader definition of options, specifically for index options that can expire on any days.

Example of usage:

import datetime as dtm

option_group = sig.obj.get('VIX INDEX OTC OPTION GROUP')
option = option_group.get_option(
    start_date=dtm.date(2018, 1, 25),
    option_type='Call',
    strike=1.0,
    strike_type='Premium',
    maturity='1D',
)

Updated default operating MIC when creating single stock strategies#

When creating a single stock strategy with sig.get_single_stock_strategy, the mic parameter specifies the operating market identifier code (MIC) that the stock is traded on. While in framework v8 mic was defaulting to 'XNAS' if not specified, in framework v9, mic defaults to ('XNYS', 'XNAS').

Performance reports automatically retrieve a cash index by default#

The cash parameter in sig.PerformanceReport is used as a benchmark when computing certain metrics, e.g. the Annualized Sortino Ratio.

In v9, the default value for the cash parameter is set to 'automatic'. If the cash parameter is not supplied when creating a performance report, then the report automatically retrieves a cash index object from the strategy’s currency (when applicable) and assigns it to the cash parameter.

Basket strategy now applies long-short conversion by default#

The default value for the convert_long_short_weight parameter of the sig.BasketStrategy class has been updated to True. Basket strategies will now apply long-short conversions by default.

Equity universe filters are always applied in the order you add them#

In v8, when creating an EquityUniverseFilter with multiple filters, you had two options for controlling the order in which filters were applied:

  • Option A: Specify use_add_order=False (or omit the parameter and let it default to False): This option meant that the SigTech framework applied the filters according to an internal order of operations.

  • Option B: Specify use_add_order=True: This option meant that the SigTech framework applied the filters in the same order you add them (using EquityUniverseFilter.add).

The operator precedence rule in v8 was the following:

  • Sector operators: 'in', 'not_in'.

  • Comparison operators: '<', '<=', '==', '!=', '>=', '>', 'min_data_size'.

  • Ranking operators: 'top', 'bottom', 'body'.

In v9, equity universe filters are always applied in the order you add them, and use_add_order is deprecated.

If you were using the use_add_order parameter in v9:

  • If use_add_order was set to False, you might need to rearrange your calls to EquityUniverseFilter.add so that the filters get applied in the order you want. Then, remove the use_add_order parameter from your code.

  • If use_add_order was set to True, you can simply remove the parameter from your code.

Data retrieval method uses pretty print by default#

In v9, when retrieving instruments data via data_df, the argument pretty_print is set to True by default. This enables the use of formatting for columns names and data values in DataFrame objects.

For instance, rates will be represented as percentage number instead of decimal number, e.g. 3.5 instead of 0.035.

Syntax changes for rolling rule parameters#

In v9, to improve the consistency between different rolling notations, a new syntax has been introduced for rolling future strategy’s parameters front_offset, month_end_offset and monthly_roll_days.

For front_offset and month_end_offset, the boundaries of the interval 'x,y' are now both included in the interval. For instance, the notation '-5,-3' will roll a third of the contract each of the 3 days from 4th to 2nd day before contract expiry. Please note that -1 represents the expiry date.

The following table summarizes the notation changes.

Parameter

v8 syntax

v9 syntax

front_offset

'-4:-2'

'-4,-3'

month_end_offset

'-5:-3'

'-5,-4'

monthly_roll_days

'5:9'

'5,9'

Futures rolling adjustments allowed by default#

In v9, classes RollingFutureStrategy and RFPriceIndex feature a new constructor argument allow_adjustments with default True. The rolling adjustments, not enabled in v8, accommodate specific contract expirations.

For instance, if the futures follow a monthly roll schedule where the roll period is implemented over a period '5:9', but a specific future contract has an early expiration and the last rolling day in a given month is two days after the expiration day, then a roll period '3:7' is applied on that month.

If adjustments are allowed, warnings explaining the nature of the adjustments will be provided.