AuthorJing Wu2018-06-29

Introduction

Carry trade is very common in the foreign exchange market. The strategy systematically sells low-interest rate currencies and buys high-interest rates currencies. The “carry” of an asset is the opportunity cost of holding that asset. Carry trade strategy holds one currency relative to another in order to capture the spread between the rates. We can think of this strategy as borrowing money from one country with a lower interest rate and investing it in another country with a higher interest rate.

Method

Importing Custom Data

The central bank interest rate data is from Nasdaq Data Link. For the trading universe, we choose 9 currencies whose central bank interest rate data is available from Nasdaq Data Link.

rate_symbol_by_ticker = {
    "USDEUR": "BCB/17900",  # Euro Area
    "USDZAR": "BCB/17906",  # South Africa
    "USDAUD": "BCB/17880",  # Australia
    "USDJPY": "BCB/17903",  # Japan
    "USDTRY": "BCB/17907",  # Turkey
    "USDINR": "BCB/17901",  # India
    "USDCNY": "BCB/17899",  # China
    "USDMXN": "BCB/17904",  # Mexico
    "USDCAD": "BCB/17881"   # Canada
}
for ticker, rate_symbol in rate_symbol_by_ticker.items():
    forex_symbol = self.AddForex(ticker, Resolution.Daily, Market.Oanda).Symbol
    data_symbol = self.AddData(NasdaqDataLink, rate_symbol, Resolution.Daily, TimeZones.Utc, True).Symbol

We save the interest rate symbol and the correspondent Forex asset symbol into a dictionary.

Monthly Rebalance Trading

Next step we sort the Forex symbol by the value of interest rate. The algorithm goes long the currency with the highest interest rates and goes short the currency with the lowest interest rate. The strategy is rebalanced monthly. The Scheduled Event method is used to fire the rebalance event at the first trading day each month.

Algorithm




Previous: Momentum Effect in Stocks Next: Pairs Trading with Stocks