Taiwan Multifractal Spectrum: Turning One Scaling Exponent Into a Curve

The site already carries many measures of “how rough or how persistent a series is”, and they share one hidden premise: that a single scaling exponent describes the whole series. Mandelbrot–Fisher–Calvet (1997) and Kantelhardt et al. (2002) point out that financial series usually violate it — large and small fluctuation segments scale differently. Multifractal detrended fluctuation analysis generalises the second moment to arbitrary moment order q, so the single number becomes a curve h(q), and the familiar detrended fluctuation exponent turns out to be just one point on it. To be explicit: all four numbers here are descriptive. They report how scaling behaviour varies with moment order inside a window that already closed. None of them states a direction, and none says what happens next; a wide spectrum does not mean a less efficient market.

taiwan multifractal spectrum widthmf-dfa taiwan stockscaling exponent curve h(q) taiwan
▸ Try it free Plans & pricing

From a point to a curve: what the moment order actually changes

Detrended fluctuation analysis integrates the return series into a profile, cuts it into non-overlapping segments at scale s, removes a linear trend from each, takes the residual variance, and reads the log–log slope of that variance against scale. The decisive step is that taking the variance fixes the moment order at two: every segment is averaged in on equal terms, so the difference between large and small fluctuation segments is destroyed by the averaging itself.

MF-DFA changes exactly one thing: replace the mean variance with a mean q-th power, F_q(s) = ( mean_v [F²(v,s)]^{q/2} )^{1/q}, then take the slope of ln F_q(s) against ln s to obtain h(q). Positive q lets large-amplitude segments dominate, negative q lets small ones dominate. How much h(q) moves with q therefore becomes a measurement axis of its own: a monofractal series gives a flat line, a multifractal one a declining curve. The familiar detrended fluctuation exponent equals h(2) — one point, carrying no information about the shape.

Which geometric feature each of the four numbers describes

mfwid is the spectrum width h(q_min) − h(q_max), floored at zero: it measures multifractal strength. Zero means one scaling exponent suffices (a Gaussian random walk, say); larger means large and small fluctuation segments scale increasingly differently. mfasy is the spectrum asymmetry in [−1, 1], asking whether the curve bends first on the small-fluctuation side or the large-fluctuation side. It is orthogonal to width: two series can share a width and skew in opposite directions.

mfh4 simply reads h(+4), a persistence figure driven by large-amplitude segments alone, deliberately at a different moment order from the whole-window average h(2). It asks whether large moves tend to extend or to revert, with roughly 0.5 as the random-walk reference. mfnln converts the moments into the mass exponent τ(q) = q·h(q) − 1 and measures how far it departs from a straight line (1 − R²) in [0, 1]: a monofractal τ(q) is exactly linear, giving zero, and stronger curvature approaches one. That is a different dimension from width — a series whose endpoints differ widely while the middle stays straight scores a wide width and a near-zero nonlinearity.

The window, the scale set, and why we return None rather than fill

A multifractal measurement needs several scales, each with enough segments, so this family uses a longer window than most indicators on the site (one of the longest in the library), a fixed ladder of segment lengths, and a fixed set of moment orders spanning both signs. The window length and the scale set are returned with every value, because changing the scales changes the curve and two numbers computed under different settings are not comparable. Segmentation is forward-only, with no reverse pass, so the output never depends on where the remainder of the length-over-scale division happens to fall.

Degenerate cases always return None: we do not extrapolate, fill, or clamp — too few samples, a non-positive price, a constant stretch, a segment with zero residual at any scale (negative moment orders blow up on it), asymmetry when the width vanishes and the denominator disappears, or a degenerate mass-exponent fit. In particular we never clip a zero residual to some tiny constant to force a number out; that would produce a plausible-looking figure decided by the clamp rather than by the data. Standard library only, fixed loop counts, no random initialisation: same input, same output. Multiplying every price by a constant leaves the result unchanged (log returns), and scaling the returns themselves only shifts the log–log intercept, leaving the slope alone.

How to query the four fields, and what they must not be used for

Query with /v1/indicator/mfwid?stock_id=2330; the same family also answers to mfasy, mfh4 and mfnln. We do not add the four into any overall figure — a composite would collapse strength, skew and curvature into one number nobody can argue with, which is precisely what this site refuses to publish — and we set no thresholds and turn no crossing into an event.

No ranking, no screening, no recommendations, no forecasts, no price targets, no entry or exit timing. Sentences such as “a wide spectrum means the market is inefficient so there is an edge” or “high h(4) marks a strong stock” will never appear here, because a multifractal spectrum cannot support them: the width is a geometric property of a window that already happened, not a probability over the future, and certainly not a verdict on market efficiency. The right use is as a starting question: what regime does this window cover, how does the width move under a different scale ladder, and why does the skew sit on the small-fluctuation side? The answers live in the window you chose and in the raw series, not in the size of the number. It is a data tool, not stock picks, and not a trading signal.

Call the API directly (demo key demo-quant):

curl "https://8888fortune.com/v1/indicator/mfwid?stock_id=2330" -H "x-api-key: demo-quant"