finpricing.utils.tools#

Module Contents#

Classes#

ClassUtil

Functions#

dict_to_obj_str(→ str)

Return the string representation of a dictionary

prettyTableByColumn(→ str)

Return the string representation of a dictionary in a pretty table format where

prettyTableByRow(→ str)

Return the string representation of a dictionary in a pretty table format

datetimeToDates(func)

finpricing.utils.tools.dict_to_obj_str(d: dict) str[source]#

Return the string representation of a dictionary

finpricing.utils.tools.prettyTableByColumn(d: dict, align='') str[source]#

Return the string representation of a dictionary in a pretty table format where dictionary values can be either iterables for direct use or tuples where the first element is an iterable and the second is a format string.

Args: d (dict): Dictionary with data to be displayed by the table. align (str): String with column alignments. Use ‘l’ for left, ‘r’ for right, and ‘c’ for center.

Returns: str: A string representation of the table.

finpricing.utils.tools.prettyTableByRow(d: dict) str[source]#

Return the string representation of a dictionary in a pretty table format

The dictionary contains the row names as keys and the list of values as values.

finpricing.utils.tools.datetimeToDates(func)[source]#
class finpricing.utils.tools.ClassUtil[source]#
save_attributes(ignore=[])[source]#
resolve_dates(start_date, maturity_date_or_tenor)[source]#
first_valid(*args)[source]#