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:

fx_forward.strike

FX Forward curves

Forward instruments are priced in the platform using daily FX curves:

fx_market = FXMarket.instance()
curve = sig.obj.get(fx_market.fx_curve_name('EUR'))
curve

There is a curve stored for each day, using its discount factors/depo rates:

curve_history = curve.history()
curve_history.head()

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.

Last updated

© 2023 SIG Technologies Limited