@pond-ts/financial API Reference
    Preparing search index...

    Interface RollingRegression

    One bar's rolling ordinary-least-squares fit — the three arrays linearRegressionValues returns, row-aligned with its input.

    NaN marks a bar the fit does not cover ([PND-STUDYBOX]).

    interface RollingRegression {
        intercept: Float64Array;
        r2: Float64Array;
        slope: Float64Array;
    }
    Index

    Properties

    Properties

    intercept: Float64Array

    The fitted line at the window's first bar (x = 0) — TA-Lib's LINEARREG_INTERCEPT, not the value at the window's last bar.

    r2: Float64Array

    Coefficient of determination, 0 … 1 — the fraction of the window's variance the line explains. A flat window is NaN, not 0.

    slope: Float64Array

    Change in the fitted line per bar — the units are the column's own per bar, so it scales with the price and is not a percentage.