portfolioAnalytics.utils subpackage
portfolioAnalytics.utils contents
This module contains various helper classes and functions that do not fit into any of the main modules of the library
portfolioAnalytics.utils Submodules
portfolioAnalytics.utils.converters module
Converter utilities to help switch between various formats.
- portfolioAnalytics.utils.converters.datetime_to_float(dataframe)[source]
Datetime to float. f .. _Datetime_to_float:
Converts dates from string format to the canonical float format
- Parameters
dataframe – Pandas dataframe with dates in string format
- Returns
Pandas dataframe with dates in float format
- Return type
object
Note
The date string must be recognizable by the pandas to_datetime function.
portfolioAnalytics.utils.dataset_portfolio module
This module provides simple functionality for holding portfolio data for calculation purposes.
Portfolio implements a simple portfolio data container
- class portfolioAnalytics.utils.portfolio.Portfolio(psize=0, rating=[], exposure=[], factor=[])[source]
Bases:
object
The Portfolio object implements a simple portfolio data structure. See loan tape for more general structures.
portfolioAnalytics.utils.bivariatenormal module
Implementation of the bivariate normal function.
- portfolioAnalytics.utils.bivariatenormal.BivariateNormalDensity(a, b, rho)[source]
Bivariate Normal Density.