Introduction

Recent market volatility has prompted hundreds of discussions into potential causes of the market dip. One theory was the unwinding of the Yen Carry Trade. In this “micro-study” we'll explore the yen carry trade and watch its unwinding on the latest month's data.

Micro-studies are a new, easily digestible, short-story format of quant research we'll be testing over the next 2 months looking to repeat market phenomena and potential strategies around them. Our goal is to implement a micro-study in less than 20 lines, showcasing the raw power of what you can do with QuantConnect.

Background

The currency trade borrows from a low interest rate currency (Yen) and invests it in a higher interest rate assets such as US Treasuries. US bonds offer a safe, low volatility investment so investors could apply significant leverage on the trade. This leverage is often described as a loan.

As the Yen was also slowly devaluing (e.g. 2023: 140 Yen/$1 USD → 2024: 160 Yen/USD), it was also becoming cheaper to repay the loans, making the trade more attractive. On paper, this made the position appear like a trending asset that was also paying 4% dividends.

For the first time in years, Japanese authorities decided to increase the interest rate from 0% to 0.25%. The theories were many funds decided to repay their loans and close out the trade, causing billions of dollars in Yen re-purchases and rapid strengthening the yen within a 2 week period. 

jared_broad_1723726539.jpg
Rapidly Strengthening Yen v Dollar July 2024

Implementation

To implement this strategy on QuantConnect, we'll use the USDJPY FX pair and the BIL US T-Bill ETF. 

  1. We used $1M USD collateral starting cash, and aimed to trade $80M in total holdings.
self.set_cash(1_000_000) # 1M usd = 141M Yen Jan 1 2024.

 

2. We added the assets and specified a very high leverage to model the large cash loans the funds will be taking on the investment. Both assets are a liquid and low volatility so would likely be permitted significant buying power. Raw data normalization mode was used so yield payments were deposited as cash we could use to service the loan. 

self.add_equity("BIL", Resolution.DAILY, leverage=100, data_normalization_mode=DataNormalizationMode.RAW)  
self.add_forex("USDJPY", Resolution.DAILY, leverage=100)

 

3. To trade, we scheduled an event and set equal holdings of USDJPY (modeling our loan and purchase of Yen), and BIL - a liquid yield paying ETF that invests in US treasuries. QuantConnect models FX trading with a cashbook, so this trade would appear as +$40M USD and -Y5.6B Yen. An accompanying $40M position was opened on the ETF, BIL.

def trade(self):
   if not self.portfolio.invested:
	   self.set_holdings("BIL", 40)
	   self.set_holdings("USDJPY", 40)
	   self._interest_payment = -40_000_000 * (0.0025/12) # USD
   
   # deduct interest
   self.portfolio.cash_book['USD'].add_amount(self._interest_payment)

To model the interest on the loan we used the 0.25% interest rate multiplied by the USD currency loan value. This modeled serving the loan repayments without growing the principle of the loan. No risk control was added to the strategy for illustrative purposes.

Conclusion

The Yen Carry Trade is a very simple, but highly leveraged strategy capitalizing on the disparity in interest rates and devaluation of the Yen. With a simple framework we could model the trade on the QuantConnect platform, and likely have executed the trade through partner brokerages. For the majority of 2024 it had a Sharpe ratio of 16. In the last 4 weeks it has experienced a 60% drawdown.

Significant improvements could be made to control risk such as pulling in our news feeds to monitor for central bank decisions, or adding a simple trailing stoploss. 

jared_broad_1723727980.jpg
Yen Carry Trade Performance January-August 2024