sgfixedincome_pkg.equations =========================== .. py:module:: sgfixedincome_pkg.equations Functions --------- .. autoapisummary:: sgfixedincome_pkg.equations.calculate_dollar_return sgfixedincome_pkg.equations.calculate_per_annum_rate Module Contents --------------- .. py:function:: calculate_dollar_return(investment, rate, tenure) Calculate the dollar return from an investment based on its rate of return and the tenure (in months). :param investment: The initial amount invested in dollars. :type investment: float :param rate: The annual rate of return in percentage (%). :type rate: float :param tenure: The investment tenure in months. :type tenure: int :returns: The dollar return from the investment after the given tenure. :rtype: float :raises ValueError: If investment or rate is negative, or tenure is non-positive (zero or negative). .. py:function:: calculate_per_annum_rate(total_percentage_return, tenure) Calculate the equivalent annual rate of return (in percentage) based on a given total percentage return over a specific tenure (in months). :param total_percentage_return: The total percentage return over the entire investment period. :type total_percentage_return: float :param tenure: The tenure of the investment in months. :type tenure: int :returns: The annualized rate of return (in percentage). :rtype: float :raises ValueError: If tenure is not positive.