Changes to underlying framework logic#

This page presents material changes to the underlying framework logic, which are not directly under the user’s control via the configuration of environment parameters or arguments overrides.

Force unique indices in DataFrames returned by inspect wrapper#

DataFrame objects returned by utility functions defined in the inspect wrapper may contain duplicated date or datetime entries, which cannot be used as table index. In v9, the date information is kept as column and an incremental integer index is used as index.

Use excess return when evaluating instruments in no-tcost model#

When using the inspect wrapper function bottom_trades_df in v9, we use the excess return instead of the total return in cases where an FX transaction is needed to evaluate a strategy trade.

Adjustments to the transaction model of futures#

In v8, we used to take the maximum market impact for all future contracts, which would make some contracts very expensive in comparison to others. In v9, we changed the default transaction cost model for futures such as the market impact now depends on the quantity traded.

Code example:

import datetime as dtm
import sigtech.framework as sig

env = sig.init()

g = sig.obj.get('ES INDEX FUTURES GROUP')

rfs = sig.RollingFutureStrategy(
    currency="USD",
    start_date = dtm.date(2014,1,4),
    end_date = dtm.date(2022,1,4),
    contract_code = g.contract_code,
    contract_sector = g.contract_sector,
    include_trading_costs=True,
)
rfs_no_tc = rfs.clone_object({'include_trading_costs':False})

costs = rfs_no_tc.history() - rfs.history()

Improved methodology for futures contract month changes#

In v9, to avoid adding a new override entry every year for specific future contracts with changes in the contract month codes, a new contract month code standard has been introduced.

The contract group object now has a contract_month_code_default field with the current contract_month_code and the past ones. The relevant rolling tables have been also updated.

Code example:

import sigtech.framework as sig

sig.obj.get('CO COMDTY FUTURES GROUP').data_dict()