Rolling FX forward strategy#
Initialize SigTech
Import Python libraries:
import datetime as dtm
import numpy as np
import pandas as pd
import sigtech.framework as sig
Initialize the SigTech framework environment:
env = sig.init()
Learn more
Create a rolling FX forward strategy#
Use the sig.RollingFXForwardStrategy
class to create a rolling FX forward strategy object.
Define a helper function, get_fxrf
, that creates rolling FX forward strategies:
def get_fxrf(long_ccy, forward_tenor, direction):
return sig.RollingFXForwardStrategy(
start_date=dtm.date(2023, 1, 1),
end_date=dtm.date(2024, 1, 1),
currency="USD",
direction=direction,
forward_tenor=forward_tenor,
long_currency=long_ccy,
)
Create an example rolling FX forward strategy:
st = get_fxrf('EUR', '3M_IMM', 'long')
st
View price data:
st.history().tail()
Plot the price data:
st.history().plot(title='Rolling FX Forward Performance');
API documentation#
Learn more: API documentation