Skip to content

Methods · Time series · Trend extraction and smoothing

L1 Trend Filtering

L1 trend filtering estimates the underlying trend of a series as a piecewise linear curve. It balances closeness to the data against an absolute-value penalty on the second differences of the trend, which forces most of those differences to be exactly zero, so the trend is made of straight segments joined at a small number of kinks. Unlike the Hodrick-Prescott filter, whose squared penalty gives a smooth curve, it locates abrupt changes in slope. The penalty can be chosen by an unbiased risk estimate or by BIC, and first-order (piecewise constant) and third-order (piecewise quadratic) versions are available.

L1 추세 필터링은 계열의 바탕 추세를 구간별 직선으로 추정합니다. 자료와의 근접도와 추세의 2계 차분 절댓값에 대한 벌점을 저울질하는데, 이 벌점 때문에 대부분의 2계 차분이 정확히 0이 되어 추세가 몇 개의 꺾임점으로 이어진 직선 조각들로 이루어집니다. 제곱 벌점을 써서 매끄러운 곡선을 주는 호드릭-프레스콧 필터와 달리 기울기의 급격한 변화를 찾아냅니다. 벌점 크기는 불편 위험 추정량이나 BIC로 고르며, 1차(구간별 상수)와 3차(구간별 이차식) 형태도 쓸 수 있습니다.

What is the underlying trend of this series, and where does its slope change?

이 계열의 바탕 추세는 무엇이며 기울기는 어디에서 바뀝니까?

The method returns the fitted trend, the number and position of kinks, the penalty value and how it was chosen, the effective degrees of freedom and the residual standard deviation.

When to use L1 Trend Filtering

When to use something else

Assumptions and requirements

What the analysis reports

How to report it

An l1 trend filter of order 2 (n = [value], lambda = [value], chosen by SURE) produced a piecewise linear trend with [value] knots.

Related methods

How this method is validated

이 방법의 검증 근거

  • Independent computation. 2 reference tests compare the results with NumPy and SciPy at a stated tolerance of 1e-4.

    독립 계산. NumPy·SciPy 대조 참조 시험 2건 통과(허용오차 1e-4).

Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.

허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.

Run L1 Trend Filtering on Quorant

Data you need
a table (CSV or Excel) with an outcome variable
Price
400 credits for one analysis up to 10,000 rows (complexity level 3); larger or wider data costs more. Optional methodologist review: 1800 credits.
Checking
Compared with independent computations
Before you pay
A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.

Method ID Q53133 · Reviewed 2026-10-25