new
Constructor method with arguments:
payoff
payoff_GMWB
object with the amount of
the periodic withdrawal
t0
timeDate
object with
the issue date of the contract
t1
timeDate
object with the end date of the contract
age
numeric
positive scalar with the age
of the policyholder
fee
constant_parameters
object with
the fee
barrier
numeric
positive scalar with the
state-dependent fee barrier
penalty
penalty_class
object with the
penalty
type
string
with the GMWB contract type:
it can be 'Wa'
for withdrawals up to t1
independent
of survival,'Wb'
for withdrawals up to t1
only
if the insured is alive, 'Wc'
for whole life withdrawals.
freq
string
with the frequency of withdrawals
expressed in months (e.g. '12m'
stands for yearly withdrawals).
get_times
get method for the product time-line.
Returns a timeDate
object
get_age
get method for the age of the insured
set_age
set method for the age of the insured
get_barrier
get method for the state-dependent fee barrier.
Returns a positive scalar with the barrier
set_barrier
set method for the state-dependent fee barrier.
Argument must be a positive scalar.
set_penalty_object
the argument penalty
is a
penalty_class
object which is stored in a private field.
get_penalty_object
gets the penalty_class
object.
set_penalty
set method for the penalty applied in case of
surrender. The argument must be a scalar between 0 and 1.
get_penalty
get method for the surrender penalties. It can be
a scalar between 0 and 1 in case the penalty is constant or a numeric vector
in case the penalty varies with time.
set_fee
set method for the contract fee. The argument is
a constant_parameters
object with the fee.
set_payoff
set method for the payoff_guarantee
object.
survival_benefit_times
returns a numeric
vector with
the survival benefit time indexes.
surrender_times
returns a numeric
vector with the
surrender time indexes. Takes as argument a string with the frequency
of the decision if surrendering the contract, e.g. "3m"
corresponds to a surrender decision taken every 3 months.
times_in_yrs
returns the product time-line in
fraction of year
cash_flows
returns a numeric
vector with the
cash flows of the product. It takes as argument: spot_values
a
numeric
vector which holds the values of the underlying
fund, death_time
a time index with the time of death and
discounts
a numeric
vector with the discount factors
at time of death. These latest are used to calculate the death
benefit for the GMWB of type Wa
survival_benefit
Returns a numeric scalar corresponding to
the survival benefit.
The arguments are: spot_values
vector which holds the values of
the underlying fund, death_time
time index of the time of death
and time
the time index of the survival benefit.
The function will return 0 if there's no survival benefit at the
specified time
get_premium
Returns the premium as non negative scalar