| sym.hd_fit {StockDistFit} | R Documentation |
Fit a Symmetric Hyperbolic Distribution to a vector of return/stock prices.
Description
This function fits a Symmetric Hyperbolic distribution to a data vector using the
fit.hypuv function from the ghyp package. It returns the estimated parameters along with
the AIC and BIC values for the fitted distribution.
Usage
sym.hd_fit(vec)
Arguments
vec |
a numeric vector containing the symmetric data to be fitted. |
Value
a list containing the following elements:
- par
a numeric vector of length 4 containing the estimated values for the parameters of the fitted distribution: alpha (scale), mu (degrees of freedom), sigma (standard deviation), and gamma (skewness).
- aic
the Akaike information criterion (AIC) value for the fitted distribution.
- bic
the Bayesian information criterion (BIC) value for the fitted distribution.
See Also
norm_fit, t_fit, cauchy_fit, ghd_fit, hd_fit,
sym.ghd_fit, vg_fit, sym.vg_fit, nig_fit,
ged_fit, skew.t_fit, skew.normal_fit, skew.ged_fit
Examples
stock_prices <- c(10, 11, 12, 13, 14, 20, 21)
returns <- diff(log(stock_prices))
sym.hd_fit(returns)