Skip to main content

Python Functions for Vasicek Distribution

Project description

Introduction

In the context of statistics, the Vasicek distribution is a continuous distribution governing the open interval between 0 and 1 with two parameters, namely Rho and P, which is similar to the Beta and Kumaraswamy distributions.

The Vasicek distribution has often been used to describe the portfolio credit loss in the development of Economic Capital models. The py_vsk package is a collection of miscellaneous python functions related to the Vasicek distribution with the intent to make the lives of risk modelers easier.

Core Functions

py_vsk
  |-- vsk_mle()   : Estimates Vasicek parameters by using MLE.
  |-- vsk_imm()   : Estimates Vasicek parameters by using indirect moment matching.
  |-- vsk_dmm()   : Estimates Vasicek parameters by using direct moment matching.
  |-- vsk_qbe()   : Estimates Vasicek parameters by using quantile-based estimator.
  |-- vsk_Rho()   : Estimates the Rho parameter by assuming P known and varying.
  |-- vsk_pdf()   : Calculates the probability density function of Vasicek.
  |-- vsk_cdf()   : Calculates the probability cumulative function of Vasicek.
  |-- vsk_ppf()   : Calculates the percentile point function (CDF inverse) of Vasicek.
  |-- vsk_rvs()   : Generates random numbers following the Vasicek distribution.
  |-- get_Rho()   : Solves for the Rho parameter such that vsk_cdf(x, Rho, P) = Alpha.
  |-- gof_ks()    : Performs the Kolmogorov-Smirnov GoF test for the Vasicek distribution.
  `-- gof_chisq() : Performs the Chi-Square GoF test for the Vasicek distribution.

Reference

Tasche, Dirk. (2008). The Vasicek Distribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_vsk-0.0.8.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

py_vsk-0.0.8-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page