A julia implementation for l1 trend filtering. It's just a translation of original matlab code, but something minor has been changed and readability is improved.
- This package includes a dataset
snp500as a vector. - The function
l1tfreturns the resultL1tfobject.L1tfhas two properties:-
x:Vector{T}, output of$l_{1}$ trend filtering. -
solved:Bool, if the solution is converged, thentrue.
-
In this package, l1tf allows changing other parameters, for instance, linesearch parameters
using L1TrendFiltering
using Plots, CSV, DataFrames
y = snp500
result = l1tf(y, 50, verbose = true)
x = result.x
plot(ylabel = "log(price)")
plot!(y, label = "S&P500")
plot!(x, label = "l1tf")