- The Weibull Distribution CDF transforms a min-max normalized price into the cumulative distribution function of the Weibull distribution, producing...
The Weibull Distribution CDF transforms a min-max normalized price into the cumulative distribution function of the Weibull distribution, producing an output in $[0, 1]$. The Weibull distribution is a flexible two-parameter family that subsumes the exponential distribution ($k = 1$) and approximates the normal distribution ($k \approx 3.6$) as special cases. Its closed-form CDF requires only `pow` and `exp`, making it the computationally cheapest distribution indicator after EXPDIST. The shape parameter $k$ controls the CDF curvature: $k < 1$ produces a concave curve (rapid initial rise), $k = 1$ gives the exponential, $k = 2$ produces the Rayleigh distribution, and $k > 3$ creates an S-shaped curve approaching Gaussian behavior.
## Historical Context
The Weibull distribution was formalized by Waloddi Weibull (1951) for modeling material fatigue and breaking strength, though the mathematical form appeared earlier in work by Rosin and Rammler (1933) on particle size distributions and Frechet (1927) on extreme value theory. It is one of three extreme value distributions (alongside Gumbel and Frechet), making it theoretically grounded for modeling maxima and minima of samples.
In engineering, the Weibull distribution dominates reliability analysis: the shape parameter $k$ (also called the Weibull modulus) characterizes the failure rate. $k < 1$ means decreasing failure rate (infant mortality), $k = 1$ means constant failure rate (random failures), and $k > 1$ means increasing failure rate (wear-out). This maps to financial interpretation: $k < 1$ emphasizes breakouts from the bottom of the range (rapid CDF rise for small normalized values), while $k > 1$ emphasizes breakouts near the top (CDF stays low until normalized value approaches the scale parameter).
The scale parameter $\lambda$ controls the characteristic life: the value at which the CDF equals $1 - e^{-1} \approx 0.632$. With default $\lambda = 0.5$, the CDF reaches 63.2% when the normalized price is at the midpoint of the recent range.
## Architecture and Physics
The computation follows a two-phase pipeline:
**Phase 1: Min-max normalization** scans `period` bars for extrema, maps the current source to $x \in [0, 1]$. Zero-range defaults to 0.5.
with a floor of $x = 0$ (negative values impossible after normalization). The computation requires one division, one `pow`, one negation, and one `exp`. No special functions, no iterations, no convergence checks.
**Shape parameter effects on the CDF curve:**
| $k$ | Character | Financial Interpretation |
|-----|-----------|------------------------|
| 0.5 | Steep concave | Highly sensitive to any move off the low |
| 1.0 | Exponential | Memoryless; equivalent to EXPDIST with $\lambda = 1/\text{scale}$ |
| 3.6 | Near-Gaussian | Approximate normal CDF shape |
| 5.0+ | Steep sigmoid | Insensitive until price nears the scale point, then jumps |
**Scale parameter effects**: $\lambda = 0.25$ compresses the transition zone toward low normalized values (CDF saturates quickly). $\lambda = 1.0$ spreads the transition across the entire $[0, 1]$ range (CDF is gentler). Default $\lambda = 0.5$ centers the characteristic value at the midpoint.
## Mathematical Foundation
The Weibull distribution with shape $k > 0$ and scale $\lambda > 0$ has PDF and CDF:
$$f(x; k, \lambda) = \frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1} \exp\!\left(-\left(\frac{x}{\lambda}\right)^k\right), \quad x \ge 0$$
O(1) closed-form evaluation. pow() via exp(k*log(x)) is the dominant cost (~30 cy). When k is an integer, integer pow() reduces to repeated multiply (~5 cy).
### Batch Mode (SIMD Analysis)
| Operation | Vectorizable? | Notes |
| :--- | :---: | :--- |
| log(x/lambda) | Partial | _mm256_log_pd with SVML |
| k * log result | Yes | Vector multiply with broadcast k |
| exp() | Partial | _mm256_exp_pd with SVML |
| 1 - exp | Yes | Vector subtract |
With SVML: nearly full vectorization. Without SVML: scalar loop but trivially parallelizable. Expected 3× batch speedup with SVML.