lib/finance/time_value.rb
def future_value(rate,periods,present_value,compound_frequency = 1)
      compound_frequency = resolve_compound_frequency!(compound_frequency)
      if compound_frequency == :continuous
        return continuous_compound_fv(rate,periods,present_value)
      end
      future_value = present_value * (1+rate/compound_frequency)** (periods * compound_frequency)
    end
##
# determine the future value of an investment of
# present_value with given interest rate over time
# *periods - number of periods (years) that the interest is cumulated
# *rate - the annual rate of return
# *present_value - the value at the start of the period
# *compound_frequency - number of compounds / period(year)
#
determine the future value of an investment of
present_value with given interest rate over time
periods - number of periods (years) that the interest is cumulated
rate - the annual rate of return
present_value - the value at the start of the period
compound_frequency - number of compounds / period(year)
determine the future value of an investment of present_value with given interest rate over time periods - number of periods ( years ) that the interest is cumulated rate - the annual rate of return present_value - the value at the start of the period compound_frequency - number of compounds / period ( year )
def future_value(rate,periods,present_value,compound_frequency = 1)
      compound_frequency = resolve_compound_frequency!(compound_frequency)
      if compound_frequency == :continuous
        return continuous_compound_fv(rate,periods,present_value)
      end
      future_value = present_value * (1+rate/compound_frequency)** (periods * compound_frequency)
    end
def future_value ( rate , periods , present_value , compound_frequency = 1 ) compound_frequency = resolve_compound_frequency! ( compound_frequency ) if compound_frequency == :continuous return continuous_compound_fv ( rate , periods , present_value ) end future_value = present_value * ( 1 + rate / compound_frequency ) ** ( periods * compound_frequency ) end
determine the future value of an investment of
present_value with given interest rate over time
periods - number of periods (years) that the interest is cumulated
rate - the annual rate of return
present_value - the value at the start of the period
compound_frequency - number of compounds / period(year)
determine the future value of an investment of present_value with given interest rate over time periods - number of periods ( years ) that the interest is cumulated rate - the annual rate of return present_value - the value at the start of the period compound_frequency - number of compounds / period ( year )
rate
periods
present_value
compound_frequency