Links :
- Sharpe Ratio
- Returns & Volatility
- Risk by Return Ratio
- Compounded Percentage
- Annual Drawdown
- Skewness & Kurtosis
- Value Added Risk (VaR - Historic, Gaussian, Cornish-Fisher)
- CVaR - Historic
- VaR Comparison Plot
Important : Read the DOCUMENTATION.md file before implementing any of the functions.
Use the package manager pip to install riskybusiness
pip install riskybusiness
import riskybusiness as rb
rb.FunctionName(dataset = Your_Dataset)
Make sure the dataset is loaded using pandas with the necessary columns.
A sample program using all the functions is displayed in risky.ipynb
- Open using Jupyter NB or Google Colab
- This file contains the output samples of all the functions present in the library.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
rb.skewness(dataset)
Computes & returns the skewness of each column.
dataset - Name of the dataset you imported.
rb.kurtosis(dataset)
Computes & returns the kurtosis of each column.
dataset - Name of the dataset you imported.
rb.var_historic(dataset)
Computes & Returns the historic Value at Risk at a specified level i.e. returns the number such that "level" percent of the returns fall below that number, and the (100-level) percent are above.
dataset - Name of the dataset you imported.
rb.cvar_historic(dataset)
Computes & Returns the Conditional VaR of a Series or DataFrame.
dataset - Name of the dataset you imported.
rb.var_gaussian(dataset)
Computes & Returns the Parametric Gauusian VaR of a Series or DataFrame
dataset - Name of the dataset you imported.
rb.var_fisher(dataset)
The VaR is returned using the Cornish-Fisher modification
dataset - Name of the dataset you imported.
rb.plotvar(dataset)
Plots the comparison bar graph between the 3 VaR methods - Historic, Gaussian, Cornish-Fisher.
dataset - Name of the dataset you imported.