Stochastic volatility
In statistics, stochastic volatility models are those in which the variance of a stochastic process is itself randomly distributed. They are used in the field of mathematical finance to evaluate derivative securities, such as options. The name derives from the models' treatment of the underlying security's volatility as a random process, governed by state variables such as the price level of the underlying security, the tendency of volatility to revert to some long-run mean value, and the variance of the volatility process itself, among others. Stochastic volatility models are one approach to resolve a shortcoming of  the Black–Scholes model. In particular, models based on Black-Scholes assume that the underlying volatility is constant over the life of the derivative, and unaffected by the changes in the price level of the underlying security. However, these models cannot explain long-observed features of the implied volatility surface such as volatility smile and skew, which indicate that implied volatility does tend to vary with respect to strike price and expiry. By assuming that the volatility of the underlying price is a stochastic process rather than a constant, it becomes possible to model derivatives more accurately. Basic model . Starting from a constant volatility approach, assume that the derivative's underlying asset price follows a standard model for geometric Brownian motion: where formula_2 is the constant drift (i.e. expected return) of the security price formula_3, formula_4 is the constant volatility, and formula_5 is a standard Wiener process with zero mean and unit rate of variance. The explicit solution of this stochastic differential equation is The maximum likelihood estimator to estimate the constant volatility formula_4 for given stock prices formula_3 at different times formula_9 is its expected value is formula_11 This basic model with constant volatility formula_4 is the starting  point for non-stochastic volatility models such as Black–Scholes model and Cox–Ross–Rubinstein model. For a stochastic volatility model, replace the constant volatility formula_4 with a function formula_14, that models the variance of formula_3. This variance function is also modeled as Brownian motion, and the form of formula_14 depends on the particular SV model under study. where formula_19 and formula_20 are some functions of formula_21, and formula_22 is another standard gaussian that is correlated with formula_5 with constant correlation factor formula_24. Heston model. The popular Heston model is a commonly used SV model, in which the randomness of  the variance process varies as the square root of variance. In this case, the differential equation for variance takes the form: where formula_26 is the mean long-term variance, formula_27 is the rate at which the variance reverts toward its long-term mean, formula_28 is the volatility of the variance process, and formula_29 is, like formula_30, a gaussian with zero mean and formula_31 variance. However, formula_30 and formula_29 are correlated with the constant correlation value formula_34. In other words, the Heston SV model assumes that the variance is a random process that Some parametrisation of the volatility surface, such as  'SVI', are based on the Heston model. CEV model. The CEV model describes the relationship between volatility and price, introducing stochastic volatility: Conceptually, in some markets volatility rises when prices rise (e.g. commodities), so formula_39. In other markets, volatility tends to rise as prices fall, modelled with formula_40. Some argue that because the CEV model does not incorporate its own stochastic process for volatility, it is not truly a stochastic volatility model. Instead, they call it a local volatility model. SABR volatility model. The SABR model (Stochastic Alpha, Beta, Rho), introduced by Hagan et al. describes a single forward formula_41  (related to any asset e.g. an index, interest rate, bond, currency or equity) under stochastic volatility formula_42: The initial values formula_45 and formula_46 are the current forward price and volatility, whereas formula_47 and formula_48 are two correlated Wiener processes (i.e. Brownian motions) with correlation coefficient formula_49. The constant parameters formula_50 are such that formula_51. The main feature of the SABR model is to be able to reproduce the smile effect of the volatility smile. GARCH model. The Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model is another popular model for estimating stochastic volatility. It assumes that the randomness of the variance process  varies with the variance, as opposed to the square root of the variance as in the Heston model. The standard GARCH(1,1) model has the following form for the variance differential: The GARCH model has been extended via numerous variants, including the NGARCH, TGARCH, IGARCH, LGARCH, EGARCH, GJR-GARCH, etc. Strictly, however, the conditional volatilities from GARCH models are not stochastic since at time "t" the volatility is completely pre-determined (deterministic) given previous values. 3/2 model. The 3/2 model is similar to the Heston model, but assumes that the randomness of the variance process varies with formula_53. The form of  the variance differential is: However the meaning of the parameters is different from Heston model. In this model, both mean reverting and volatility of variance parameters are stochastic quantities given by formula_55 and formula_56 respectively. Calibration and estimation. Once a particular SV model is chosen, it must be calibrated against existing market data. Calibration is the process of identifying the set of model parameters that are most likely given the observed data. One popular technique is to use maximum likelihood estimation (MLE). For instance, in the Heston model, the set of model parameters formula_57 can be estimated applying an MLE  algorithm such as the Powell Directed Set method to observations of historic underlying security prices. In this case, you start with an estimate for formula_58, compute the residual errors when applying the historic price data to the resulting model, and then adjust formula_59 to try to minimize these errors. Once the calibration has been performed, it is standard practice to re-calibrate the model periodically. An alternative to calibration is statistical estimation, thereby accounting for parameter uncertainty. Many frequentist and Bayesian methods have been proposed and implemented, typically for a subset of the abovementioned models. The following list contains extension  packages for the open source statistical software R that have been specifically designed for heteroskedasticity estimation. The first three cater for GARCH-type models with deterministic volatilities; the fourth deals with stochastic volatility estimation. Many numerical methods have been developed over time and have solved pricing financial assets such as options with stochastic volatility models. A recent developed application is the local stochastic volatility model. This local stochastic volatility model gives better results in pricing new financial assets such as forex options. There are also alternate statistical estimation libraries in other languages such as Python: