this pull request adds a few tests on life annuities and fixes the issue that Wolfgang Abele noticed on April 27, 2015 where the computation of a last survivor annuity yielded two different answers.
The issue was that the function axyzn ignored the very last term in the summation of v^k k_p_x.
I think that the definition of omega in the package is not consistent with the book Actuarial Mathematics (2nd Edition) page 63. Under observations point 4 says that s(x) > 0 for x < omega and s(x) = 0 for x >= omega.
I believe the R code sets omega equal to the last entry in the lifetable where l_x > 0.
Hi Giorgio,
this pull request adds a few tests on life annuities and fixes the issue that Wolfgang Abele noticed on April 27, 2015 where the computation of a last survivor annuity yielded two different answers.
The issue was that the function axyzn ignored the very last term in the summation of v^k k_p_x.
I think that the definition of omega in the package is not consistent with the book Actuarial Mathematics (2nd Edition) page 63. Under observations point 4 says that s(x) > 0 for x < omega and s(x) = 0 for x >= omega.
I believe the R code sets omega equal to the last entry in the lifetable where l_x > 0.
Will probably need more testing of all functions.
Have a great weekend!
Ernesto