Discussing the article: "Beyond Squared Returns: Path-Dependent Volatility"

Check out the new article: Beyond Squared Returns: Path-Dependent Volatility.

This article implements a path-dependent volatility model in MQL5 that keeps the sign of returns. The engine uses two-timescale EWMA kernels (four accumulators) to form activity and trend features, with closed-form coefficients and a lightweight kernel search. We provide a calibration workflow and an indicator that plots the decomposition, then test out of sample against EWMA and GARCH on multiple symbols. Results show clear gains on equity indicators and minimal gains on FX.

Open any chart and put a volatility measure on it: an ATR, a rolling standard deviation, a GARCH estimate from one of the econometric libraries published here. Whichever you pick, you get one line that rises when the market moves and falls when it is quiet.

Now ask that line a question it cannot answer. The reading is high: is the market selling off in a straight line, or thrashing sideways across the same range for the third day? Those are only two of the ways a market can be volatile, alongside gaps, news shocks and reversals, but they demand opposite behaviour from you: one punishes fading, the other punishes chasing breakouts. Your volatility indicator prints the same number for both.

This is structural, not a defect of any implementation. A conditional-variance model conditions today's variance on past squared returns, and squaring destroys the sign of the path: a week that fell and a week that rose look the same once the data reaches the model. The asymmetric extensions let the sign back in, as the next section shows, but only through the variance's own memory, never as a memory of the path's direction.

In this article we implement the path-dependent volatility model of Guyon and Lekeufack, which keeps the sign. They find that most of the variation in volatility is explained by two summaries of the recent path: a weighted sum of past signed returns, a trend measure, and a weighted sum of past squared returns, an activity measure. The model is linear in both and costs four running numbers and eight multiplications per bar, with no lookback window and no matrix in the per-bar update.

Author: Muhammad Minhas Qamar