In volatility targeting annualised rolling volatility is estimated using a lookback window or an exponentially weighted moving average . The recursive EWMA formula for variance is: σt2=(1α)σt12+αrt2\sigma_t^2 = (1 - \alpha) \sigma_{t-1}^2 + \alpha r_t^2 where α=21+N\alpha = \frac{2}{1+N} , and NN is the equivalent lookback window length. The non-recursive form, using λ=1α\lambda = 1 - \alpha , the variance is: σt2=(1λ)i=0λirti2\sigma_t^2 = (1 - \lambda) \sum_{i=0}^\infty \lambda^i r_{t-i}^2 The target annualized volatility is divided by the current volatility estimate to obtain a position multiplier, which scales position sizes to keep volatility nearer the target. This works due to the autoregressive nature of volatility. My question regards the choice of NN . Choosing an NN that is too large means that you may not react to sudden changes in market conditions. Letting NN be too small means that normal deviations in market condtions can cause you to over/underleverage yourself in the following periods. I’ve encountered a technique called "Volatility Switching" to address this. It involves calculating EWMA volatility with both a short and a long half-life. Described in the article written by man group: https://www.man.com/insights/volatility-is-back-better-to-target-returns-or-target-risk The half-life hh is the number of periods where the weight of past observations decays to half, defined by: λh=12\lambda^h = \frac{1}{2} so λ=(12)1/h\lambda = \left(\frac{1}{2}\right)^{1/h} . Thus, α=1λ=1(12)1/h\alpha = 1 - \lambda = 1 - \left(\frac{1}{2}\right)^{1/h} . The short half-life EWMA is used for position sizing only when it diverges significantly from the long half-life EWMA. Mathematically, the chosen volatility is: σi,tchosen=βσi,tshort half-life+(1β)σi,tlong half-life\sigma_{i,t}^{\text{chosen}} = \beta \cdot \sigma_{i,t}^{\text{short half-life}} + (1 - \beta) \cdot \sigma_{i,t}^{\text{long half-life}} where β=1\beta = 1 if the divergence exceeds a threshold, and β=0\beta = 0 otherwise. Once again we encounter the issue of an arbitrary choice of this threshold, a poorly chosen non robust definition of this threshold could cause inappropriate position sizes to be used. To counteract this , I am considering a dynamic approach where β\beta varies continuously on [0,1][0, 1] based on the degree of divergence between the short and long half-life EWMA values. How can I define a function for β\beta that maps the divergence between short and long half-life EWMA volatilities to a value \in [0,1][0, 1] ?