How to build a solid intertemporal arbitrage strategy?

1. Policy Summary

Intertemporal arbitrage is to establish a trading position with the same position and opposite direction on the futures contract of the same product but in different months , and finally close the transaction by hedging or delivery to obtain income. Because of its good stability in contract spreads, it is favored by many traders. In this article, we will build a tradable intertemporal arbitrage strategy through the Nuggets quantitative platform to share with you.

2. Strategy logic

Different from many previous sample strategies that cannot be used for firm orders , this strategy revision focuses more on being able to conduct firm orders, which can be used as an in-depth reference for futures firm traders. This strategy is based on the price sequence of the main contract and the sub-main contract, and constructs the Bollinger bands of the price difference. When the price difference breaks through the upper track, short the price difference combination, and when the price difference breaks through the lower track, you can buy the price difference combination:

1. The price difference is higher than the upper track of the Bollinger Bands, short the price difference combination;

2. The spread is lower than the lower track of the Bollinger Bands, so do long spread combinations;

3. When the price difference returns to the mean level or when the deviation reaches the stop loss level, the position will be closed;

4. When the price difference returns to the mean level or when the deviation reaches the stop loss position, the position will be closed.

3. Backtest analysis

Backtest time: 2022-01-03 to 2023-05-30

Backtest varieties: coke main and sub-main contracts

Initial capital: 200,000

Fee: 0.0001

Slippage: 0.0001

During the backtest period, the intertemporal arbitrage strategy achieved an annualized return of 40.87%, a maximum drawdown of 7.52%, and a Sharpe ratio of 2.18. Compared with the high-frequency statistical arbitrage strategy, the transaction frequency of this strategy is relatively low, and the position period is longer, so it is less affected by slippage and handling fees, and it is more operable, but the drawdown is relatively large, which is suitable for relatively high risk appetite low-frequency traders.

The strategy code for this article has been uploaded to the Nuggets Quantitative Community, and you can get it yourself through the link below.

Portal: https://bbs.myquant.cn/thread/3466

- End -

Disclaimer: This content is original by Nuggets Quantitative, for learning, communication, and demonstration purposes only, and does not constitute any investment advice! If you need to reprint, please contact the author for authorization, otherwise it will be regarded as infringement!

Guess you like

Origin blog.csdn.net/weixin_42219751/article/details/131072523