The L1 trend filtering - introduction. The problem of estimating underlying trends in time series data arises in a variety of disciplines. The $L_1$ trend filtering method produces trend estimates $x$ that are piecewise linear from the time series $y$. The $L_1$ trend estimation problem can be formulated as $$ minimize \; (1/2) ||y-x||^2_2+\lambda||Dx||_1, $$ with variable $x$, problem data $y$ and parameter $\lambda$, with $\lambda\geq0$ where $D$ is the second difference matrix with rows $ [0 \quad \dots \quad 0 \quad -1 \quad 2 \quad -1 \quad 0 \quad \dots \quad 0] $ Example: L1 trend filtering for Bitcoin daily close. The explanation are adopted from: https://www.cvxpy.org/examples/applications/l1_trend_filter.html
Posts
Showing posts from February, 2023
- Get link
- X
- Other Apps
How to Pick Good Stocks. There is a way to find a good stocks for your investments portfolio that uses stock price history for evaluation of the portfolio expected return and volatility. It's called the portfolio optimization. There is a lot of ways to optimize the stock portfolio, see for example the references. I will describe the process of optimizing your portfolio by maximizing its Sharpe ratio with the help of the Asset-Master website for portfolio optimization and it can be used for free. The Sharpe ratio can be though of as a measure of return to a risk, or as the measure of the portfolio "effectiveness". If you don't interested in underlying math, you can skip to the Steps section. $Sharpe\;Ratio = \frac{R_p - R_f}{\sigma_p}$ where $R_p$ is the expected excess return of portfolio $R_f$ is a risk - free rate $\sigma_p$ is the standard deviation of the portfolio return Return of the portfolio for holding period can be ...