Fast Fractional Differencing on GPUs using Numba and RAPIDS (Part 2)

Yi Dong
RAPIDS AI
Published in
7 min readOct 15, 2019

--

By: Yi Dong and Mark J. Bennett

Fractional Differencing Signals

Background

In our previous blog, we demonstrated how to use GPUs to accelerate fractional differencing (FD) computation efficiently with Numba and RAPIDS to achieve a 100x speedup. Though the code looks somewhat detailed and complicated, wrapping the low-level numeric computations inside the technical indicator node in gQuant simplifies the task. The problem becomes more organized and hierarchical as we begin to separate all the related detailed tasks. In this blog, we will show an end-to-end example to calculate fractional differencing signals and predict trading signals and backtest via the decision-tree based XGBoost algorithm.

We will use a dataset downloaded from YAHOO finance for our dataset and the backtesting procedure. The dataset contains 5,052 stocks spanning from the year 1990 to year 2016 (approximately 6,526 days). The raw data is based upon daily bar data which has Open, Close, High, Low and Volume information from the NYSE and NASDAQ markets.

Our goal is to predict the next day return each stock based on current computed features of all the stocks. When running a backtest, it will go long a unit dollar of stock if the predicted return is positive, otherwise, it will go short a unit dollar of stock…

--

--