[Coinbase] Quantitative Crypto Insight: A systematic crypto trading strategy using perpetual futures
Tl;dr: Perpetuals futures are financial instruments that have become increasingly popular in the crypto space. Coinbase demonstrates a hypothetical simple delta neutral strategy which takes advantage of positively skewed funding rates in the perpetual futures market to achieve a high return on investment.
By The Coinbase Data Science Quantitative Research Team
Systematic Trading Strategy
A systematic trading strategy is a mechanical way of trading that is aimed at exploiting certain aspects of market inefficiencies to achieve investment goals. These strategies employ disciplined, rule-based trading that can be easily backtested with historical market data. Rule-based trading follows strict, predefined trading methodologies that are not impacted by market conditions.
Systematic trading is a fully grown area of investing that spans a wide range of strategies and asset classes. With the ever-growing crypto market, in which thousands of tokens are being traded and derivatives offerings are being expanded, systematic trading will play an important role in goal-based investing with efficient capital allocation and rigorous risk management. In this piece, we explore a delta neutral strategy to demonstrate the basic building blocks of systematic trading.
Spot market and derivative market terms:
Spot Trading: Buying or selling assets that results in its immediate transfer of ownership. For crypto spot trading, one can directly buy or sell crypto assets via centralized exchange, retail broker, or decentralized exchanges. (For example: Coinbase Prime, Coinbase Exchange)
Derivatives Trading: Derivatives are financial contracts whose values are dependent on underlying assets. These contracts are set between two parties and can trade over a centralized/decentralized exchange or over-the-counter (OTC). A futures contract, one of the most popular derivatives, obligates parties to transact an underlying asset at a future date at a predetermined price. Derivatives, such as futures, are highly regulated financial instruments. For example in the United States, the CFTC regulated the derivatives market including commodity futures, options and swaps market as well as over-the-counter markets.
Delta and Delta Neutral: The delta measures the rate of change of the derivative contract’s price with respect to changes in the underlying asset’s price. For the underlying asset itself S, it is called delta one because the rate of change of S relative to itself is 1. Futures contracts that track closely the underlying asset, are approximately delta one. To achieve a delta neutral portfolio, one can take offsetting positions in spot and derivatives markets to construct a portfolio with an overall delta equal to zero. The zero/neutral delta portfolio is not subject to underlying price movements.
Perpetual futures have become a popular way to trade crypto assets. Unlike traditional futures that have expirations and associated delivery or settlement dates, perpetual futures don’t expire. These instruments are periodically cash settled with funding rate payment and there is no actual delivery of the underlying assets. Perpetual futures have to be either closed out to exit or held indefinitely.
Perpetual futures have their value closely pegged to the underlying assets they track with a funding payment mechanism built into the contract. It allows investors to easily take directional positions without worrying about physical delivery of the underlying assets. Perpetual futures have several advantages: it’s easy to take long or short positions, contracts can have high leverage, and there is no expiration to the contract — eliminating the need to roll futures.
We will use two scenarios to illustrate how the funding payment mechanism works:
- When perpetual futures are traded at a premium to spot prices, the funding rate is positive. Long futures traders will pay the short counterparty a funding amount proportional to the funding rate determined by the exchange.
- When perpetual futures are traded at a discount to spot prices, the funding rate is negative. Short futures traders will pay the long counterparty.
For illustrative purposes only.
As illustrated above, the larger the futures price diverges from the spot price, the bigger funding payment will be exchanged under a clamp threshold from exchanges. It’s an effective way to balance the supply and demand in the futures market and hence keep futures tightly anchored to underlying assets.
Systematic trading strategy with perpetual futures
Based on the above discussions, we explore a systematic delta neutral trading strategy that monetizes the rich funding rate in the perpetual futures market. A one-step setup of initial positions is required and no further rebalance is needed. We first take a long position on the underlying asset, at the same time take a short position on the perpetual future with the same notional. Given that the price of a perpetual future closely follows its underlying asset, the net position is delta neutral and has little exposure to the price movement of underlying assets. The strategy draws its performance from the funding rate payments since it is on the short side of the perpetual market.
Below is how it can be set up with BTC and BTC-PERP on 2x leverage:
- Deposit USD Y amount as collateral
- Long BTC with notional 2xY
- Short BTC-PERP with notional 2xY
- Every 1 hour, the position either collects or pays the funding on 2xY BTC-PERP position.
Here’s an example of a one period performance:
A trader opens a long position on Bitcoin. The open price was $9,910 USD and position size was 2 BTC. The trader at the same time opens a short position on BTC-PERP at $10,000 and with position size 2*9,910/10,000 = 1.982.
If the price of Bitcoin then increases to 12,500 USD and BTC-PERP increases to 12,613, the unrealized profit from BTC position is 2*(12,500–9,910) = 5,180, and unrealized loss from BTC-PERP position is -1.982*(12,613–10,000) = -5,180. The profit and loss offset each other nicely. During the same period, if we assume a funding rate of 0.3%, we will collect a payment of 10,000 * 1.982 * 0.3% = 59.5. With periodic funding payments, the strategy accrues over time.
In our backtest, we deposit USD $1MM as our collateral and then enter into BTC long positions and BTC-PERP short positions with the same amount of notional. Given the strategy has minimum risk to the underlying price fluctuation, we can leverage up our positions by 10x and the leverage ratio stays stable through the period with negligible auto-deleverage/liquidation risk. With a holding period of approximately 1Y, the strategy performed with a return of ~40%.
Data source: Coinbase and FTX
In order to confirm the achieved performance, backtests with different holding periods and different entry/exit dates were performed: 1 month, 3 months, and 6 months. The table below shows median metrics related to these backtests:
Data source: Coinbase and FTX
From the simulations above, the longer the holding period, the higher the annualized return.
We just demonstrated a systematic trading strategy with spot BTC and perpetual futures. It is a basic strategy that only requires the initial setup of spot and derivative positions; no further active position management is needed before closing out. To make the strategy more robust, one can devise additional trading rules for risk management under market stress scenarios. It will also be interesting to explore ideas on running more dynamic trading rules that adjust leverage ratio to enhance return.
The core of the strategy is funding arbitrage between the perpetual futures market and fiat currency borrowing. Below we take a closer look at the funding rate distributions in the futures market. The rate is concentrated in the bucket around 2%, which can be thought of as a breakeven rate. But there is a long positive skewed tail which contributes to our strategy’s performance.
Data source: FTX
Below we also look at the autocorrelation function (ACF) of funding rate to understand how past observations are correlated to future occurrences. It is clear from the autocorrelogram below that the funding rate itself exhibits serial correlation up to about 20 days.
Data source: FTX
It is also interesting to see how funding rate and spot prices are related. It is evident from the below chart that when spot prices quickly move up, so is the funding rate. And the reverse applies as well.
Data source: Coinbase and FTX
When spots are quickly ramping up, trend followers are chasing the market, possibly with leveraged positions in the futures market. The demand for funding in the futures market pushes up funding costs. When the market takes a downturn, there is less appetite for funding, so funding costs decrease and can even go negative.
Execution risk for delta PnL offsetting. Coinbase is running a delta neutral strategy for which PnL from spot leg and perpetual futures leg offset from each other is expected. Oftentimes, prices between spot and futures could diverge and cause non-trivial delta PnL. This can be mitigated by entering into/existing from the positions gradually in relatively small sizes.
Slippage cost, the effective price paid/received when Coinbase executes orders against an exchange or DEX. When the order size is big compared to order book depth, advanced trading algorithms are necessary to mitigate slippage cost.
Funding rate risk, funding rate is stochastic. It can fluctuate above/below zero. When the rate drifts below zero, the strategy underperforms. Historical markets showed a positively skewed funding rate distribution. However, there is no guarantee of its path in the future.
Leverage risk, auto-deleveraging/liquidation. In order to have a sizable return, the strategy has to be levered up. Given the strategy is delta neutral, it’s safe to run 10x leverage under normal market conditions. However, in a stressed market when spot price and perpetual futures price diverge for a prolonged period of time, the strategy bears risk of auto-delverage or even liquidation, which could result in significant capital losses.
We have demonstrated how to run a systematic trading strategy in the crypto market with a basic one-step setup. Systematic trading in crypto is an uncharted territory in which many of the existing strategies in traditional financial markets could be equally applicable. However, with innovations coming from different angles (e.g, decentralized exchanges, liquidity pools, DeFi lending/borrowing) many new opportunities and possibilities arise as a result. We, as part of the Data Science Quantitative Research team, aim to develop and research in this space from a quantitative perspective that can be used to drive new Coinbase products.
You can track crypto spot and derivatives markets with Coinbase Prime analytics, a set of institution-focused market data features that provide real-time and historical analytics for cryptocurrency spot and derivatives markets. Being elegant and user-friendly, Coinbase Prime analytics features provide a comprehensive analytics toolkit built to meet the needs of sophisticated investors and market participants.
The team would like to thank Guofan Hu and Nabil Benbada for their contributions to this research piece.
Disclaimer: This content is being provided to you for informational purposes only. This is not financial or investment advice and the content on this page and any information contained therein, does not constitute a recommendation by Coinbase to buy, sell or hold any security, derivatives or similar financial product or instrument referenced in the content. The hypothetical strategy referenced herein is for demonstration purposes only and is not an endorsement or recommendation of a particular trading strategy . Real trading, including trading in the types of instruments identified in this document carries risks not limited to operational risk, strategy risk, etc and can incur significant loss. Public FTX market data is used for the backtest.
Quantitative Crypto Insight: A systematic crypto trading strategy using perpetual futures was originally published in The Coinbase Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.