| skew.ged_fit {StockDistFit} | R Documentation |
Fit Skewed Generalized Error Distribution to a vector of returns/stock prices.
Description
This function fits the Skewed Generalized Error Distribution to a given data vector using the skew.ged_fit function from
the fGarch package. It returns the estimated parameters along with the AIC and BIC values for the fitted
distribution.
Usage
skew.ged_fit(vec)
Arguments
vec |
A numeric vector of data. |
Value
A list with the following elements:
- params
A numeric vector of length 4 containing the fitted SGED parameters: shape, scale, location, and skewness.
- aic
The Akaike Information Criterion (AIC) for the fitted model.
- bic
The Bayesian Information Criterion (BIC) for the fitted model.
See Also
norm_fit, t_fit, cauchy_fit, ghd_fit, hd_fit,
sym.ghd_fit, sym.hd_fit, vg_fit, sym.vg_fit,
nig_fit, ged_fit, skew.t_fit,
skew.normal_fit
Examples
stock_prices <- c(10, 11, 12, 13, 14, 17, 18)
returns <- diff(log(stock_prices))
skew.ged_fit(returns)
[Package StockDistFit version 1.0.0 Index]