Description Usage Format Value Methods References
Class providing an interface for a generic VA pricing engine.
This class shouldn't be instantiated but used as base class for
variable annuity pricing engines.
The value of the VA contract is estimated by means of the Monte Carlo
method if the policyholder cannot surrender (the so called "static"
approach), and by means of Least Squares Monte Carlo in case the
policyholder can surrender the contract (the "mixed" approach).
See References -[BMOP2011]
for a description of the mixed
and static approaches and the algorithm implemented by this class,
[LS2001]
for Least Squares Monte Carlo.
1 |
R6Class
object.
Object of R6Class
new
Constructor method
death_time
Returns the time of death index. If the death doesn't occur during the product time-line it returns the last index of the product time-line plus one.
simulate_financial_paths
Simulates npaths
paths
of the underlying fund of the VA contract and the discount factors
(interest rate) and saves them into private fields for later use.
simulate_mortality_paths
Simulates npaths
paths
of the intensity of mortality and saves them into private fields
for later use.
get_fund
Gets the i
-th path of the underlying fund
where i
goes from 1 to npaths
do_static
Estimates the VA contract value by means of the static approach (Monte Carlo), see References. It takes as arguments:
the_gatherer
gatherer
object to hold
the point estimates
npaths
positive integer with the number of paths to simulate
simulate
boolean to specify if the paths should be simulated from scratch, default is TRUE.
do_mixed
Estimates the VA contract by means of the mixed approach (Least Squares Monte Carlo), see References. It takes as arguments:
the_gatherer
gatherer
object to hold
the point estimates
npaths
positive integer with the number of paths to simulate
degree
positive integer with the maximum degree of the weighted Laguerre polynomials used in the least squares by LSMC
freq
string which contains the frequency of the surrender
decision. The default is "3m"
which corresponds to deciding
every three months if surrendering the contract or not.
simulate
boolean to specify if the paths should be simulated from scratch, default is TRUE.
get_discount
Arguments are i,j
.
Gets the j
-th discount factor corresponding to the i
-th
simulated path of the discount factors. This method must be implemented
by sub-classes.
fair_fee
Calculates the fair fee for a contract using the bisection method. Arguments are:
fee_gatherer
data_gatherer
object to hold
the point estimates
npaths
numeric
scalar with the number of MC
simulations to run
lower
numeric
scalar with the lower fee corresponding
to positive end of the bisection interval
upper
numeric
scalar with the upper fee corresponding
to the negative end of the bisection interval
mixed
boolean
specifying if the mixed method has
to be used. The default is FALSE
tol
numeric
scalar with the tolerance of the
bisection algorithm. Default is 1e-4
nmax
positive integer
with the maximum number of
iterations of the bisection algorithm
simulate
boolean specifying if financial and mortality paths should be simulated.
[BMOP2011] Bacinello A.R., Millossovich P., Olivieri A. ,Pitacco E., "Variable annuities: a unifying valuation approach." In: Insurance: Mathematics and Economics 49 (2011), pp. 285-297.
[LS2001] Longstaff F.A. e Schwartz E.S. Valuing american options by simulation: a simple least-squares approach. In: Review of Financial studies 14 (2001), pp. 113-147
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.