Deprecations and refactorings#

This page contains the complete list of deprecations, refactorings and deletions introduced in v9 for classes, functions and parameters.

Legacy internal types#

The following internal types were deprecated and are not available in v9: AnyType, BoolType, ContainerType, DataPointType, DateType, DateTimeISOType, DateTimeType, DictType, FloatType, IdentifierType, IntType, ListType, ModelType, NumericType, PickleType, StringEnumType, StringPatternType, StringType, TimeDeltaType, TimeType, TupleType, UnionType.

Please use the equivalent built-in Python or datetime types instead, e.g. bool instead BoolType, datetime.time instead of TimeType, or list[type] instead of ListType(type).

Renamed strategy classes#

Framework v9 introduces a naming convention for the strategy building blocks. The full list of class refactorings is presented below.

Deprecated v8 class name

New v9 class name

DynamicRollingFuture

DynamicRollingFutureStrategy

RatesStrategyBasket

RatesBasketStrategy

RollingAssetSwap

RollingAssetSwapStrategy

RollingButterflyBonds

RollingButterflyBondsStrategy

RollingButterflySwaps

RollingButterflySwapsStrategy

RollingCurveSteepenerBonds

RollingCurveSteepenerBondsStrategy

RollingCurveSteepenerSwaps

RollingCurveSteepenerSwapsStrategy

RollingFutureFXHedged

RollingFutureFXHedgedStrategy

RollingLMEFutureFXHedged

RollingLMEFutureFXHedgedStrategy

RollingOption

RollingOptionStrategy

RollingStructureBasket

RollingStructureBasketStrategy

RollingSwaption

RollingSwaptionStrategy

RollingVarianceSwap

RollingVarianceSwapStrategy

Straddle

RollingStraddleOptionStrategy

Strangle

RollingStrangleOptionStrategy

Please replace the deprecated class names with their v9 names; the v8 class names will raise an error if used.

Other class refactorings#

The table below summarises other class refactorings or removals not related to strategy classes currently maintained.

Deprecated v8 class name

New v9 class name

Calendar

HolidayCalendar

RollingFutureStrategyCompositeSynthetic

removed

SignalReport

AlphaReport

VarianceSwapReplicator

removed

Functions and methods#

Data credibility adapter: consolidation to get available fields and intraday fields#

In the DataCredibilityAdapter class, method intraday_available_fields is deprecated. To replace this in your code, use available_fields and set intraday=True.

Legacy data retrieval method deprecated from custom datasets and economic series#

Legacy data retrieval methods have been deprecated in favor of a more generic data retrieval method already available for SigTech instruments.

  • In the sig.instruments.CustomDataset class, the get_series method is deprecated and replaced by data_df.

  • In the sig.instruments.EconomicSeries class, the get_series method is deprecated and replaced by data_df.

Parameters and properties#

Signal strategy parameter for extra holidays deprecated and renamed#

The sig.SignalStrategy parameter nav_holidays is deprecated in v9. This parameter specified additional holiday calendars to apply when selecting rebalancing dates. The nav_holidays parameter has been replaced with extra_holidays; this change ensures consistency with conventions used in other strategy classes.

To add extra holidays to the rebalance dates in a signal strategy, two different notations are available:

  • Notation 1: extra_holidays=['CMX(T) CALENDAR', 'SINGEX_JP(T) CALENDAR']

  • Notation 2: extra_holidays='CMX(T) CALENDAR,SINGEX_JP(T) CALENDAR'

Cash parameter deprecated in summary rolling currency series method#

When calculating metrics for performance reporting, the cash parameter is deprecated; in v9 it is no longer accepted as an input to the sig.PerformanceReport.summary_rolling_ccy_series method.

Remove date series from input parameters when creating a performance report#

When generating a performance report using the PerformanceReport class constructor in v9, the dates parameter is no longer accepted as an input.

Property name change for rolling strategy classes#

This change fixes a range of error messages such as StrategyError, DataLoadError, and TypeError that were raised when evaluating rolling strategies using intraday logic.

These errors were caused by a property name conflict between an existing instrument method group, and the property with the same name used by rolling strategies to specify a contract group, a swap group, or an option group.

The conflicting property name has been deprecated and renamed in the following classes:

Class name

v8 property name

v9 property name

RollingBondStrategy

group

contract_group

RollingCreditIndexStrategy

group

contract_group

RollingOptionStrategy

group

option_group

RollingStraddleOptionStrategy

group

option_group

RollingStrangleOptionStrategy

group

option_group

RollingSwapStrategy

group

swap_group

RollingVarianceSwap

group

varswap_group

Signal strategy stop loss allocation function deprecated#

sig.SignalStrategy uses the function specified by the parameter allocation_function to map the signal to instrument weightings.

In v9, the stop_loss allocation function is deprecated. To avoid raising an exception, replace the stop_loss function in your code with stop_trigger.

Live update parameter renamed for Spreadsheet UI widget#

In sig.experimental.ui.spreadsheet.Spreadsheet, the live_changes parameter is renamed to inplace in v9.

Changes to how custom roll tables are specified#

When creating a rolling strategy with custom_roll_table, please omit the rolling_rule parameter in v9, since setting rolling_rule='custom' raises an exception.

Instead, include one of the two forms of custom_roll_table:

  • A 'roll_table' is a list of 12 strings, one for each month of the year, specifying the contract to hold during that month. Contracts are specified with a month code ('H', 'K', etc) and a year code ([0] for the current year, [1] for the following year). Using the 'roll_table' notation sets rolling_rule to 'custom_roll'. An example of futures contract schedule is:

[ H[0], K[0], K[0], N[0], N[0], U[0], U[0], X[0], X[0], F[1], F[1], H[1] ]
  • A 'rolling_table' is a datetime-indexed data frame with columns rolled_in_contract, rolled_out_contract, rolled_in_weight, rolled_out_weight, and first_execution_date. Using the 'rolling_table' form sets rolling_rule to 'custom_table'.

Standard for option strike types#

In v9, when instantiating options with strike_type not in price terms, the relative strike 'SPOT' is deprecated. Please use 'ATM' instead.

Example usage:

spx_option_group = sig.obj.get('SPX INDEX OTC OPTION GROUP')

call = spx_option_group.get_option(
    strike='ATM-5%', # <-- use this instead of 'SPOT-5%'
    option_type='Call',
    start_date=datetime.date(2024, 1, 1),
    maturity='3M',
    strike_type='Spot',
    target_maturity_weekday='Friday'
)

Exceptions#

All the definitions of customized SigTech exceptions have been consolidated and moved to the module sigtech.framework.utils.exceptions. The categories of exceptions include:

  • Data exceptions, e.g. DataMissingError, DataCreateError, DataIdentifierError, DataLoadError.

  • Object and Configuration exceptions, e.g. ObjectError, ConfigError, NotInitialisedError, FrameworkObjectCreationError.

  • Strategy and Analytics exceptions, e.g. PortfolioError, MetricsError, StrategyError, OptimizationError.

  • Backend exceptions, e.g. BackendConnectionError, CacheError, ParquetHttpError.