From e8f3664765880a9d9ba039746715f2d4db46d5cf Mon Sep 17 00:00:00 2001 From: Guangyuan Yang Date: Wed, 7 Dec 2022 00:08:01 -0500 Subject: [PATCH] math/R-cran-cvar: New port Compute Expected Shortfall and Value at Risk for Continuous Distributions --- math/Makefile | 1 + math/R-cran-cvar/Makefile | 20 ++++++++++++++++++++ math/R-cran-cvar/distinfo | 3 +++ math/R-cran-cvar/pkg-descr | 7 +++++++ 4 files changed, 31 insertions(+) create mode 100644 math/R-cran-cvar/Makefile create mode 100644 math/R-cran-cvar/distinfo create mode 100644 math/R-cran-cvar/pkg-descr diff --git a/math/Makefile b/math/Makefile index 954c1edbc1cc..3a143ba3bffa 100644 --- a/math/Makefile +++ b/math/Makefile @@ -49,6 +49,7 @@ SUBDIR += R-cran-combinat SUBDIR += R-cran-conf.design SUBDIR += R-cran-conquer + SUBDIR += R-cran-cvar SUBDIR += R-cran-date SUBDIR += R-cran-ddalpha SUBDIR += R-cran-deldir diff --git a/math/R-cran-cvar/Makefile b/math/R-cran-cvar/Makefile new file mode 100644 index 000000000000..d7cb9f3880e9 --- /dev/null +++ b/math/R-cran-cvar/Makefile @@ -0,0 +1,20 @@ +PORTNAME= cvar +DISTVERSION= 0.5 +CATEGORIES= math +DISTNAME= ${PORTNAME}_${DISTVERSION} + +MAINTAINER= ygy@FreeBSD.org +COMMENT= Compute Expected Shortfall and Value at Risk for Continuous Distributions +WWW= https://geobosh.github.io/cvar/ + +LICENSE= GPLv2+ + +RUN_DEPENDS= R-cran-Rdpack>=0.8:devel/R-cran-Rdpack \ + R-cran-gbutils>0:math/R-cran-gbutils +TEST_DEPENDS= R-cran-testthat>0:devel/R-cran-testthat \ + R-cran-PerformanceAnalytics>0:finance/R-cran-PerformanceAnalytics \ + R-cran-fGarch>0:finance/R-cran-fGarch + +USES= cran:auto-plist + +.include diff --git a/math/R-cran-cvar/distinfo b/math/R-cran-cvar/distinfo new file mode 100644 index 000000000000..f8ef13f5b0fc --- /dev/null +++ b/math/R-cran-cvar/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1670370144 +SHA256 (cvar_0.5.tar.gz) = 7e721a68a321acbc74149d6ae9c6e3b0c1f896df9fa7786b8b40264e1db2db18 +SIZE (cvar_0.5.tar.gz) = 255174 diff --git a/math/R-cran-cvar/pkg-descr b/math/R-cran-cvar/pkg-descr new file mode 100644 index 000000000000..ca1bec8d7a68 --- /dev/null +++ b/math/R-cran-cvar/pkg-descr @@ -0,0 +1,7 @@ +Compute expected shortfall (ES) and Value at Risk (VaR) from a quantile +function, distribution function, random number generator or probability density +function. ES is also known as Conditional Value at Risk (CVaR). Virtually any +continuous distribution can be specified. The functions are vectorized over the +arguments. The computations are done directly from the definitions, see e.g. +Acerbi and Tasche (2002) . Some support for GARCH +models is provided, as well.