R/FV_post_mood.R

Defines functions FV_post_mood

Documented in FV_post_mood

FV_post_mood=function(data,years=10){

  n=years
  m=n+2
  momenti=rep(NA,m)
  U=1+data
  u=mean(U)
  
  for (i in 1:m) momenti[i]=moment(U,
  central = FALSE, absolute = FALSE, order =i)
  
  final_value=((momenti[n]-1)/(u-1))-
    ((momenti[n+1]-u*momenti[n])/((u-1)^2))+
    ((momenti[n]-1)/((u-1)^3))*
    (momenti[2]-u^2)
  return(final_value)
}
fabriziomaturo/AnnuityRIR documentation built on May 28, 2019, 8:38 p.m.