cover

Fractional Differentiation in time series

Time-series forecasting solutions aims to find the next N values that in the future will follow the starting series. For doing so, there exist different approaches, some of these are statistical, like the ARIMA family algorithms, others are based on AI algorithm. The stationarity of time-series is the principal feature that you often need in order to develop a powerful forecasting model, because a stationary series maintains mean, variance and covariance over time.

There are different ways to turn a non-stationary time-series into stationary, like integer differentiation or log transformation, so use on of these approaches you could solve the stationary problem.

Memory vs Stationarity

In finance, the time-series data are very often non-stationary, due to the arbitrage forces that introduce noise in data. The suggested previous transformations, that take a series into the stationary world, often also transform data such that erase all the memory of the time-series. In practice, as De Prado says in his book (Advanced in Finance Machine Learning), the integer differentiated series, like returns in financial world, have a memory cut-off, in the sense that history is disregarded entirely after a finite sample window. The returns are stationary, but with no trace of memory. Someone can proceed taking the original series as is, with its memory, without taking into account the stationarity condition, but it does not lead to a good solution. So the dilemma is: prefer preserving memory or making stationary your time-series?

Stationarity is necessary for inferential purpose, while memory is fundamental for the predictive power of the forecasting model.

Fractional Differentiation for financial time-series

Letā€™s take into account the integer and fractional differentiation and letā€™s understand the difference, in terms of memory, that they preserve after their application to the series.

Consider the time-series as follows:

X^=āˆ‘k=0wkāˆ—Xtāˆ’k\hat{X} = \sum_{k=0}w_k * X_{t-k}

where wkw_k represents the weight for the lagged series by kk lags.

Preserving memory
Preserving memory

Here is visible the application of different order of differentiation, in order to highlight the ww coefficients and their weights over lags.

As you can see the 1.0 represents the integer differentiation and it is possible to understand that the weight ends totally after 2 lags.

The order of differentiation less than 1.0 represents the application of fractional differentiation to the series and this plot shows how the memory is minimal, but never lost, after also 6 lags.

Fractional Differentiation analysis on ADA-EUR
Fractional Differentiation analysis on ADA-EUR

This plot, instead, shows the fractional differentiated series related to the correlation. On the right axis there is the result of the ADFtest for the stationarity of the differentiated series and the dashed line represents the 95% of confidence that the differentiated series is stationary.

From this plot we get that using the fractional differentiated series with the fraction=0.4, permits to reach a series stationary, well correlated to the original time series, i.e. maintaining trace of memory.

Conclusion

In finance, it is very useful for preserving memory and processing a stationary series, so fractional differentiation permits transforming the input time-series into a better preprocessed time-series for forecasting models.

Have you ever thought to use the fractional differentiation as transformation for your time-series data?

Resources

Related articles:

    background

    05 December 2022

    avatar

    Francesco Di Salvo

    45 min

    30 Days of Machine Learning Engineering

    30 Days of Machine Learning Engineering

    background

    16 January 2023

    avatar

    Daniele Moltisanti

    6 min

    Advanced Data Normalization Techniques for Financial Data Analysis

    In the financial industry, data normalization is an essential step in ensuring accurate and meaningful analysis of financial data.

    background

    01 January 2025

    avatar

    Daniele Moltisanti

    20 min

    Agentic AI vs. Traditional AI: Key Differences, Benefits, and Risks

    Explore the differences between Agentic AI and Traditional AI through real-world examples. Learn about their benefits, risks, and how Agentic AI is transforming industries like traffic management and healthcare.

    background

    17 January 2023

    avatar

    Francesco Di Salvo

    10 min

    AI for breast cancer diagnosis

    Analysis of AI applications for fighting breast cancer.

    background

    18 November 2024

    avatar

    Daniele Moltisanti

    12 min

    Meet Lara: The AI Translator Revolutionizing Global Communication

    Lara is the cutting-edge AI-powered translator designed to rival professional human translations with contextual accuracy and style flexibility. Learn more!

JoinUS