l1_tf: Software for l1 Trend Filtering

Version Beta (May 2008)
Kwangmoo Koh, Seung-Jean Kim, and Stephen Boyd

Purpose

l1_tf is an implementation of the interior-point method for ell_1 trend filtering (also called trend estimation) described in the paper l1 Trend Filtering. l1_tf solves an optimization problem of the form

 (1/2)|x-y|_2^2+lambda|Dx|_1,

where the variable is xinmathbf{R}^{n}, and the problem data are yinmathbf{R}^{n} and lambdainmathbf{R}_{+}^{n}. Here, D in mathbf{R}^{(n-2) times n} is the second-order difference matrix

tiny D = left[ begin{array}{rrrrrrrr} 1 &  -2 & 1   & 1 & -2  &  1   & & ddots & ddots & ddots   & & & 1 &  -2 & 1  & & & & 1 & -2 & 1 end{array}  right].

The figure below shows the l1 trend filtering result for (the log of) the S&P 500 index for the period March 25, 1999 to March 9, 2007, with lambda=50.

S&P500

Feedback

Please report any bugs to Kwangmoo Koh <deneb1@stanford.edu>, Seung-Jean Kim <sjkim@stanford.edu> or Stephen Boyd <boyd@stanford.edu>.

Download

l1_tf is distributed under the terms of the GNU General Public License 2.0.

l1_tf is implemented in both Matlab and C.

Boyd’s research group page.