Python code examples

Pre-built building blocks to create strategies

The SigTech platform has built-in solutions to many common problems faced by quant researchers and traders alike. This page shows some of the key ways in which the platform saves users time.


Rolling Futures

Futures are cheap and liquid way to gain exposure to a wide range of assets. However they must be rolled on a periodic basis to avoid expiry or triggering delivery.

For example, in a few lines of code, users can create a continuous exposure to the front month of the E-Mini S&P 500 futures, rolled over two days starting from the fifth day before expiry.

 currency=“EUR”,, 4, 14),, 1, 5),, 7, 5),

Interest Rate Swaps

The SigTech platform aims to model the full lifecycle of each instrument, including but not limited to, dividends and corporate actions for equities, coupons for bonds and daily variation margins for futures.

Owing to the data available and level of detail of the modeling, users are able to construct a wide range of complex listed and OTC instruments and trade these in a portfolio. Good examples are interest rate swaps and total return swaps.

The code snippet below builds a EUR IR swap with a fixed rate of 5% annual (30/360).

 currency=“USD”,, 2, 6),, 10, 1),
 instrument_name=“SPXT INDEX”,
 financing_ticker=(“FEDL01 INDEX”, “1M”),

Total Return Swaps

The example below builds a USD-denominated total return swap with the S&P500 Index as the underlying with a monthly reset financing rate of fed funds plus 200bps.

sig.Straddle(, 1, 3),


One of the key strengths of the SigTech platform is its comprehensive support for options, both vanilla and exotic.

Common options strategies such as straddles, strangles, and butterflies can be quickly constructed with just a few lines of code. Users can then easily calculate and visualize the greeks over time.

The example below builds a USD-denominated EURUSD 3-month FX straddle at 35 delta, sized to target 500 Vega and rolled every three months.


signal_name=“SIGNAL B3P4X2”,

Generic Signal Strategy

Quant trading starts with a signal. It is often desirable to keep that signal in its raw form for as long as possible before using it to generate portfolio allocations.

The SigTech platform supports this workflow by separating the signal logic from the trading logic and providing a straightforward way of creating a robust, reliable backtest from a signal.

The snippet below builds a GBP-denominated strategy using a user-provided signal, rebalanced to the signal weights every week on a Monday. The conversion from signal values to portfolio weights is handled by a user-created allocation function and the total leverage is set to 250%.

strategy_name=“GBP LONG VALUE PREMIA AK429KC”,

FX Hedging

Another common problem in quant trading is the need to hedge the currency exposures of a strategy with a base currency using FX forwards.

The SigTech platform handles this seamlessly by allowing users to put any arbitrary strategy built on the platform inside an FX forward hedging wrapper.

In the below example, a GBP-denominated strategy is hedged with USD with 1-month FX forwards. The FX hedge rebalance threshold is set to 2% and the FX exposure rebalance threshold is set to 1%.

Launch new systematic strategies faster

Find out how SigTech scales your quant setup.

Connect with An Expert