Version: | 1.0-0 |
Date: | 2017-11-03 |
Title: | Annuity Random Interest Rates |
Depends: | R (≥ 3.2.5), mc2d |
Imports: | tseries, EnvStats, fitdistrplus, actuar, stats |
Suggests: | MASS |
Description: | Annuity Random Interest Rates proposes different techniques for the approximation of the present and final value of a unitary annuity-due or annuity-immediate considering interest rate as a random variable. Cruz Rambaud et al. (2017) <doi:10.1007/978-3-319-54819-7_16>. Cruz Rambaud et al. (2015) <doi:10.23755/rm.v28i1.25>. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
URL: | https://www.r-project.org |
BugReports: | https://github.com/fabriziomaturo/AnnuityRIR |
RoxygenNote: | 6.0.1 |
NeedsCompilation: | no |
Packaged: | 2017-11-03 20:42:50 UTC; fabma |
Author: | Salvador Cruz Rambaud [aut], Fabrizio Maturo [aut, cre], Ana Maria Sanchez Perez [aut] |
Maintainer: | Fabrizio Maturo <f.maturo@unich.it> |
Repository: | CRAN |
Date/Publication: | 2017-11-03 23:27:44 UTC |
Compute the final expected value of an n
-payment annuity, with payments of 1 unit each made at the end of every year (annuity-immediate), valued at the rate X
, using the tetraparametric function approach.
Description
Compute the final expected value of an n
-payment annuity, with payments of 1 unit each made at the end
of every year (annuity-immediate), valued at the rate X
, using the tetraparametric function approach.
Usage
FV_post_artan(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2017): Expected present and final value of an annuity when some non-central moments of the capitalization factor are unknown: Theory and an application using R. In Š. Hošková-Mayerová, et al. (Eds.), Mathematical-Statistical Models and Qualitative Theories for Economic and Social Sciences (pp. 233-248). Springer, Cham. doi:10.1007/978-3-319-54819-7_16.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
FV_post_artan(data,6)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
FV_post_artan(data,10)
Compute the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the end of every year (annuity-immediate), valued at the rate X
,
using the estimated moments of the beta distribution.
Description
Compute the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the end of every year (annuity-immediate), valued at the rate X
,
using the estimated moments of the beta distribution.
Usage
FV_post_beta_kmom(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2015): “Approach of the value of an annuity when non-central moments of the capitalization factor are known: an R application with interest rates following normal and beta distributions”. Ratio Mathematica, 28(1), pp. 15-30. doi: 10.23755/rm.v28i1.25.
Examples
# example 1
data=c(0.00,-0.05,-0.05,-0.06,-0.06,0.02,-0.06,-0.05,-0.04,-0.05,
-0.03,-0.06,0.04,-0.05,-0.08,-0.05,-0.12,-0.03,-0.05,-0.04,-0.06)
FV_post_beta_kmom(data,8)
# example 2
data<-rnorm(n=200,m=0.075,sd=0.2)
FV_post_beta_kmom(data,8)
Compute the final expected value of an
n
-payment annuity, with payments of 1 unit each made at the end
of every year (annuity-immediate), valued at
the rate X
, using the method of Mood et al.
Description
Compute the final expected value of an
n
-payment annuity, with payments of 1 unit each made at the end
of every year (annuity-immediate), valued at
the rate X
, using the method of Mood et al.
Usage
FV_post_mood(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2017): “Expected present and final value of an annuity when some non-central moments of the capitalization factor are unknown: Theory and an application using R”. In Š. Hošková-Mayerová, et al. (Eds.), Mathematical-Statistical Models and Qualitative Theories for Economic and Social Sciences (pp. 233-248). Springer, Cham. doi:10.1007/978-3-319-54819-7_16.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
FV_post_mood(data,6)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
FV_post_mood(data,10)
Compute the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the end of every year (annuity-immediate), valued at the rate X
,
using the estimated moments of the normal distribution.
Description
Compute the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the end of every year (annuity-immediate), valued at the rate X
,
using the estimated moments of the normal distribution.
Usage
FV_post_norm_kmom(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2015): “Approach of the value of an annuity when non-central moments of the capitalization factor are known: an R application with interest rates following normal and beta distributions”. Ratio Mathematica, 28(1), pp. 15-30. doi: 10.23755/rm.v28i1.25.
Examples
# example 1
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
FV_post_norm_kmom(data,8)
# example 1
data<-rnorm(n=200,m=0.075,sd=0.2)
norm_test_jb(data) #test data
FV_post_norm_kmom(data,8)
Compute the final expected value of an
n
-payment annuity, with payments of 1 unit each made at the end
of every year (annuity-immediate), valued at the rate X
,
using the quadratic discount method.
Description
Compute the final expected value of an
n
-payment annuity, with payments of 1 unit each made at the end
of every year (annuity-immediate), valued at the rate X
,
using the quadratic discount method.
Usage
FV_post_quad(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2017): “Expected present and final value of an annuity when some non-central moments of the capitalization factor are unknown: Theory and an application using R”. In Š. Hošková-Mayerová, et al. (Eds.), Mathematical-Statistical Models and Qualitative Theories for Economic and Social Sciences (pp. 233-248). Springer, Cham. doi:10.1007/978-3-319-54819-7_16.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
FV_post_quad(data,8)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
FV_post_quad(data,10)
Compute the final expected value of an
n-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using the tetraparametric function approach.
Description
Compute the final expected value of an
n-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using the tetraparametric function approach.
Usage
FV_pre_artan(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2017): “Expected present and final value of an annuity when some non-central moments of the capitalization factor are unknown: Theory and an application using R”. In Š. Hošková-Mayerová, et al. (Eds.), Mathematical-Statistical Models and Qualitative Theories for Economic and Social Sciences (pp. 233-248). Springer, Cham. doi:10.1007/978-3-319-54819-7_16.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
FV_pre_artan(data,6)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
FV_pre_artan(data,10)
Compute the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the beginning of every year (annuity-due), valued at the rate X
,
using the estimated moments of the beta distribution.
Description
Compute the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the beginning of every year (annuity-due), valued at the rate X
,
using the estimated moments of the beta distribution.
Usage
FV_pre_beta_kmom(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2015): “Approach of the value of an annuity when non-central moments of the capitalization factor are known: an R application with interest rates following normal and beta distributions”. Ratio Mathematica, 28(1), pp. 15-30. doi: 10.23755/rm.v28i1.25.
Examples
# example 1
data=c(0.00,-0.05,-0.05,-0.06,-0.06,0.02,-0.06,-0.05,-0.04,-0.05,
-0.03,-0.06,0.04,-0.05,-0.08,-0.05,-0.12, -0.03,-0.05,-0.04,-0.06)
FV_pre_beta_kmom(data,8)
# example 2
data<-rnorm(n=200,m=0.075,sd=0.2)
FV_pre_beta_kmom(data,8)
Compute the final expected value of an
n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using the method of Mood et al.
Description
Compute the final expected value of an
n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using the method of Mood et al.
Usage
FV_pre_mood(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2017): “Expected present and final value of an annuity when some non-central moments of the capitalization factor are unknown: Theory and an application using R”. In Š. Hošková-Mayerová, et al. (Eds.), Mathematical-Statistical Models and Qualitative Theories for Economic and Social Sciences (pp. 233-248). Springer, Cham. doi:10.1007/978-3-319-54819-7_16.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
FV_pre_mood(data,6)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
FV_pre_mood(data,10)
Compute the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the beginning of every year (annuity-due), valued at the rate X
,
using the estimated moments of the normal distribution.
Description
Compute the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the beginning of every year (annuity-due), valued at the rate X
,
using the estimated moments of the normal distribution.
Usage
FV_pre_norm_kmom(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2015): “Approach of the value of an annuity when non-central moments of the capitalization factor are known: an R application with interest rates following normal and beta distributions”. Ratio Mathematica, 28(1), pp. 15-30. doi: 10.23755/rm.v28i1.25.
Examples
# example 1
data<-rnorm(n=30,m=0.03,sd=0.01)
norm_test_jb(data) #test data
FV_pre_norm_kmom(data,8)
# example 1
data<-rnorm(n=200,m=0.075,sd=0.2)
norm_test_jb(data) #test data
FV_pre_norm_kmom(data,8)
Compute the final expected value of an
n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using the quadratic discount method.
Description
Compute the final expected value of an
n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using the quadratic discount method.
Usage
FV_pre_quad(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2017): “Expected present and final value of an annuity when some non-central moments of the capitalization factor are unknown: Theory and an application using R”. In Š. Hošková-Mayerová, et al. (Eds.), Mathematical-Statistical Models and Qualitative Theories for Economic and Social Sciences (pp. 233-248). Springer, Cham. doi:10.1007/978-3-319-54819-7_16.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
FV_pre_quad(data,6)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
FV_pre_quad(data,10)
Compute present expected value of an
n
-payment annuity, with payments of 1 unit each, made at the end
of every year (annuity-immediate), valued at the rate X
,
using the tetraparametric function approach.
Description
Compute present expected value of an
n
-payment annuity, with payments of 1 unit each, made at the end
of every year (annuity-immediate), valued at the rate X
,
using the tetraparametric function approach.
Usage
PV_post_artan(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2017): “Expected present and final value of an annuity when some non-central moments of the capitalization factor are unknown: Theory and an application using R”. In Š. Hošková-Mayerová, et al. (Eds.), Mathematical-Statistical Models and Qualitative Theories for Economic and Social Sciences (pp. 233-248). Springer, Cham. doi:10.1007/978-3-319-54819-7_16.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
PV_post_artan(data)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
PV_post_artan(data)
# example 3
data<-rnorm(n=30,m=0.03,sd=0.2)
PV_post_artan(data)
Compute the present expected value of
an n
-payment annuity, with payments of 1 unit each made at the
end of every year (annuity-due), valued at the rate X
,
using the cubic discount method.
Description
Compute the present expected value of
an n
-payment annuity, with payments of 1 unit each made at the
end of every year (annuity-due), valued at the rate X
,
using the cubic discount method.
Usage
PV_post_cubic(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
PV_post_cubic(data)
#example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
PV_post_cubic(data)
# example 3
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
PV_post_cubic(data)
Computes the present value of an annuity-immediate considering only non-central moments of negative orders.
Description
Computes the present value of an annuity-immediate considering only non-central moments of negative orders.
Usage
PV_post_exact(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data=c(0.0177, 0.0185, 0.0185, 0.0184, 0.0184, 0.0183, 0.0185, 0.0185, 0.0188, 0.0185,
0.0180, 0.0184, 0.0191, 0.0185, 0.0184, 0.0185, 0.0186, 0.0185, 0.0188, 0.0186)
PV_post_exact(data,10)
Compute the present expected value
of an n
-payment annuity, with payments of 1 unit each made at
the end of every year (annuity-immediate), valued at the rate X
,
with the method of Mood et al. using some negative moments of the distribution.
Description
Compute the present expected value
of an n
-payment annuity, with payments of 1 unit each made at
the end of every year (annuity-immediate), valued at the rate X
,
with the method of Mood et al. using some negative moments of the distribution.
Usage
PV_post_mood_nm(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Mood, A. M.; Graybill, F. A. and Boes, D. C. (1974). Introduction to the Theory of Statistics (3rd Ed.). New York: McGraw Hill.
Rice, J. A. (1995). Mathematical Statistics and Data Analysis (2nd Ed.). California: Ed. Duxbury Press.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
PV_post_mood_nm(data)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
PV_post_mood_nm(data)
# example 3
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
PV_post_mood_nm(data)
Compute the present expected value
of an n
-payment annuity, with payments of 1 unit each made at
the end of every year (annuity-immediate), valued at the rate X
,
with the method of Mood et al. using some positive moments of the distribution.
Description
Compute the present expected value
of an n
-payment annuity, with payments of 1 unit each made at
the end of every year (annuity-immediate), valued at the rate X
,
with the method of Mood et al. using some positive moments of the distribution.
Usage
PV_post_mood_pm(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Mood, A. M.; Graybill, F. A. and Boes, D. C. (1974). Introduction to the Theory of Statistics (3rd Ed.). New York: McGraw Hill.
Rice, J. A. (1995). Mathematical Statistics and Data Analysis (2nd Ed.). California: Ed. Duxbury Press.
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2017): “Expected present and final value of an annuity when some non-central moments of the capitalization factor are unknown: Theory and an application using R”. In Š. Hošková-Mayerová, et al. (Eds.), Mathematical-Statistical Models and Qualitative Theories for Economic and Social Sciences (pp. 233-248). Springer, Cham. doi:10.1007/978-3-319-54819-7_16.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
PV_post_mood_pm(data)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
PV_post_mood_pm(data)
# example 3
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
PV_post_mood_pm(data)
Compute the present value of an
annuity-immediate considering only non-central moments of negative
orders. The calculation is performed by using the function
triangular\_moments\_3 for the
moments greater than -2
(in absolute value).
Description
Compute the present value of an
annuity-immediate considering only non-central moments of negative
orders. The calculation is performed by using the function
triangular\_moments\_3 for the
moments greater than -2
(in absolute value).
Usage
PV_post_triang_3(data,years)
Arguments
data |
A vector of interest rates expressed as percentages. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
data=c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
PV_pre_triang_3(data,10)
Compute the present value of an
annuity-immediate considering only non-central moments of negative
orders. The calculation is performed by using the moments of the
fitted triangular distribution of the random variable
"capitalization factor" U
(which are obtained from the
definition of negative moment of
a continuous random variable).
Description
Compute the present value of an
annuity-immediate considering only non-central moments of negative
orders. The calculation is performed by using the moments of the
fitted triangular distribution of the random variable
"capitalization factor" U
(which are obtained from the
definition of negative moment of
a continuous random variable).
Usage
PV_post_triang_dis(data,years)
Arguments
data |
A vector of interest rates expressed as percentages. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
data=c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
PV_post_triang_dis(data,10)
Compute the present expected value of
an n
-payment annuity, with payments of 1 unit each, made at the
beginning of every year (annuity-due), valued at the rate X
,
using the tetraparametric function approach.
Description
Compute the present expected value of
an n
-payment annuity, with payments of 1 unit each, made at the
beginning of every year (annuity-due), valued at the rate X
,
using the tetraparametric function approach.
Usage
PV_pre_artan(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2017): “Expected present and final value of an annuity when some non-central moments of the capitalization factor are unknown: Theory and an application using R”. In Š. Hošková-Mayerová, et al. (Eds.), Mathematical-Statistical Models and Qualitative Theories for Economic and Social Sciences (pp. 233-248). Springer, Cham. doi:10.1007/978-3-319-54819-7_16.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,0.128,
0.079,0.059,0.042,-0.008,-0.012,-0.002)
PV_pre_artan(data)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
PV_pre_artan(data)
Compute the present expected value of
an n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using the cubic discount method.
Description
Compute the present expected value of
an n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using the cubic discount method.
Usage
PV_pre_cubic(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
PV_pre_cubic(data)
#example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
PV_pre_cubic(data)
# example 3
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
PV_pre_cubic(data)
Compute the present value of an annuity-due considering only non-central moments of negative orders.
Description
Compute the present value of an annuity-due considering only non-central moments of negative orders.
Usage
PV_pre_exact(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data=c(0.0177, 0.0185, 0.0185, 0.0184, 0.0184, 0.0183, 0.0185, 0.0185, 0.0188,
0.0185, 0.0180, 0.0184, 0.0191, 0.0185, 0.0184, 0.0185, 0.0186, 0.0185, 0.0188, 0.0186)
PV_pre_exact(data,10)
Compute the present expected value of
an n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
with the method of Mood et al. using some negative moments of the distribution.
Description
Compute the present expected value of
an n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
with the method of Mood et al. using some negative moments of the distribution.
Usage
PV_pre_mood_nm(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
PV_pre_mood_nm(data)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
PV_pre_mood_nm(data)
# example 3
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,
1.84,1.85,1.86,1.85,1.88,1.86)
data=data/100
PV_pre_mood_nm(data)
Compute the present expected value of
an n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
with the method of Mood et al. using some positive moments of the distribution.
Description
Compute the present expected value of
an n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
with the method of Mood et al. using some positive moments of the distribution.
Usage
PV_pre_mood_pm(data,years)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2017): “Expected present and final value of an annuity when some non-central moments of the capitalization factor are unknown: Theory and an application using R”. In Š. Hošková-Mayerová, et al. (Eds.), Mathematical-Statistical Models and Qualitative Theories for Economic and Social Sciences (pp. 233-248). Springer, Cham. doi:10.1007/978-3-319-54819-7_16.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,0.154,
0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
PV_pre_mood_pm(data)
# example 2
data<-rnorm(n=30,m=0.3,sd=0.01)
PV_pre_mood_pm(data)
# example 3
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
PV_pre_mood_pm(data)
Compute the present value of an
annuity-due considering only non-central moments of negative
orders. The calculation is performed by using the function
$triangular\_moments\_3$ for
the moments greater than -2
(in absolute value).
Description
Compute the present value of an
annuity-due considering only non-central moments of negative
orders. The calculation is performed by using the function
$triangular\_moments\_3$ for
the moments greater than -2
(in absolute value).
Usage
PV_pre_triang_3(data,years)
Arguments
data |
A vector of interest rates expressed as percentages. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
data=c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
PV_pre_triang_3(data,10)
Compute the present value of an
annuity-due considering only non-central moments of negative
orders. The calculation is performed by using the moments of the
fitted triangular distribution of the random variable
"capitalization factor" U
(which are obtained from the
definition of negative moment of
a continuous random variable)
Description
Compute the present value of an
annuity-due considering only non-central moments of negative
orders. The calculation is performed by using the moments of the
fitted triangular distribution of the random variable
"capitalization factor" U
(which are obtained from the
definition of negative moment of
a continuous random variable)
Usage
PV_pre_triang_dis(data,years)
Arguments
data |
A vector of interest rates expressed as percentages. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
data=c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
PV_pre_triang_dis(data,10)
Compute the parameters of the beta distribution and plot normalized data.
Description
Compute the parameters of the beta distribution and plot normalized data.
Usage
beta_parameters(data)
Arguments
data |
A vector of interest rates. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2015): "Approach of the value of an annuity when non-central moments of the capitalization factor are known: an R application with interest rates following normal and beta distributions". Ratio Mathematica, 28(1), pp. 15-30. doi: 10.23755/rm.v28i1.25.
Examples
# example 1
data=c(0.00,-0.05,-0.05,-0.06,-0.06,0.02,-0.06,-0.05,-0.04,-0.05,
-0.03,-0.06,0.04,-0.05,-0.08,-0.05,-0.12,-0.03,-0.05,-0.04,-0.06)
beta_parameters(data)
# example 2
data<-rnorm(n=200,m=0.075,sd=0.2)
beta_parameters(data)
Compute the exact moments of a distribution.
Description
Compute the exact moments of a distribution.
Usage
moment(x,order,central, absolute, na.rm)
Arguments
x |
A vector X of interest rates. |
order |
The order of moment that should be computed. Default is 1. |
central |
If central moments are to be computed. Default is "FALSE". |
absolute |
If absolute moments are to be computed. Default is "FALSE". |
na.rm |
If missing values should be removed. Default is "FALSE". |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2015): “Approach of the value of an annuity when non-central moments of the capitalization factor are known: an R application with interest rates following normal and beta distributions”. Ratio Mathematica, 28(1), pp. 15-30. doi: 10.23755/rm.v28i1.25.
Examples
#example 1
data=c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
moment(data,3)
Fit the data to a normal curve and compute the moments of the normal distribution according to the definition (as integral).
Description
Fit the data to a normal curve and compute the moments of the normal distribution according to the definition (as integral).
Usage
norm_mom(data,order)
Arguments
data |
A vector X of interest rates. |
order |
The order of moment that should be computed. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2015): “Approach of the value of an annuity when non-central moments of the capitalization factor are known: an R application with interest rates following normal and beta distributions”. Ratio Mathematica, 28(1), pp. 15-30. doi: 10.23755/rm.v28i1.25.
Examples
#example 1
data=c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
norm_mom(data,5)
Compute the Jarque-Bera test for checking the assumption of normality of the interest rates distribution and returns the parameters of the fitted normal distribution.
Description
Compute the Jarque-Bera test for checking the assumption of normality of the interest rates distribution and returns the parameters of the fitted normal distribution.
Usage
norm_test_jb(data)
Arguments
data |
A vector of interest rates. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Source
Cruz Rambaud, S.; Maturo, F. and Sánchez Pérez A. M. (2015): “Approach of the value of an annuity when non-central moments of the capitalization factor are known: an R application with interest rates following normal and beta distributions”. Ratio Mathematica, 28(1), pp. 15-30. doi: 10.23755/rm.v28i1.25.
Examples
#example 1
data=c(0.298,0.255,0.212,0.180,0.165,0.163,0.167,0.161,
0.154,0.128,0.079,0.059,0.042,-0.008,-0.012,-0.002)
norm_test_jb(data)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.01)
norm_test_jb(data)
# example 3
data=runif(999, min = 0, max = 1)
norm_test_jb(data)
# example 4
data=c(0.00,-0.05,-0.05,-0.06,-0.06,0.02,-0.06,-0.05,-0.04,-0.05,
-0.03,-0.06,0.04,-0.05,-0.08,-0.05,-0.12,-0.03,-0.05,-0.04,-0.06)
norm_test_jb(data)
Plot the final expected
value of an n
-payment annuity, with payments of 1 unit each made
at the end of every year (annuity-immediate), valued at the rate
X
,
using the estimated moments of the beta distribution.
Description
Plot the final expected
value of an n
-payment annuity, with payments of 1 unit each made
at the end of every year (annuity-immediate), valued at the rate
X
,
using the estimated moments of the beta distribution.
Usage
plot_FV_post_beta_kmom(data,years,lwd,lty)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
lwd |
The width of the curve. Default is 1.5. |
lty |
The style of the curve. Default is 1. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data<-runif(34, 0,1)
plot_FV_post_beta_kmom(data,8)
Plot the final expected
value of an n
-payment annuity, with payments of 1 unit each made
at the end of every year (annuity-immediate), valued at the rate
X
,
using the estimated moments of the normal distribution.
Description
Plot the final expected
value of an n
-payment annuity, with payments of 1 unit each made
at the end of every year (annuity-immediate), valued at the rate
X
,
using the estimated moments of the normal distribution.
Usage
plot_FV_post_norm_kmom(data,years,lwd,lty)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
lwd |
The width of the curve. Default is 1.5. |
lty |
The style of the curve. Default is 1. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data<-rnorm(n=30,m=0.03,sd=0.01)
plot_FV_post_norm_kmom(data,8)
# example 2
data<-rnorm(n=200,m=0.075,sd=0.2)
plot_FV_post_norm_kmom(data,8)
Plot the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the beginning of every year (annuity-due), valued at the rate X
,
using the estimated moments of the beta distribution.
Description
Plot the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the beginning of every year (annuity-due), valued at the rate X
,
using the estimated moments of the beta distribution.
Usage
plot_FV_pre_beta_kmom(data,years,lwd,lty)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
lwd |
The width of the curve. Default is 1.5. |
lty |
The style of the curve. Default is 1. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data<-runif(34, 0,1)
plot_FV_pre_beta_kmom(data,8)
Plot the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the beginning of every year (annuity-due), valued at the rate X
,
using the estimated moments of the normal distribution.
Description
Plot the final expected value
of an n
-payment annuity, with payments of 1 unit each made at
the beginning of every year (annuity-due), valued at the rate X
,
using the estimated moments of the normal distribution.
Usage
plot_FV_pre_norm_kmom(data,years,lwd,lty)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
lwd |
The width of the curve. Default is 1.5. |
lty |
The style of the curve. Default is 1. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data<-rnorm(n=30,m=0.03,sd=0.01)
plot_FV_pre_norm_kmom(data,8)
# example 2
data<-rnorm(n=200,m=0.075,sd=0.2)
plot_FV_pre_norm_kmom(data,8)
Plot the final expected values of an
n
-payment annuity, with payments of 1 unit each made at the end
of every year (annuity-immediate), valued at the rate X
,
using different approaches.
Description
Plot the final expected values of an
n
-payment annuity, with payments of 1 unit each made at the end
of every year (annuity-immediate), valued at the rate X
,
using different approaches.
Usage
plot_FVs_post(data,years,lwd,lty1,lty2,lty3)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
lwd |
The width of the curve. Default is 1.5. |
lty1 |
The style of the curve for the "arctan" approximation. Default is 1. |
lty2 |
The style of the curve for the "cubic" approximation. Default is 2. |
lty3 |
The style of the curve for the "mood" approximation. Default is 3. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
#example 1
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
plot_FVs_post(data)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.003)
plot_FVs_post(data)
Plot the final expected values of an
n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using different approaches.
Description
Plot the final expected values of an
n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using different approaches.
Usage
plot_FVs_pre(data,years,lwd,lty1,lty2,lty3)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
lwd |
The width of the curve. Default is 1.5. |
lty1 |
The style of the curve for the "arctan" approximation. Default is 1. |
lty2 |
The style of the curve for the "cubic" approximation. Default is 2. |
lty3 |
The style of the curve for the "mood" approximation. Default is 3. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
#example 1
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
plot_FVs_pre(data)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.003)
plot_FVs_pre(data)
Plot the present expected values of an
n
-payment annuity, with payments of 1 unit each made at the end
of every year (annuity-immediate), valued at the rate X
,
using different approaches.
Description
Plot the present expected values of an
n
-payment annuity, with payments of 1 unit each made at the end
of every year (annuity-immediate), valued at the rate X
,
using different approaches.
Usage
plot_PVs_post(data,years,lwd,lty1,lty2,lty3,lty4,lty5,lty6)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
lwd |
The width of the curve. Default is 1.5. |
lty1 |
The style of the curve for the "arctan" approximation. Default is 1. |
lty2 |
The style of the curve for the "cubic" approximation. Default is 2. |
lty3 |
The style of the curve for the "mood with positive moments" approximation. Default is 3. |
lty4 |
The style of the curve for the "mood with negative moments" approximation. Default is 4. |
lty5 |
The style of the curve for the exact value. Default is 5. |
lty6 |
The style of the curve for "triangular distribution" approximation. Default is 6. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
plot_PVs_post(data)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.003)
plot_PVs_post(data)
Plot the present expected values of an
n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using different approaches.
Description
Plot the present expected values of an
n
-payment annuity, with payments of 1 unit each made at the
beginning of every year (annuity-due), valued at the rate X
,
using different approaches.
Usage
plot_PVs_pre(data,years,lwd,lty1,lty2,lty3,lty4,lty5,lty6)
Arguments
data |
A vector of interest rates. |
years |
The number of years of the income. Default is 10 years. |
lwd |
The width of the curve. Default is 1.5. |
lty1 |
The style of the curve for the "arctan" approximation. Default is 1. |
lty2 |
The style of the curve for the "cubic" approximation. Default is 2. |
lty3 |
The style of the curve for the "mood with positive moments" approximation. Default is 3. |
lty4 |
The style of the curve for the "mood with negative moments" approximation. Default is 4. |
lty5 |
The style of the curve for the exact value. Default is 5. |
lty6 |
The style of the curve for "triangular distribution" approximation. Default is 6. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
plot_PVs_pre(data)
# example 2
data<-rnorm(n=30,m=0.03,sd=0.003)
plot_PVs_pre(data)
Compute the negatives moments (different from orders 1 and 2) of the fitted triangular distribution of the random variable X.
Description
Compute the negatives moments (different from orders 1 and 2) of the fitted triangular distribution of the random variable X.
Usage
triangular_moments_3(data,order)
Arguments
data |
A vector X of interest rates. |
order |
The order of moment that should be computed. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
#example 1
data=c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
triangular_moments_3(data,3)
triangular_moments_3(data,4)
# example 2 - first 10 negative moments of fitted triangular distribution
#(an example from normal distributed simulated data)
data<-rnorm(n=200,m=0.75,sd=0.2)
triangular_parameters(data)
first10negmoments=rep(NA,10) #except first and second
for (i in 3:10) first10negmoments[i]=triangular_moments_3(data,i)
first10negmoments
Compute the negatives moments
(different from orders 1 and 2) of the fitted
triangular distribution of the random variable "capitalization factor" U
.
Description
Compute the negatives moments
(different from orders 1 and 2) of the fitted
triangular distribution of the random variable "capitalization factor" U
.
Usage
triangular_moments_3_U(data,order)
Arguments
data |
A vector X of interest rates. |
order |
The order of moment that should be computed. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
#example 1
data=c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
triangular_moments_3_U(data,3)
triangular_moments_3_U(data,4)
# example 2 - first 10 negative moments of fitted triangular distribution
#(an example from normal distributed simulated data)
data<-rnorm(n=200,m=0.75,sd=0.2)
triangular_parameters(data)
first10negmoments=rep(NA,10) #except first and second
for (i in 3:10) first10negmoments[i]=triangular_moments_3_U(data,i)
first10negmoments
Compute the negative moments
of the fitted triangular distribution of the random
variable X
according to the definition (as integral).
Description
Compute the negative moments
of the fitted triangular distribution of the random
variable X
according to the definition (as integral).
Usage
triangular_moments_dis(data,order)
Arguments
data |
A vector of interest rates as percentage. |
order |
The order of moment of the triangular distribution |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data=c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
triangular_moments_dis(data,1)
triangular_moments_dis(data,2)
triangular_moments_dis(data,3)
triangular_moments_dis(data,4)
# example 2 - first 10 negative moments of fitted triangular distribution
#(an example from normal distributed simulated data)
data<-rnorm(n=200,m=0.75,sd=0.2)
triangular_parameters(data)
first10negmoments=rep(NA,10)
for (i in 1:10) first10negmoments[i]=triangular_moments_dis(data,i)
first10negmoments
Compute the negative
moments of the fitted triangular distribution of the
random variable "capitalization factor" U
according to the definition (as integral).
Description
Compute the negative
moments of the fitted triangular distribution of the
random variable "capitalization factor" U
according to the definition (as integral).
Usage
triangular_moments_dis_U(data,order)
Arguments
data |
A vector of interest rates as percentage. |
order |
The order of moment of the triangular distribution |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data=c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
triangular_moments_dis_U(data,1)
triangular_moments_dis_U(data,2)
triangular_moments_dis_U(data,3)
triangular_moments_dis_U(data,4)
# example 2 - first 10 negative moments of fitted triangular distribution
#(an example from normal distributed simulated data)
data<-rnorm(n=200,m=0.75,sd=0.2)
triangular_parameters(data)
first10negmoments=rep(NA,10)
for (i in 1:10) first10negmoments[i]=triangular_moments_dis_U(data,i)
first10negmoments
Compute the parameters and
plot the fitted triangular distribution of the random
variable X
.
Description
Compute the parameters and
plot the fitted triangular distribution of the random
variable X
.
Usage
triangular_parameters(data)
Arguments
data |
A vector of interest rates. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data=c(0.00,-0.05,-0.05,-0.06,-0.06,0.02,-0.06,-0.05,-0.04,-0.05,
-0.03,-0.06,0.04,-0.05,-0.08,-0.05,-0.12,-0.03,-0.05,-0.04,-0.06)
triangular_parameters(data)
# example 2
data<-rnorm(n=200,m=0.75,sd=0.2)
triangular_parameters(data)
# example 3
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
triangular_parameters(data)
Return the parameters of the
fitted triangular distribution of the random variable
"capitalization factor" U
.
Description
Return the parameters of the
fitted triangular distribution of the random variable
"capitalization factor" U
.
Usage
triangular_parameters_U(data)
Arguments
data |
A vector of interest rates expressed as percentage. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
triangular_parameters_U(data)
Compute the variance of the present value of an annuity using "discrete random variable" approach.
Description
Compute the variance of the present value of an annuity using "discrete random variable" approach.
Usage
variance_drv(data,years)
Arguments
data |
A vector X of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
variance_drv(data)
Compute the variance of the present value of an annuity-immediate using the Mood et al. approximation and some non-central moments of negative order.
Description
Compute the variance of the present value of an annuity-immediate using the Mood et al. approximation and some non-central moments of negative order.
Usage
variance_post_mood_nm(data,years)
Arguments
data |
A vector X of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
variance_post_mood_nm(data)
Compute the variance of the present value of an annuity-immediate using the Mood et al. approximation and some non-central moments of positive order.
Description
Compute the variance of the present value of an annuity-immediate using the Mood et al. approximation and some non-central moments of positive order.
Usage
variance_post_mood_pm(data,years)
Arguments
data |
A vector X of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
variance_post_mood_pm(data)
Compute the variance of the present value of an annuity-due using the Mood et al. approximation and some non-central moments of negative order.
Description
Compute the variance of the present value of an annuity-due using the Mood et al. approximation and some non-central moments of negative order.
Usage
variance_pre_mood_nm(data,years)
Arguments
data |
A vector X of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
variance_pre_mood_nm(data)
Compute the variance of the present value of an annuity-due using the Mood et al. approximation and some non-central moments of positive order.
Description
Compute the variance of the present value of an annuity-due using the Mood et al. approximation and some non-central moments of positive order.
Usage
variance_pre_mood_pm(data,years)
Arguments
data |
A vector X of interest rates. |
years |
The number of years of the income. Default is 10 years. |
Author(s)
Salvador Cruz Rambaud, Fabrizio Maturo, Ana María Sánchez Pérez
Examples
# example 1
data = c(1.77,1.85,1.85,1.84,1.84,1.83,1.85,1.85,1.88,1.85,1.80,1.84,1.91,1.85,1.84,1.85,
1.86,1.85,1.88,1.86)
data=data/100
variance_pre_mood_pm(data)