# \[ANN\] L1TrendFiltering.jl: Imprementation of l1 Trend Filtering

**URL:** <https://discourse.julialang.org/t/ann-l1trendfiltering-jl-imprementation-of-l1-trend-filtering/121811>\
**Category:** Package Announcements\
**Tags:** package, announcement, noise-reduction\
**Created:** [October 27, 2024, 4:52am UTC](https://discourse.julialang.org/t/ann-l1trendfiltering-jl-imprementation-of-l1-trend-filtering/121811 "2024-10-27T04:52:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmsmsgood](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rmsmsgood/32/20544_2.png) [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Post date:** [October 27, 2024, 4:52am UTC](https://discourse.julialang.org/t/ann-l1trendfiltering-jl-imprementation-of-l1-trend-filtering/121811/1 "2024-10-27T04:52:41Z")

</div>

## [L1TrendFiltering.jl](https://github.com/dsryu0822/L1TrendFiltering.jl)

In this week, I noticed there is no l1 trend filtering package in julia. I’m happy to share this package. You can test julia `l1tf` function as following:

```julia-auto
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")

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/c/4c3c67dde4f9dd1187a87cb9a02c22b49fecefe7.png)  
▲ original matlab version

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/2/d264e23512a6627e9bb31664927ebc7a4d463841.png)  
▲ L1TrendFiltering.jl

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [October 27, 2024, 4:26pm UTC](https://discourse.julialang.org/t/ann-l1trendfiltering-jl-imprementation-of-l1-trend-filtering/121811/2 "2024-10-27T16:26:38Z")

</div>

Does [this package](https://github.com/joaquimg/L1AdaptiveTrendFilter.jl) produce similar results?

---

<div class="post-metadata">

**Author:** ![zdenek\_hurak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zdenek_hurak/32/53118_2.png) [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Post date:** [October 27, 2024, 5:10pm UTC](https://discourse.julialang.org/t/ann-l1trendfiltering-jl-imprementation-of-l1-trend-filtering/121811/3 "2024-10-27T17:10:24Z")

</div>

It is hard to tell as the last update of the [L1AdaptiveTrendFilter.jl](https://github.com/joaquimg/L1AdaptiveTrendFilter.jl) package was in January 2017, that is, at the time the version of Julia was 0.5.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [October 27, 2024, 6:13pm UTC](https://discourse.julialang.org/t/ann-l1trendfiltering-jl-imprementation-of-l1-trend-filtering/121811/4 "2024-10-27T18:13:10Z")

</div>

> [@zdenek\_hurak](#):
>
> It is hard to tell

Is it supposed to be hard to run old Julia code?
