R/compoundInterest.R

"compoundInterest" <-
function(interest, periods=1, 
                frequency=1, net.value=FALSE){
#
  cI <- exp(periods*frequency*
      log(1+interest/frequency))
  cI[frequency==Inf] <- exp(periods*interest)
#
  if(net.value)cI-(net.value)
  cI
}

Try the FinTS package in your browser

Any scripts or data that you put into this service are public.

FinTS documentation built on Jan. 27, 2024, 3:01 a.m.