StratCraft

OLS Slope Intercept N (OLS_SLOPE_INTERCEPTN)

QuantNexus indicator page for rolling regression slope and intercept.

Route: /quantnexus/indicators/ols-slope-interceptn/

What It Does

OLS_SLOPE_INTERCEPTN fits a rolling ordinary least squares line and exposes slope and intercept values.

Formula

y = slope * x + intercept

Parameters

  • period - default 10
  • prepend_constant - default True

C++23 API

#include <nonabt/indicators/ols_slope_interceptn.hpp>
auto ols = std::make_unique<nonabt::OLS_SLOPE_INTERCEPTN>(data().close(), 10, "True");

Common Usage

  • Use slope to gauge trend direction and steepness.
  • Use intercept as the rolling regression baseline.
  • Helpful for trend diagnostics and linear-fit analysis.