# How to calculate fractional differences of a timeseries?

I have a timeseries I am looking to transform with fractional differences per the following description:

The idea being to retain the essence of stationarity of, say, a log transformed integer series while preserving some of the 'memory' present in the levels of the values in the original series.

I can code this up manually but wondering what the more direct route might be within WL / Mathematica -- preferably via 'first class' functions within the language. Any advice greatly appreciated!

EDIT

For sake of a reproducible and fun example for the community, let's assume I want the fractional differences of a financial timeseries object

levels = QuantityMagnitude@FinancialData["SPY",{2020,1,1}]


The stationary transform is trivial:

logTransform = Differences@Log@levels


How would I obtain the fractional differences of levels rather than the simple log transform? Assume a d value of .4

SECOND EDIT

This github repo https://github.com/simaki/fracdiff nails the implementation in Python where the following plot is produced:

Underlying source here: https://github.com/simaki/fracdiff/blob/main/fracdiff/fracdiff.py

Really just trying to figure out what the first-class implementation of this in WL would use!

• Try: Series[(1 - b)^d, {b, 0, 5}] Mar 16, 2021 at 11:13
• Thanks for this. I've added a little contextual example to the question. If you can apply your comment to a full answer for this additional context, I will gladly award you the answer!
– R110
Mar 16, 2021 at 11:58