Here's a basic R example for plotting trailing 48-month Hurst Index of SPY:
# Libraries
require(quantmod)
require(PerformanceAnalytics)
# Get SPY performance from Yahoo Finance
getSymbols(
"SPY", src = "yahoo",
from = "1996-01-01", to = format(Sys.Date(), "%Y-%m-%d")
)
# Calculate monthly returns
rets - ROC(to.monthly(SPY)[, 4], n = 1, type = "discrete")
# Calculate 48-month rolling HurstIndex
hurst.48 - apply.rolling(rets, FUN = "HurstIndex", width = 48)
# Plot
chart.TimeSeries(hurst.48, main = "Hurst Index for SPY")
This will yield the following chart: http://abwcharts.com/wp-content/uploads/2016/08/SPY48MoHurstIndex.png