Description Usage Format Value Methods References Examples
Class providing a variable annuity pricing engine where the underlying
reference fund and the intensity of mortality are specified by an arbitrary
system of stochastic differential equations. The simulation is done
by means of the
yuima package.
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 and [YUIMA2014]
for yuima
.
1 |
R6Class
object.
Object of R6Class
new
Constructor method with arguments:
product
A va_product
object with the VA product.
financial_parms
A list of parameters
specifying the financial processes.
See financials_BMOP2011
for an example.
mortality_parms
A list of parameters
specifying the demographic processes.
See mortality_BMOP2011
for an example.
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.
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
[YUIMA2014] Alexandre Brouste, Masaaki Fukasawa, Hideitsu Hino, Stefano M. Iacus, Kengo Kamatani, Yuta Koike, Hiroki Masuda, Ryosuke Nomura, Teppei Ogihara, Yasutaka Shimuzu, Masayuki Uchida, Nakahiro Yoshida (2014). The YUIMA Project: A Computational Framework for Simulation and Inference of Stochastic Differential Equations. Journal of Statistical Software, 57(4), 1-51. URL http://www.jstatsoft.org/v57/i04/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | #Sets up the payoff as a roll-up of premiums with roll-up rate 2%
rate <- constant_parameters$new(0.02)
premium <- 100
rollup <- payoff_rollup$new(premium, rate)
#Five years time-line
begin <- timeDate::timeDate("2016-01-01")
end <- timeDate::timeDate("2020-12-31")
#Age of the policyholder.
age <- 60
# A constant fee of 2% per year (365 days)
fee <- constant_parameters$new(0.02)
#Barrier for a state-dependent fee. The fee will be applied only if
#the value of the account is below the barrier
barrier <- 200
#Withdrawal penalty applied in case the insured surrenders the contract
#It is a constant penalty in this case
penalty <- penalty_class$new(type = 1, 0.02)
#Sets up the contract with GMAB guarantee
contract <- GMAB$new(rollup, t0 = begin, t = end, age = age, fee = fee,
barrier = barrier, penalty = penalty)
#Sets up a gatherer of the MC point estimates
the_gatherer <- mc_gatherer$new()
no_of_paths <- 10
#Sets up the pricing engine
engine <- va_sde_engine$new(contract, financials_BMOP2011,
mortality_BMOP2011)
#Estimates the contract value by means of the static approach
engine$do_static(the_gatherer, no_of_paths)
the_gatherer$get_results()
#Estimates the contract value by means of the mixed approach
#To compare with the static approach we don't simulate the underlying
#fund paths again.
the_gatherer_2 <- mc_gatherer$new()
engine$do_mixed(the_gatherer_2, no_of_paths, degree = 3, freq = "3m",
simulate = FALSE)
the_gatherer_2$get_results()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.