Gilgamath


Code

R packages

Quantitative Finance

  • The SharpeR package supports statistical inference on the Sharpe ratio: computing confidence intervals on the Sharpe, as well as the 'maximal Sharpe' of the Markowitz portfolio, estimating power, and so on.

  • The MarkowitzR package supports statistical inference on the elements of the Markowitz portfolio, including the linear conditional expectation case.

Probability Distributions

  • The PDQutils package allows one to approximately compute the distribution, density, and quantile functions (the so-called 'p, d and q' functions in R) of probability distributions when only the moments or cumulants are known.

  • The sadists package is a showcase for the PDQutils package. It provides density, distribution, quantile, and random generation for several classes of probability distributions.

Other

  • The madness package accumulates derivatives of multivariate-valued functions of multivariate input by forward differentiation. The primary use case for this is in the delta method: one can write code in R to transform simple means into more elaborate estimates, while madness computes the derivatives automatically.

  • The fromo package provides fast numerically robust computation of moments and cumulants. Both summarization and rolling computations are supported. Mostly this package was an exercise in learning Rcpp.

  • The BWStest package provides the unpaired two-sample test of the hypothesis of equal probability distributions, as described by Baumgartner Weiss and Schindler. The test is reasonably powerful in comparison to the classical tests (Kolmogorov-Smirnov, Wilcoxon, and Cramer-Von Mises). Another fun exercise in Rcpp.