Class FinancialMath

java.lang.Object
org.episteme.social.economics.FinancialMath

public class FinancialMath extends Object
Utility class for financial mathematics.

Includes Net Present Value (NPV), Future Value (FV), and Amortization

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • calculateFutureValue

      public static Money calculateFutureValue(Money presentValue, Real rate, int periods)
      Calculates the Future Value (FV) of an investment. FV = PV * (1 + r)^n
      Parameters:
      presentValue - The current value (PV).
      rate - The interest rate per period (r) as a decimal (e.g. 0.05 for 5%).
      periods - The number of periods (n).
      Returns:
      The future value.
    • calculateNPV

      public static Money calculateNPV(Real rate, Money... cashFlows)
      Calculates the Net Present Value (NPV) of a series of cash flows. NPV = Sum(CF_t / (1 + r)^t)
      Parameters:
      rate - The discount rate (r).
      cashFlows - The series of cash flows (Money objects).
      Returns:
      The Net Present Value.
    • calculateMonthlyPayment

      public static Money calculateMonthlyPayment(Money principal, Real annualRate, int years)
      Calculates monthly mortgage payment (Amortization). M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]
      Parameters:
      principal - The loan amount (P).
      annualRate - The annual interest rate.
      years - The loan term in years.
      Returns:
      The monthly payment.