Description Usage Arguments Value Examples
Here we minimize negative expected utility (given by function 'util()'). Parameters can be fixed by setting "tight" boundaries
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 |
initial_values |
Starting values c(ret_age, c, c2, nu2, nu3, alpha, w3) |
upper_bounds |
Upper bounds for optimization |
lower_bounds |
Lower bounds for optimization |
c_age |
Given variable: the investor's current age (assuming birthday is calculation-day) |
gender |
Given variable: gender, 0=male and 1=female |
w0 |
Given variable: time c_age wealth that is not disposable, assumption: still available at retirement (no growth or decline), alternatively: expected wealth (that is not disposable) at retirement, stays the same over time |
CF |
Given Variables: income shocks, such as inheritance (not currently implemented) |
li |
Given variable: gross labor income at time 0 (in the last year before birthday) |
lg |
Given variable: labor growth rate (in real terms, constant) |
c1 |
Given variable: first pillar savings as fraction of gross income |
s1 |
Given variable: vector consisting of two components: c(number of contribution years at age=c_age,historical average yearly income until c_age) |
s2 |
Given variable: savings in second pillar as of t=0 |
s3 |
Given variable: liquid wealth - invested in the third pillar (current assumption: no tax advantage for third pillar) |
w2 |
Given variable: portfolio allocation in second pillar (assumed to be fixed and not influenced by the decision maker) |
rho2 |
Given variable: conversion factor in second pillar for regular retirement age |
rho3 |
Given variable: conversion factor in third pillar for regular retirement age |
ret |
Given variable: investment return scenarios (nominal) |
retr |
Given variable: investment return scenarios (real) |
psi |
Given variable: optional, spread to take a loan/leverage for third pillar savings |
warnings |
optional: should warnings be given? (default=TRUE) |
Optimal values for c(ret_age, c, c2, nu2, nu3, alpha, w3)
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
data(ret);data(retr)
.load_parameters()
initial_values <- c(0.6, 0.12, 0.5, 0.2, 0.96, 0.25, 0.25, 0.25)
optimalLC(initial_values,upper_bounds=NULL,lower_bounds=NULL,
ret_age=ret_age,ra=ra,delta=delta,beta=beta,c_age=c_age,
gender=gender,gender_mortalityTable=gender_mortalityTable,
w0=w0,CF=CF,li=li,lg=lg,c1=c1,s1=s1,s2=s2,s3=s3,
w2=w2,rho2=rho2,rho3=rho3,ret=ret[,,1:10],
retr=retr[,,1:10],psi=psi,trace=1,reltol=1e-5)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.