probability_class

In this module, the Python DensityProbability class is defined. This class allows to the user configure the Black-Scholes probability density function (log-normal) by providing typical financial parameters The DensityProbability class uses functions from finance.classical_finance module.

Authors: Alberto Pedro Manzano Herrero & Gonzalo Ferro

class QQuantLib.finance.probability_class.DensityProbability(probability_type: str, **kwargs)

Class for selecting pay off functions algorithm

Parameters:
  • probability_type (string) – type of probability density function to load

  • kwargs (dictionary) – Dictionary for configuring the asset and the probability used for simulating its behaviour.Implemented keys:

  • s_0 (kwargs, float) – initial value of the asset

  • risk_free_rate (kwargs, float) – risk free ratio

  • maturity (kwargs, float) – time where the probability wants to be calculated.

  • volatiliy (kwargs, float) – volatility of the asset.

static get_density(probability_type, **kwargs)

Create the probability function

Parameters:
  • probability_type (string) – type of probability density function to load

  • kwargs (dictionary) – with necessary information for configuring the probability density

  • s_0 (kwargs, float) – initial value of the asset

  • risk_free_rate (kwargs, float) – risk free ratio

  • maturity (kwargs, float) – time where the probability wants to be calculated

  • volatiliy (kwargs, float) – volatility of the asset

static get_density_prob(probability_type, **kwargs)

Configures a probability density

Parameters:
  • probability_type (string) – type of probability density function to load

  • kwargs (dictionary) – with necessary information for configuring the probability density.

  • s_0 (kwargs, float) – initial value of the asset

  • risk_free_rate (kwargs, float) – risk free ratio

  • maturity (kwargs, float) – time where the probability wants to be calculated

  • volatiliy (kwargs, float) – volatility of the asset