Tutorial: FX carry strategy
This tutorial shows new SigTech users how to construct a systematic investment strategy, where the strategy involves a number of different FX forward contracts, and where the investment decision is based on the difference between relevant short term interest rates.
Learn more: Example notebooks
Access: to run the related Jupyter notebook, the appropriate data entitlements need to be in place for your organisation. To request access to SigTech's FX data, email sales@Sigtech.com
.
Workflow overview
When creating an investment strategy on the SigTech platform, the workflow follows these steps:
Set up the environment
Define the investment universe
Create the strategy
Construct the portfolio
Generate the performance report
Set up the environment
Setting up your environment takes three steps:
Import the relevant internal and external libraries
Configure the environment parameters
Initialise the environment
Learn more: Setting up the environment
Define the investment universe
In this step, you will define the currencies that will form the universe of the investment strategy.
Note: the currencies are traded against the US Dollar for simplicity, but the platform also allows for cross currency pairs to be traded.
Learn more: Market Data
Define the relevant start date to be used when creating the strategy:
Get the currency pairs based on the previously defined constant ASSETS
:
Get the price time series for each currency pair below:
This strategy is expressed using FX Forward contracts. When the investment universe contains forward contracts, it's important to handle the rolling of the contracts. As a given forward contract has a maturity date, it's crucial to systematically handle how the strategy trades in and out of forward contracts to maintain an exposure to the underlying asset.
The SigTech platform offers the RollingFXForwardStrategy
class which allows easily handling of the rolling of forward contracts.
In this tutorial, nine RollingFXForwardStrategy
objects are created. The following function allows you to easily create these RollingFXForwardStrategy
objects by passing in a few parameters.
The RollingFXForwardStrategy
objects are instantiated using a few different parameters, such as forward_tenor
and long_currency
.
Learn more: Rolling FX Forward Strategy
Note: the RollingFXForwardStrategy
objects assume a constant long exposure from start date to end date of the strategy.
Using a dictionary comprehension, all of the previously defined currencies are passed into the following function, creating a RollingFXForwardStrategy
object for each of the currencies against the US Dollar:
The following code block shows how each of the RollingFXForwardStrategy
objects are performing over time:
Create the strategy
The strategy will take a long position in the currency pairs where the spot FX rate is trading at a discount in relation to the forward FX rate, and a short position in currency pairs that are trading at a premium in relation to the spot FX rate.
In the following code block the forward FX rates are being generated for the time period of the strategy:
The following code block generates a -1
when the forward rate is below the spot rate, and a 1
when the forward rate is above the spot rate:
Construct the portfolio
To apply the strategy to the universe and combine all the assets into a portfolio, use the SignalStrategy
class.
Before you can use the SignalStrategy
class, you need to convert the pandas DataFrame of signals into a signal object:
You can now create a SignalStrategy
object. There are numerous different parameters and alternatives that you can make use of, such as using different allocation functions between the assets in the strategy.
Learn more: Signal Strategy
Generate the performance report
Use the following code block to create a performance report that contains information on metrics, rolling performance charts and performance calendars.
There are a wide range of different performance views and reports available, depending on the specific use case.
Learn more: Performance Analytics
Next steps
Learn more: Strategy building blocks | Instruments
Last updated