The L1 trend filtering - introduction.
The problem of estimating underlying trends in time series data arises in a variety of disciplines. The $L_1$ trend filtering method produces trend estimates $x$ that are piecewise linear from the time series $y$.
The $L_1$ trend estimation problem can be formulated as
$$ minimize \; (1/2) ||y-x||^2_2+\lambda||Dx||_1, $$
with variable $x$, problem data $y$ and parameter $\lambda$, with $\lambda\geq0$
where $D$ is the second difference matrix with rows $ [0 \quad \dots \quad 0 \quad -1 \quad 2 \quad -1 \quad 0 \quad \dots \quad 0] $
Example: L1 trend filtering for Bitcoin daily close.

The explanation are adopted from:
https://www.cvxpy.org/examples/applications/l1_trend_filter.html
Comments
Post a Comment