** **

The XBTUSD is an XBT/USD perpetual contract priced on the .BXBT Index and traded on the BitMEX exchange.^{[1]} This derivative contract is perpetual, which means that it has no expiry. It is designed to track the value of the .BXBT index, an equally weighted price index on the XBT/USD exchange rate quoted on Bitstamp and GDAX.^{[2]} This instrument is characterized by the payment of a funding rate three times per day.

Our analysis is as follows: first, we describe the determinants of the funding and its effect; second, we suggest a method to obtain more accurate predictions of the future funding rate; third, we suggest a straightforward trading strategy on the XBTUSD contract and analyze its optimal entry signal.

**The funding mechanism**

As this contract does not settle, the adherence of its price to the value of the underlying index is obtained through the funding mechanism. The funding is paid by the long leg of the contract to the short leg of the contract three times per day at 4:00, 12:00 and 20:00 UTC.^{[3]} The funding rate is a function of:

- the difference between the interest rate on USD and XBT;
- the premium rate , which in turn depends on the basis between the price of XBTUSD and the index .BXBT and the liquidity of the book of XBTUSD.

is defined as

Assuming that the market of XBTUSD is enough deep and there is no bid-ask spread, the premium rate reduces to the basis and the funding rate is given by the relationship shown in *Chart 1*.

