Framework v8
Ask or search…
K

Framework v8 Latest

Pages in this category
On this page

Latest release: v8.21.1 (September 2023)

In this release

Enhanced print_dependencies method

The print_dependencies method has been significantly improved to offer users more control and clarity when printing dependency trees. Here's a breakdown of its features:
  • root_dependency: allows users to specify the starting dependency of the tree.
  • resolve_future_dependencies: ensures that future dependencies are resolved before printing. If set to 'false', the method will not print anything, ensuring that users only see resolved dependencies in their output.
  • fields: Users can now select additional fields to extract from the dependencies object. While the default fields include product_type, currency, frequency, and data_source, this enhancement allows users to include other relevant fields from the dependency object. To determine which fields are available for an object, users can utilize the data_dict() method.

New position_value_series and get_cash_valuation methods

position_value_series returns the valuation of position holdings (excluding cash) in the strategy’s currency. Users can specify various options for the datetime points (dts) to include in the series enabling granular analysis of your strategy's performance at critical moments, such as when orders are executed or when top-level holdings change.
get_cash_valuation returns the value of cash positions in a strategy at a specified time.

Enhanced RollingSwapStrategy with swap_rate and swap_rate_series methods

You can now view the swap rate of a RollingSwapStrategy at any given datetime (using swap_rate) or the historical swap rates across the lifetime of a strategy using swap_rate_series.
import sigtech.framework as sig
import datetime as dtm
sig.init()
s = sig.RollingSwapStrategy(
tenor="10Y",
currency="USD",
swap_currency="USD",
rolling_frequency_months=6,
forward_start_months=6,
start_date=dtm.date(2010, 1, 4)
)
sr = s.swap_rate(dtm.datetime(2014,4,4))
print(sr)
s.swap_rate_series()

Enhanced InterestRateSwap with data_df and fair_rate methods and InterestRateSwapGroup with data_df and fair_rate_df

Interest Rate Swap
  • Deprecated the static method fair_swap_rate.
  • Introduced new methods: fair_rate and data_df.
    • data_df: returns a dataframe containing all the data available for this interest rate swap. Typically, this includes the LastPrice, Rate and PV01.
    • fair_rate: returns the fair swap rate for an interest rate swap for a particular date. Note that unlike fair_swap_rate, env and currency are not required arguments.
import sigtech.framework as sig
import datetime as dtm
sig.init()
ir_swap = sig.InterestRateSwap(
currency='EUR',
trade_date=dtm.date(2017, 4, 14),
start_date=dtm.date(2017, 1, 5),
tenor=dtm.date(2022, 7, 5),
fixed_rate=0.05,
)
ir_swap.data_df()
ir_swap.fair_rate()
Interest Rate Swap Group
  • Deprecated the static method fair_swap_rate.
  • Introduced two new methods: fair_rate_df (static) and data_df (non-static).
    • data_df: returns a dataframe containing all the data available for this interest rate swap group.
    • fair_rate_df: returns a dataframe containing all the fair rate data for the interest rate swap group.
import sigtech.framework as sig
import datetime as dtm
sig.init()
# Using fair_rate_df (static)
df1 = sig.InterestRateSwapGroup.fair_rate_df(
tenor='5Y',
start_date=dtm.date(2016, 12, 20),
end_date=dtm.date(2017, 1, 3),
fwd_tenor='3Y',
currency='EUR'
)
# Using data_df
g = sig.obj.get('EUR INTEREST RATE SWAP GROUP')
df2 = g.data_df(
tenor='5Y',
start_date=dtm.date(2016, 12, 20),
end_date=dtm.date(2017, 1, 3),
fwd_tenor='3Y',
)
# Further data manipulations are possible using data_df
g.data_df('5Y', dtm.date(2016, 12, 20))
g.data_df('5Y', start_date=dtm.date(2016, 12, 20), end_date=dtm.date(2016, 12, 23))

Bug Fixes

  • Replaced hard-coded OBJECT_CLASS_REGISTER with automated logic to fetch framework classes and corresponding modules; exceptions may apply.
  • The start date of rolling future strategies will be computed using the first contract in the roll table to ensure accuracy.
  • All relevant greeks are now available when using the portfolio_greeks method.
  • Fixed a data concatenation issue in the intraday history retrieval for fx_otc.
  • Updated the timeline to the latest version (6.18.7) for live foreign exchange orders.
  • Enhanced the rolling logic to fetch open interest data only when it's available.
  • Implemented additional checks on callability features within session_data methods.
  • Expanded the historical data available for the Chinese Yuan (CNY) cash index.
  • Optimized the application of price factors on intraday price data columns.
  • Improved error notifications for incorrect valuation time inputs, making them more user-friendly.
  • Introduced a new calculation method for dv01, specifically for bonds quoted by yield.
  • Added further callability checks within the trading manager get_exchange_open_close_dt method.
  • destroy_env procedure added to final step in FunctionJob and StrategyJob decorators.
© 2023 SIG Technologies Limited