Live Demo: Bitcoin Futures Momentum Strategy

Live Demo: Bitcoin Futures Momentum Strategy

2 August 2021

Find out how to build a Bitcoin Futures Momentum Strategy using the SigTech platform.

Watch a step by step demo as SigTech Product Manager, Navdeep Sahote, demonstrates how to develop a momentum strategy for cryptocurrency futures that executes on the CME Bitcoin Futures Market.

Want to see more?

Complete the form below to request a tailored, live demonstration of our platform by one of our product experts.

Video transcript

In this video, we are going to use the SigTech platform to develop a momentum strategy for cryptocurrency futures that executes on the CME Bitcoin Futures Market.

I’ll begin with a brief introduction to our platform, alongside an overview of the workflow.

This figure illustrates the strategy development cycle we will follow. I will begin by defining the investable universe, then attempt to define momentum factors and signals.

It is worth noting that within the platform we support three fundamental objects that act as the foundation for overall strategies. First we have tradable instruments, which are tradable on the financial markets. Then we have Tradable strategies, which are a set of rules that decide when to buy or sell tradable instruments over time. Finally, we have non-tradable data objects, which are used for research or signalling purposes, such as macroeconomic data.

Here, I have called the March 2021 future for Bitcoin, and asked for some static data. As we can see, I have called the futures name, expiry date, exchange name as well as the previous available contract. I will then ask for all non-static data fields, which returns the last price, open, high low volume and open interest. Here is a plot of the last price and volume for this particular object.

The common task of handling the rolling of futures to maintain exposure to a specific contract is an example of a building block offered on the platform. The rolling future strategy building block is just one of many out-of-the-box strategies available. This strategy can then be treated as a tradeable instrument that can be used within other strategies via object-oriented modelling. Therefore, complexity can be increased iteratively, layer by layer, on our models.

In this instance, I am creating a rolling future strategy that is exposed to the front month contract. I’ve defined the key factors here, alongside the front offset, which will tell the engine how many days before expiry to begin the rolling process. In this case, the rolls will take place 6 and 4 days before expiry, 50% of our contracts will be rolled on each day.

Now we can begin to look at how a momentum strategy can be created for the Bitcoin futures market. This strategy will trade based on signals generated by a moving average crossover.

I’ve defined a simple function here that constructs a signal given two window lengths. This signal is then mapped to the instrument passed into the function, and returns a dataframe of 1’s, 0’s and -1’s. This will represent either a long, flat or short position. 1’s are returned when the short span moving average is higher than the long span, and the opposite is true for -1’s. We can see the output here, a dataframe of our signals, for a 10-20 moving average strategy, mapped to our bitcoin rolling futures strategy.

Once this dataframe is built, I can pass it into our SignalStrategy building block. This is again another pre-built method that will generate a backtest from a dataframe of signals. The SigTech backtesting engine accurately models the entire trade life cycle at instrument level. It will also take into consideration factors such as trading costs.

You have seen how to construct a simple signal strategy in our platform, but we can go further and attempt to test for a range of short and long span moving averages, to help find the best combination for our instrument. I’ve defined another function here that follows the same steps, but now outputs the entire strategy object given the same three arguments. I can then set a range of moving average spans for which I’d like to backtest.

The short spans will range from 2 to 20, while the long spans will range from 21 to 50. I will therefore be simulating around 1000 backtests, for which I will push the sharpe ratio of each one to a numpy matrix. I can then plot a 2d heatmap of the sharpe ratios for all simulations, and this is seen here.

The sharpe ratios seem to be highest in randomly distributed areas, and so we can pick one at random to analyse further, such as the 9-32 moving average strategy.

Now we can compare our three strategies. We have the baseline, the basic rolling futures strategy, against the 10/20 and 9/32 moving average strategies. Here we have plotted the logarithmic returns.

You can go even further and ask for a detailed performance review of all three strategies. This returns key metrics such as the annualised excess return, max drawdown and so on. Some rolling plots can also be generated to visually display the difference in performance between our strategies.

We previously published a blog post that unpicks the advantages of a Bitcoin Futures Momentum Strategy.


This document is not, and should not be construed as financial advice or an invitation to purchase financial products. It is provided for information purposes only and is subject to the terms and conditions of our disclaimer which can be accessed at: