Dowd0.12 package

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

AdjustedNormalESHotspots

Hotspots for ES adjusted by Cornish-Fisher correction

AdjustedNormalVaRHotspots

Hotspots for VaR adjusted by Cornish-Fisher correction

AdjustedVarianceCovarianceES

Cornish-Fisher adjusted Variance-Covariance ES

AdjustedVarianceCovarianceVaR

Cornish-Fisher adjusted variance-covariance VaR

ADTestStat

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

AmericanPutESBinomial

Estimates ES of American vanilla put using binomial tree.

AmericanPutESSim

Estimates ES of American vanilla put using binomial option valuation t...

AmericanPutPriceBinomial

Binomial Put Price

AmericanPutVaRBinomial

Estimates VaR of American vanilla put using binomial tree.

BinomialBacktest

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

BlackScholesCallESSim

ES of Black-Scholes call using Monte Carlo Simulation

BlackScholesCallPrice

Price of European Call Option

BlackScholesPutESSim

ES of Black-Scholes put using Monte Carlo Simulation

BlackScholesPutPrice

Price of European Put Option

BlancoIhleBacktest

Blanco-Ihle forecast evaluation backtest measure

BootstrapES

Bootstrapped ES for specified confidence level

BootstrapESConfInterval

Bootstrapped ES Confidence Interval

BootstrapESFigure

Plots figure of bootstrapped ES

BootstrapVaR

Bootstrapped VaR for specified confidence level

BootstrapVaRConfInterval

Bootstrapped VaR Confidence Interval

BootstrapVaRFigure

Plots figure of bootstrapped VaR

BoxCoxES

Estimates ES with Box-Cox transformation

BoxCoxVaR

Estimates VaR with Box-Cox transformation

CdfOfSumUsingGaussianCopula

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

CdfOfSumUsingGumbelCopula

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

CdfOfSumUsingProductCopula

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

ChristoffersenBacktestForIndependence

Christoffersen Backtest for Independence

ChristoffersenBacktestForUnconditionalCoverage

Christoffersen Backtest for Unconditional Coverage

CornishFisherES

Corn-Fisher ES

CornishFisherVaR

Corn-Fisher VaR

DBPensionVaR

Monte Carlo VaR for DB pension

DCPensionVaR

Monte Carlo VaR for DC pension

DefaultRiskyBondVaR

VaR for default risky bond portfolio

Dowd-package

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

FilterStrategyLogNormalVaR

Log Normal VaR with filter strategy

FrechetES

Frechet Expected Shortfall

FrechetESPlot2DCl

Plots Frechet Expected Shortfall against confidence level

FrechetVaR

Frechet Value at Risk

FrechetVaRPlot2DCl

Plots Frechet Value at Risk against Cl

GaussianCopulaVaR

Bivariate Gaussian Copule VaR

GParetoES

Expected Shortfall for Generalized Pareto

GParetoMEFPlot

Plot of Emperical and Generalised Pareto mean excess functions

GParetoMultipleMEFPlot

Plot of Emperical and 2 Generalised Pareto mean excess functions

GParetoVaR

VaR for Generalized Pareto

GumbelCopulaVaR

Bivariate Gumbel Copule VaR

GumbelES

Gumbel ES

GumbelESPlot2DCl

Gumbel VaR

GumbelVaR

Gumbel VaR

GumbelVaRPlot2DCl

Gumbel VaR

HillEstimator

Hill Estimator

HillPlot

Hill Plot

HillQuantileEstimator

Hill Quantile Estimator

HSES

Expected Shortfall of a portfolio using Historical Estimator

HSESDFPerc

Percentile of historical simulation ES distribution function

HSESFigure

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

HSESPlot2DCl

Plots historical simulation ES against confidence level

HSVaR

Value at Risk of a portfolio using Historical Estimator

HSVaRDFPerc

Percentile of historical simulation VaR distribution function

HSVaRESPlot2DCl

Plots historical simulation VaR and ES against confidence level

HSVaRFigure

Figure of Historical SImulation VaR and histogram of L/P

HSVaRPlot2DCl

Plots historical simulation VaR against confidence level

InsuranceVaR

VaR of Insurance Portfolio

InsuranceVaRES

VaR and ES of Insurance Portfolio

JarqueBeraBacktest

Jarque-Bera backtest for normality.

KernelESBoxKernel

Calculates ES using box kernel approach

KernelESEpanechinikovKernel

Calculates ES using Epanechinikov kernel approach

KernelESNormalKernel

Calculates ES using normal kernel approach

KernelESTriangleKernel

Calculates ES using triangle kernel approach

KernelVaRBoxKernel

Calculates VaR using box kernel approach

KernelVaREpanechinikovKernel

Calculates VaR using epanechinikov kernel approach

KernelVaRNormalKernel

Calculates VaR using normal kernel approach

KernelVaRTriangleKernel

Calculates VaR using triangle kernel approach

KSTestStat

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

KuiperTestStat

Plots cummulative density for Kuiper test and computes confidence inte...

LogNormalES

ES for normally distributed geometric returns

LogNormalESDFPerc

Percentiles of ES distribution function for normally distributed geome...

LogNormalESFigure

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

LogNormalESPlot2DCL

Plots log normal ES against confidence level

LogNormalESPlot2DHP

Plots log normal ES against holding period

LogNormalESPlot3D

Plots log normal ES against confidence level and holding period

LogNormalVaR

VaR for normally distributed geometric returns

LogNormalVaRDFPerc

Percentiles of VaR distribution function for normally distributed geom...

LogNormalVaRETLPlot2DCL

Plots log normal VaR and ETL against confidence level

LogNormalVaRFigure

Figure of lognormal VaR and pdf against L/P

LogNormalVaRPlot2DCL

Plots log normal VaR against confidence level

LogNormalVaRPlot2DHP

Plots log normal VaR against holding period

LogNormalVaRPlot3D

Plots log normal VaR against confidence level and holding period

LogtES

ES for t distributed geometric returns

LogtESDFPerc

Percentiles of ES distribution function for Student-t

LogtESPlot2DCL

Plots log-t ES against confidence level

LogtESPlot2DHP

Plots log-t ES against holding period

LogtESPlot3D

Plots log-t ES against confidence level and holding period

LogtVaR

VaR for t distributed geometric returns

LogtVaRDFPerc

Percentiles of VaR distribution function for Student-t

LogtVaRPlot2DCL

Plots log-t VaR against confidence level

LogtVaRPlot2DHP

Plots log-t VaR against holding period

LogtVaRPlot3D

Plots log-t VaR against confidence level and holding period

LongBlackScholesCallVaR

Derives VaR of a long Black Scholes call option

LongBlackScholesPutVaR

Derives VaR of a long Black Scholes put option

LopezBacktest

First (binomial) Lopez forecast evaluation backtest score measure

MEFPlot

Mean Excess Function Plot

NormalES

ES for normally distributed P/L

NormalESConfidenceInterval

Generates Monte Carlo 95% Confidence Intervals for normal ES

NormalESDFPerc

Percentiles of ES distribution function for normally distributed P/L d...

NormalESFigure

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

NormalESHotspots

Hotspots for normal ES

NormalESPlot2DCL

Plots normal ES against confidence level

NormalESPlot2DHP

Plots normal ES against holding period

NormalESPlot3D

Plots normal ES against confidence level and holding period

NormalQQPlot

Normal Quantile Quantile Plot

NormalQuantileStandardError

Standard error of normal quantile estimate

NormalSpectralRiskMeasure

Estimates the spectral risk measure of a portfolio

NormalVaR

VaR for normally distributed P/L

NormalVaRConfidenceInterval

Generates Monte Carlo 95% Confidence Intervals for normal VaR

NormalVaRDFPerc

Percentiles of VaR distribution function for normally distributed P/L

NormalVaRFigure

Figure of normal VaR and pdf against L/P

NormalVaRHotspots

Hotspots for normal VaR

NormalVaRPlot2DCL

Plots normal VaR against confidence level

NormalVaRPlot2DHP

Plots normal VaR against holding period

NormalVaRPlot3D

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

PCAES

Estimates ES by principal components analysis

PCAESPlot

ES plot

PCAPrelim

Estimates VaR plot using principal components analysis

PCAVaR

Estimates VaR by principal components analysis

PCAVaRPlot

VaR plot

PickandsEstimator

Pickands Estimator

PickandsPlot

Pickand Estimator - Tail Sample Size Plot

ProductCopulaVaR

Bivariate Product Copule VaR

ShortBlackScholesCallVaR

Derives VaR of a short Black Scholes call option

ShortBlackScholesPutVaR

Derives VaR of a short Black Scholes put option

StopLossLogNormalVaR

Log Normal VaR with stop loss limit

tES

ES for t distributed P/L

tESDFPerc

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

tESFigure

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

tESPlot2DCL

Plots t- ES against confidence level

tESPlot2DHP

Plots t ES against holding period

tESPlot3D

Plots t ES against confidence level and holding period

TQQPlot

Student's T Quantile - Quantile Plot

tQuantileStandardError

Standard error of t quantile estimate

tVaR

VaR for t distributed P/L

tVaRDFPerc

Percentiles of VaR distribution function

tVaRESPlot2DCL

Plots t VaR and ES against confidence level

tVaRFigure

Figure of t- VaR and pdf against L/P

tVaRPlot2DCL

Plots t VaR against confidence level

tVaRPlot2DHP

Plots t VaR against holding period

tVaRPlot3D

Plots t VaR against confidence level and holding period

VarianceCovarianceES

Variance-covariance ES for normally distributed returns

VarianceCovarianceVaR

Variance-covariance VaR for normally distributed returns

'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.

  • Maintainer: Dinesh Acharya
  • License: GPL
  • Last published: 2016-03-11