sgfixedincome_pkg.equations
Functions
|
Calculate the dollar return from an investment based on its rate of return |
|
Calculate the equivalent annual rate of return (in percentage) based on |
Module Contents
- sgfixedincome_pkg.equations.calculate_dollar_return(investment, rate, tenure)[source]
Calculate the dollar return from an investment based on its rate of return and the tenure (in months).
- Parameters:
investment (float) – The initial amount invested in dollars.
rate (float) – The annual rate of return in percentage (%).
tenure (int) – The investment tenure in months.
- Returns:
The dollar return from the investment after the given tenure.
- Return type:
float
- Raises:
ValueError – If investment or rate is negative, or tenure is non-positive (zero or negative).
- sgfixedincome_pkg.equations.calculate_per_annum_rate(total_percentage_return, tenure)[source]
Calculate the equivalent annual rate of return (in percentage) based on a given total percentage return over a specific tenure (in months).
- Parameters:
total_percentage_return (float) – The total percentage return over the entire investment period.
tenure (int) – The tenure of the investment in months.
- Returns:
The annualized rate of return (in percentage).
- Return type:
float
- Raises:
ValueError – If tenure is not positive.