*Chart 1: relationship between Funding rate and percentage basis (given *

As the price of the XBTUSD contract grows relative to the underlying index, the funding rate paid by the long leg to the short leg increases, thus incentivizing the opening of new short positions on the contract and the mean reversion of the contract price to the value of the index. The converse holds: if the basis is negative, the short leg has to pay the negative funding rate to the long leg, eventually making the basis revert to zero.

Consequently, the funding acts as a partial correction of the basis. This effect is evident if you consider that the market value of the perpetual swap at the time of the funding is approximately the one calculated on the index:^{[4]}

*Chart 2* shows the historical values of the percentage basis and the funding rate. The presence of the 0.05% dampener and of the bid-ask spread allows the basis to be close but not equal to 0. Starting from February 2018, the range of oscillations of the basis has decreased, which resulted in smaller funding rates.

*Chart 2: historical percentage basis and funding rate from 18 July 2017 to 18 July 2018, 1-hour frequency.*

**Forecasting the funding rate **

An educated guess of the next funding rate is crucial in the investment decision process. For this purpose, we try to develop an empirically-based predictor of the funding rate.

The exact formula of the funding rate is

where is the average Premium rate and is the average difference between the interest rate on USD and XBT. Both averages are computed over the 8-hour interval between the current and the previous funding.

The rate is historically constant to 0.01%, so is its average . Thus, forecasting reduces to forecasting the average premium .

The most trivial estimator of the final average premium is the running average of the pointwise premium , computed starting from the last funding up to now. More formally, given two consecutive funding times and time , is defined as

where is the number of observed pointwise premium rates between and t.^{[5]}

At the time of the payment of the funding, by definition of . However, the volatility of makes diverge from the final value until close to the payment of the funding. *Chart 3* shows an eloquent example of this behavior between 1st and 5th April 2018.

*Chart 3: vs. between 1st and 5th April 2018.*

However, we can improve our estimation by adding an explicit forecast for the evolution of . To do so, we analyze the historical premium at 5-minute frequency from 26^{th} January to 18^{th} July 2018. The autocorrelation and partial autocorrelation functions of are shown in *Chart 4*. The is highly autocorrelated, which suggests that we can exploit the information contained in its past values to better predict its future path.

*Chart 4: autocorrelation and partial autocorrelation functions of the premium rate.*

Because is a function of the percentage basis between the XBTUSD contract and the underlying index, we decide to include the percentage basis in our forecasting model.^{[6]} We employ an agnostic approach to the problem, that is we do not assume an a priori theoretical structure for the time-evolution of and . Instead, we estimate a Vector AutoRegression model on the pair , together with the remaining time until the next payment of the funding as an exogenous variable.^{[7]} The forecast is divided into three phases:

- first, we estimate the parameters of the model using the historical data for the last 4 days (which corresponds to 1152 5-minute observations);
^{[8]} - second, we use the estimated model to forecast the future pointwise premium rate with . Then, we compute its average, obtaining the “forward-looking” average
- finally, we obtain the “forward-backward weighted estimator” of , which is the weighted average of and

To compare the relative performance of with respect to , we compute the out-of-sample mean squared prediction error

where is the number of payments of the funding, is the time of the -th payment and is the time until the next payment.^{[9]} *Chart 5* shows the ratio between and .

*Chart 5 Ratio between and for each starting from 8 hours.*

The ratio is lower than 1 for every , which means that the predictor is more efficient than the simple historical running average and proves to be a more reliable indicator than the , even when the payment is further in time. Recall that this comparison is based on the out-of-sample performance of the two estimators, which is the realized prediction accuracy.

**Determining the entry signal of a hedged strategy on XBTUSD**

Here, we analyze a simple strategy on the XBTUSD swap contract and the underlying index, with a particular focus on the value of the basis and of the funding rate as entry point indicators for the strategy. This strategy is based on the fact that the .BXBT index which underlies the perpetual swap contract is made of only two constituents, so it is easier to physically replicate it. The strategy is simple: we open a long position on one perpetual swap contract (whose face value is 1$) and a short position on 1$ worth of XBT; then, we exit the position soon after the payment of the funding. The total gain of the strategy has two components, the “capital gain”

and the funding

We close both positions after the payment of the funding because that at this time , so our strategy has the best hedge possible. We assume we use 1x leverage.^{[10]}

*Chart 6* shows the hypothetical returns of the strategy which could have been earned since January 2018, divided into the “capital gain” and funding components. The result is consistent with *Chart 1*: as the dispersion of the basis and of the funding rate have decreased in the past year, so have the returns of our strategy. Two important features of the series of returns are that the “capital gain” component is higher than the funding one (their mean absolute values are 10 bps vs. 4 bps) and that their correlation is positive, but low (the correlation coefficient is 0.315).

*Chart 6: the “capital gain” and funding components of the total return of the strategy.*

The result in *Chart 6 *is general and does not take into account an optimal entry strategy. We suggest using two indicators: the current percentage basis , as we have a net long position on the basis, and the running average of the past funding rates since the last payment , as we are short the next funding payment. The lower are both indicators, the higher is our potential return. *Chart 7* and *Chart 8* show the two components of the return vs. their respective indicators.

Chart 7: “Capital gain” component vs. percentage basis. |
Chart 8: funding component vs. . |

To determine the entry points of the strategy, we set a target win-rate of , which is the percentage of positive returns we want to obtain with our strategy. It is equivalent to setting the 20% Value at Risk of our strategy at 0%. Using an in-sample quantile regression, we estimate the pairs of threshold values and such that if both the basis and running average of the funding rate are lower than and , the probability of having a positive return is higher than the winning rate. The result of the estimation is showed in *Chart 9*.

*Chart 9: the – threshold at 4 hours from the funding. If the current and are below the red line, we enter the strategy.*

The threshold depends on the number of hours until the next payment of the funding: the further in time the payment, the stricter is the entry rule because of the higher uncertainty on both the “capital gain” and funding components of the return. In general, both and must be negative, but if one of them is lower than -0.22% and -0.15% respectively, the other is allowed to take positive values.

To verify the effectiveness of this entry rule when applied in practice, we simulate the investment process on historical data. This simulation is composed of two phases:

- first, for each point in time we use the last 30 days of data to estimate the threshold values and ;
- then, if the next value and are lower than the threshold obtained above, we execute the strategy.

We run the simulation with the historical data from 13^{th} January to 7^{th} July 2018. The two indictors give an entry signal 13% of the time. The histogram of the resulting returns is shown in *Chart 10*.

*Chart 10: probability density function of the simulated returns.*

The following chart summarizes some statistics of the returns. All statistics are in daily values.^{[11]}

% of positive returns | 86.8% |

Mean return | 0.426% |

Volatility | 0.345% |

Sharpe Ratio | 1.232 |

Sortino Ratio | 3.485 |

- https://www.bitmex.com/app/contract/XBTUSD ↑
- https://www.bitmex.com/app/index/.BXBT ↑
- The funding is equal to the funding rate time the value of the position, irrespective of the leverage used. ↑
- Recall that the XBTUSD contract is inverse, so the payoff of a long position is . ↑
- The number of observed premium rates depends on the frequency of the series. ↑
- The Premium rate depends also on the liquidity of the book of XBTUSD. We leave the inclusion of this information for further research. ↑
- After comparing different information criteria, we choose to be the order of the VAR() model. ↑
- The choice of the length of this rolling window is somewhat discretionary and should correspond to the longest available time interval for which we are confident that the conditions of the market remain constant. ↑
- The MSE is conditional on the time until the next payment of the funding rate because, all else equal, the closer is the payment, the lower is the uncertainty about the funding rate. ↑
- BitMEX allows up to 100x leverage on this contract. ↑
- The conversion is obtained considering three 8-hour periods per day. ↑