sigmaquant.performance.risk.tail_ratio#
- sigmaquant.performance.risk.tail_ratio(returns)#
Compute the tail ratio.
The tail ratio measures the asymmetry between the right tail and the left tail of the return distribution. It is defined as the ratio between the magnitude of an upper quantile and a lower quantile of returns.
- Parameters:
returns (array-like) –
Input sequence of returns or PnL values. The interpretation of the input depends on the
kindparameter.This is typically a one-dimensional array-like object such as a
numpy.ndarrayorpandas.Series.- Returns:
Tail ratio.
- Return type:
float
Notes
NaN values are ignored. If \(Q_{0.05} = 0\), the tail ratio is undefined.
The tail ratio is defined as:
\[\text{TailRatio} = \frac{ |Q_{0.95}| }{ |Q_{0.05}| }\]where \(Q_p\) denotes the empirical p-th quantile of the return distribution.
- Interpretation:
TailRatio > 1 indicates fatter right tails (more extreme gains).
TailRatio < 1 indicates fatter left tails (more extreme losses).
TailRatio ≈ 1 indicates symmetric tails.