-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Special Cases of AlphaStable #19
Comments
I resolved part of the issue at this link. using Distributions, AlphaStableDistributions;
μ=3.0;σ=4.0;
#
#==#Normal(μ,σ) == AlphaStable(α=2.0, β=β, scale=σ/√2≈2.83, location=μ)
d_train = rand(Normal(μ,σ), 100_000);
D̂=fit(AlphaStable, d_train);
isapprox.((D̂.α,D̂.β,D̂.scale,D̂.location),(2.0,0.0,σ/√2,μ), atol=.25) # All true, except β=0
#
#==#Cauchy(μ,σ) == AlphaStable(α=1.0, β=0.0, scale=σ, location=μ)
d_train = rand(Cauchy(μ,σ), 100_000);
D̂=fit(AlphaStable, d_train);
isapprox.((D̂.α,D̂.β,D̂.scale,D̂.location),(1.0,0.0,σ,μ), atol=.25) # All true
#
#==#Levy(μ,σ) == AlphaStable(α=1/2, β=1.0, scale=σ, location=μ)
d_train = rand(Levy(μ,σ), 100_000);
D̂=fit(AlphaStable, d_train);
isapprox.((D̂.α,D̂.β,D̂.scale,D̂.location),(0.5,1.0,σ,μ), atol=.25)
AlphaStable{Float64}(α=0.58, β=0.0, scale=16.55, location=15.15) # only α approx correct
# α=0.58, β=0.0, scale=16.55, location=15.15 Looks like part of the issue is it currently fits symmetric (β=0.0) alpha stable distributions. Thus you have I wonder if this explains why the location & scale parameters are off for the Levy distribution? |
You're right. The current implementation fits Symmetric Alpha Stable Distributions. The location and scale parameter estimations are based on Fama & Roll (1971) method which is restricted to the symmetrical case β=0, and α values in the range of |
@ymtoo it might make sense to have 2 distributions exported, one for the symmetric case, and one for the asymmetric case? The symmetric version will provide better estimates for parameters where symmetry can be inferred from the problem at hand. |
@mchitre great idea. |
@ymtoo works great now except for Levy(), which I guess is bc its α=.5, but currently the package needs α>.6. |
@azev77 thanks for the feedback! We'll definitely consider the more general case if we come across any efficient methods. |
What about Koutrouvelis (1980,1981)? Koutrouvelis (1980) |
Thanks for the references. Will take a look when I've some free time. In the meantime, PRs are always welcome! |
According to Wiki:
For α = 2 the distribution reduces to a Gaussian distribution with variance σ2 = 2c2 and mean μ; the skewness parameter β has no effect.
For α = 1 and β = 0 the distribution reduces to a Cauchy distribution with scale parameter c and shift parameter μ.
For α = 1/2 and β = 1 the distribution reduces to a Lévy distribution with scale parameter c and shift parameter μ.
I get:
There are some discrepancies. Not sure if this is due to a different parametrization or something else.
The text was updated successfully, but these errors were encountered: