Learn R Programming

Dowd (version 0.12)

Functions Ported from 'MMR2' Toolbox Offered in Kevin Dowd's Book Measuring Market Risk

Description

'Kevin Dowd's' book Measuring Market Risk is a widely read book in the area of risk measurement by students and practitioners alike. As he claims, 'MATLAB' indeed might have been the most suitable language when he originally wrote the functions, but, with growing popularity of R it is not entirely valid. As 'Dowd's' code was not intended to be error free and were mainly for reference, some functions in this package have inherited those errors. An attempt will be made in future releases to identify and correct them. 'Dowd's' original code can be downloaded from www.kevindowd.org/measuring-market-risk/. It should be noted that 'Dowd' offers both 'MMR2' and 'MMR1' toolboxes. Only 'MMR2' was ported to R. 'MMR2' is more recent version of 'MMR1' toolbox and they both have mostly similar function. The toolbox mainly contains different parametric and non parametric methods for measurement of market risk as well as backtesting risk measurement methods.

Copy Link

Version

Install

install.packages('Dowd')

Monthly Downloads

309

Version

0.12

License

GPL

Maintainer

Dinesh Acharya

Last Published

March 10th, 2016

Functions in Dowd (0.12)

ADTestStat

Plots cumulative density for AD test and computes confidence interval for AD test stat.
BootstrapESFigure

Plots figure of bootstrapped ES
KSTestStat

Plots cumulative density for KS test and computes confidence interval for KS test stat.
AmericanPutVaRBinomial

Estimates VaR of American vanilla put using binomial tree.
DefaultRiskyBondVaR

VaR for default risky bond portfolio
ChristoffersenBacktestForUnconditionalCoverage

Christoffersen Backtest for Unconditional Coverage
BoxCoxVaR

Estimates VaR with Box-Cox transformation
LogtESPlot3D

Plots log-t ES against confidence level and holding period
GumbelESPlot2DCl

Gumbel VaR
CdfOfSumUsingGaussianCopula

Derives prob ( X + Y < quantile) using Gaussian copula
BlancoIhleBacktest

Blanco-Ihle forecast evaluation backtest measure
DBPensionVaR

Monte Carlo VaR for DB pension
AmericanPutESBinomial

Estimates ES of American vanilla put using binomial tree.
AdjustedNormalESHotspots

Hotspots for ES adjusted by Cornish-Fisher correction
FrechetES

Frechet Expected Shortfall
HSVaR

Value at Risk of a portfolio using Historical Estimator
BootstrapES

Bootstrapped ES for specified confidence level
FilterStrategyLogNormalVaR

Log Normal VaR with filter strategy
CornishFisherES

Corn-Fisher ES
FrechetVaR

Frechet Value at Risk
GParetoVaR

VaR for Generalized Pareto
FrechetVaRPlot2DCl

Plots Frechet Value at Risk against Cl
BootstrapESConfInterval

Bootstrapped ES Confidence Interval
AdjustedVarianceCovarianceVaR

Cornish-Fisher adjusted variance-covariance VaR
DCPensionVaR

Monte Carlo VaR for DC pension
GumbelVaRPlot2DCl

Gumbel VaR
AmericanPutPriceBinomial

Binomial Put Price
HSVaRPlot2DCl

Plots historical simulation VaR against confidence level
HillPlot

Hill Plot
BootstrapVaRConfInterval

Bootstrapped VaR Confidence Interval
JarqueBeraBacktest

Jarque-Bera backtest for normality.
HSES

Expected Shortfall of a portfolio using Historical Estimator
NormalESPlot2DCL

Plots normal ES against confidence level
BlackScholesCallESSim

ES of Black-Scholes call using Monte Carlo Simulation
GParetoES

Expected Shortfall for Generalized Pareto
NormalES

ES for normally distributed P/L
BlackScholesPutESSim

ES of Black-Scholes put using Monte Carlo Simulation
ShortBlackScholesCallVaR

Derives VaR of a short Black Scholes call option
Dowd-package

R-version of Kevin Dowd's MATLAB Toolbox from book "Measuring Market Risk".
BootstrapVaRFigure

Plots figure of bootstrapped VaR
HSESDFPerc

Percentile of historical simulation ES distribution function
LogNormalES

ES for normally distributed geometric returns
NormalVaRConfidenceInterval

Generates Monte Carlo 95% Confidence Intervals for normal VaR
HSESPlot2DCl

Plots historical simulation ES against confidence level
LogNormalESDFPerc

Percentiles of ES distribution function for normally distributed geometric returns
KernelESBoxKernel

Calculates ES using box kernel approach
CornishFisherVaR

Corn-Fisher VaR
LogtVaRDFPerc

Percentiles of VaR distribution function for Student-t
LogtESDFPerc

Percentiles of ES distribution function for Student-t
GParetoMultipleMEFPlot

Plot of Emperical and 2 Generalised Pareto mean excess functions
HSVaRDFPerc

Percentile of historical simulation VaR distribution function
GParetoMEFPlot

Plot of Emperical and Generalised Pareto mean excess functions
TQQPlot

Student's T Quantile - Quantile Plot
PickandsEstimator

Pickands Estimator
AdjustedNormalVaRHotspots

Hotspots for VaR adjusted by Cornish-Fisher correction
CdfOfSumUsingGumbelCopula

Derives prob ( X + Y < quantile) using Gumbel copula
KuiperTestStat

Plots cummulative density for Kuiper test and computes confidence interval for Kuiper test stat.
LogtES

ES for t distributed geometric returns
LogtESPlot2DCL

Plots log-t ES against confidence level
KernelVaREpanechinikovKernel

Calculates VaR using epanechinikov kernel approach
NormalVaRPlot3D

Plots normal VaR in 3D against confidence level and holding period
HillQuantileEstimator

Hill Quantile Estimator
KernelVaRBoxKernel

Calculates VaR using box kernel approach
KernelESNormalKernel

Calculates ES using normal kernel approach
LogNormalVaRPlot3D

Plots log normal VaR against confidence level and holding period
LogNormalVaRPlot2DCL

Plots log normal VaR against confidence level
KernelVaRNormalKernel

Calculates VaR using normal kernel approach
LogNormalVaRETLPlot2DCL

Plots log normal VaR and ETL against confidence level
FrechetESPlot2DCl

Plots Frechet Expected Shortfall against confidence level
tESFigure

Figure of t - VaR and ES and pdf against L/P
PCAPrelim

Estimates VaR plot using principal components analysis
GaussianCopulaVaR

Bivariate Gaussian Copule VaR
LopezBacktest

First (binomial) Lopez forecast evaluation backtest score measure
NormalESPlot2DHP

Plots normal ES against holding period
LogtVaRPlot2DCL

Plots log-t VaR against confidence level
KernelVaRTriangleKernel

Calculates VaR using triangle kernel approach
tESDFPerc

Percentiles of ES distribution function for t-distributed P/L
BootstrapVaR

Bootstrapped VaR for specified confidence level
CdfOfSumUsingProductCopula

Derives prob ( X + Y < quantile) using Product copula
GumbelCopulaVaR

Bivariate Gumbel Copule VaR
LogNormalESPlot2DCL

Plots log normal ES against confidence level
NormalVaR

VaR for normally distributed P/L
HSVaRESPlot2DCl

Plots historical simulation VaR and ES against confidence level
InsuranceVaR

VaR of Insurance Portfolio
AmericanPutESSim

Estimates ES of American vanilla put using binomial option valuation tree and Monte Carlo Simulation
BlackScholesCallPrice

Price of European Call Option
BlackScholesPutPrice

Price of European Put Option
HSESFigure

Figure of Historical SImulation VaR and ES and histogram of L/P
NormalVaRPlot2DHP

Plots normal VaR against holding period
ProductCopulaVaR

Bivariate Product Copule VaR
BoxCoxES

Estimates ES with Box-Cox transformation
BinomialBacktest

Carries out the binomial backtest for a VaR risk measurement model.
NormalSpectralRiskMeasure

Estimates the spectral risk measure of a portfolio
AdjustedVarianceCovarianceES

Cornish-Fisher adjusted Variance-Covariance ES
NormalESDFPerc

Percentiles of ES distribution function for normally distributed P/L data
KernelESTriangleKernel

Calculates ES using triangle kernel approach
ChristoffersenBacktestForIndependence

Christoffersen Backtest for Independence
tVaRFigure

Figure of t- VaR and pdf against L/P
LogNormalVaRFigure

Figure of lognormal VaR and pdf against L/P
VarianceCovarianceES

Variance-covariance ES for normally distributed returns
NormalESHotspots

Hotspots for normal ES
tQuantileStandardError

Standard error of t quantile estimate
GumbelVaR

Gumbel VaR
LogNormalESPlot3D

Plots log normal ES against confidence level and holding period
LogtVaR

VaR for t distributed geometric returns
GumbelES

Gumbel ES
tVaRPlot2DHP

Plots t VaR against holding period
HSVaRFigure

Figure of Historical SImulation VaR and histogram of L/P
tVaRPlot2DCL

Plots t VaR against confidence level
LogNormalESFigure

Figure of lognormal VaR and ES and pdf against L/P
LogNormalVaRPlot2DHP

Plots log normal VaR against holding period
LongBlackScholesCallVaR

Derives VaR of a long Black Scholes call option
tVaR

VaR for t distributed P/L
LogtESPlot2DHP

Plots log-t ES against holding period
InsuranceVaRES

VaR and ES of Insurance Portfolio
LogNormalESPlot2DHP

Plots log normal ES against holding period
tESPlot2DCL

Plots t- ES against confidence level
NormalQuantileStandardError

Standard error of normal quantile estimate
NormalESFigure

Figure of normal VaR and ES and pdf against L/P
PCAVaR

Estimates VaR by principal components analysis
LogtVaRPlot3D

Plots log-t VaR against confidence level and holding period
NormalVaRFigure

Figure of normal VaR and pdf against L/P
NormalESPlot3D

Plots normal ES against confidence level and holding period
PCAVaRPlot

VaR plot
LongBlackScholesPutVaR

Derives VaR of a long Black Scholes put option
NormalVaRDFPerc

Percentiles of VaR distribution function for normally distributed P/L
PickandsPlot

Pickand Estimator - Tail Sample Size Plot
tESPlot3D

Plots t ES against confidence level and holding period
PCAESPlot

ES plot
tESPlot2DHP

Plots t ES against holding period
tVaRPlot3D

Plots t VaR against confidence level and holding period
PCAES

Estimates ES by principal components analysis
tVaRESPlot2DCL

Plots t VaR and ES against confidence level
NormalVaRHotspots

Hotspots for normal VaR
ShortBlackScholesPutVaR

Derives VaR of a short Black Scholes put option
tES

ES for t distributed P/L
LogNormalVaRDFPerc

Percentiles of VaR distribution function for normally distributed geometric returns
NormalESConfidenceInterval

Generates Monte Carlo 95% Confidence Intervals for normal ES
LogtVaRPlot2DHP

Plots log-t VaR against holding period
StopLossLogNormalVaR

Log Normal VaR with stop loss limit
NormalQQPlot

Normal Quantile Quantile Plot
tVaRDFPerc

Percentiles of VaR distribution function
HillEstimator

Hill Estimator
KernelESEpanechinikovKernel

Calculates ES using Epanechinikov kernel approach
LogNormalVaR

VaR for normally distributed geometric returns
MEFPlot

Mean Excess Function Plot
NormalVaRPlot2DCL

Plots normal VaR against confidence level
VarianceCovarianceVaR

Variance-covariance VaR for normally distributed returns