This does an example from Kim, Koh, Boyd, Gorinevsky(2009), "L1 Filtering", SIAM Review, vol 51, pp 339-360. The L1 filter is a piecewise linear filter similar to the H-P filter. An exact solution for the problem requires a specialized set of optimization software, but it can be very closely approximated with "off-the-shelf" iterated Kalman smoothing as is done here.
One problem (as noted in the comments) with the L1 filter as described in the paper is that the tuning parameter lambda is scale-dependent because one of the terms in the optimand is squared and one is absolute value (unlike the H-P filter, where both are squared). This is set to use a tuning parameter which is scale-independent.
L1 Filtering
Use this forum for posting example programs or short bits of sample code.
Return to “Examples and Sample Code”
Jump to
- News and Announcements
- ↳ Forum Announcements
- ↳ RATS Product Announcements
- ↳ Newsletters
- Courses and Seminars
- ↳ Course Announcements
- ↳ ARCH GARCH and Volatility
- ↳ RATS Programming Manual
- Procedures, Examples, and Sample Code
- ↳ RATS Procedures
- ↳ Examples and Sample Code
- ↳ Looking for Code?
- General RATS Discussions
- ↳ Data: Reading, Writing, Transforming
- ↳ Graphics, Reports, and Other Output
- ↳ Help With Programming
- ↳ Other RATS Usage Questions
- ↳ RATS for Teachers & Students
- ↳ Tips and Tricks
- ↳ Suggestion Box
- Econometrics Issues
- ↳ VARs (Vector Autoregression Models)
- ↳ ARCH and GARCH Models
- ↳ State Space Models/DSGE
- ↳ Structural Breaks and Switching Models
- ↳ Panel Data
- ↳ Other Time Series Analysis
- ↳ General Econometrics
- CATS (Cointegration Analysis)
- ↳ CATS News and Announcements
- ↳ CATS Questions