SigTech platform user guide
Search
⌃K

Forwards

This page shows:
  • How the instrument FXForward is used
  • How instrument FXForward is priced
  • How to use FX Forwards on an intraday basis

Environment

Setting up your environment takes three steps:
  • Import the relevant internal and external libraries
  • Configure the environment parameters
  • Initialise the environment
import sigtech.framework as sig
from sigtech.framework.infra.analytics.fx.fx_market import FXMarket
import pandas as pd
import datetime as dtm
import seaborn as sns
sns.set(rc={'figure.figsize': (18, 6)})
sig.config.init();

FX Forward instrument

Create a FX Forward object using the building block FXForward:
fx_forward = sig.FXForward(
over='USD',
under='EUR',
start_date=dtm.date(2018, 3, 5),
payment_date=dtm.date(2018, 4, 5)
)
To retrieve the strike, use the following code block:
Input
Output
fx_forward.strike
1.235525870851

FX Forward curves

Forward instruments are priced in the platform using daily FX curves:
Input
Output
fx_market = FXMarket.instance()
curve = sig.obj.get(fx_market.fx_curve_name('EUR'))
curve
EUR.FX CURVE <class 'sigtech.framework.internal.infra.curves.dynamic_curve.DBDepoCurve'>[140312349067104]
There is a curve stored for each day, using its discount factors/depo rates:
Input
Output
curve_history = curve.history()
curve_history.head()
2007-01-01 {3653.0: 4.145, 456.0: 4.06, 5479.0: 4.215, 54...
2007-01-02 {3653.0: 4.117, 456.0: 4.011, 5479.0: 4.198, 5...
2007-01-03 {3653.0: 4.107, 458.0: 4.021, 5479.0: 4.191, 5...
2007-01-04 {3654.0: 4.141, 456.0: 4.03, 5481.0: 4.223, 54...
2007-01-05 {3653.0: 4.177, 456.0: 4.055, 5480.0: 4.258999...
Name: (MidPrice, LONDON_1600, EUR.FX CURVE), dtype: object
The following graph visualises the discount factors:
curve_date = curve.history().index[0].date()
pillar_dates = [d.to_date() for d in curve.get_handle(curve_date).dates()]
spot_date = fx_market.fx_spot_date('USD', 'EUR', curve_date)
curve_df = pd.Series([curve.discount_factor(curve_date, d, spot_date)
for d in pillar_dates], index=pillar_dates)
curve_df.plot(title='EUR FX Curve Discount Factors');

Creating strategies

Use the RollingFXForwardStrategy building block object to create forward contract strategies.
© 2023 SIG Technologies Limited