Composite price-level statistics: private API
PortfolioOptimisers.trend_reverting_fraction — Function
trend_reverting_fraction(P::AbstractMatrix) -> Any
Returns the trend-reverting fraction of a matrix of levels, the share of the interior levels, over every asset, at which the path turns.
A level turns when its two neighbours are both above it or both below it, so the path rises and then falls there, or falls and then rises. A matrix of $L$ levels and $N$ assets has $(L - 2) N$ interior levels. The fraction is zero below three levels. KernelTrendPattern states it as $\lambda_{t+1}$, after Equation (27) of [101].
Arguments
P: The levels,levels × assets.
Returns
lambda::Real: The fraction, in[0, 1], in the element type of the levels or a wider one.
Related
References
- [101] Z.-R. Lai, P.-Y. Yang, X. Wu and L. Fang. A kernel-based trend pattern tracking system for portfolio optimization. Data Mining and Knowledge Discovery 32, 1708–1734 (2018). Equation (27).
References
- [101]
- Z.-R. Lai, P.-Y. Yang, X. Wu and L. Fang. A kernel-based trend pattern tracking system for portfolio optimization. Data Mining and Knowledge Discovery 32, 1708–1734 (2018).