Description Usage Arguments Value Examples
Expected Utility for total cash-flows is calculated here and used for optimization
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 |
ret_age |
Decision Variable: retirement age, can be set anywhere between 60 and 70 (default: 65) |
tw3 |
Decision Variable: third pillar portfolio allocation (given either as vector or as matrix with entries) for all years. HERE: Choose only allocation to stocks, bonds and real estate, cash will be determined as fraction missing to sum up to one |
c |
Decision Variable: fraction of income that is consumed while still working (current assumption: constant) |
c2 |
Decision Variable: second pillar savings as fraction of gross income (still missing: health, a-fonds-perdu payments) |
nu2 |
Decision Variable: fraction of second pillar savings that is converted to life-long pension |
nu3 |
Decision Variable: fraction of third pillar savings that is converted to life-long pension |
ra |
Given variable: Risk Aversion of Agent |
delta |
Given Variable: Time Preference |
alpha |
Decision Variable: parameter to choose fraction of wealth NOT consumed during retirement but kept for investment (and subsequent consumption) - see file 'Consumption_3p.ods' |
beta |
Given variable: Relative Weight of bequest utility |
c_age |
Given variable: the investor's current age (assuming birthday is calculation-day) |
gender |
Given variable: gender, 0=male and 1=female |
gender_mortalityTable |
Given variable: MortalityTable to use for gender 0=male and 1=female, e.g. 'baseTable(AVOe2005R.male)' |
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 currrently imlemented) |
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: spread to take a loan/leverage for third pillar savings |
verbose |
optional: show additional information while calculating utility (default: FALSE) |
warnings |
optional: should warnings be given? (default=TRUE) |
Expected utility
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | data(ret); data(retr)
MortalityTables::mortalityTables.load("Austria_Annuities")
util_ex <- util(ret_age=65,c_age=42,
tw3=c(.25,.25,.25),
c=0.6,c2=.12,nu2=.5,nu3=0.01,ra=4,delta=0.02,alpha=0.96,beta=0.75,gender=0,
gender_mortalityTable=MortalityTables::baseTable(AVOe2005R.male),
w0=300000,CF=NULL,li=100000,lg=0.01,c1=0.07,s1=c(15,80000),s2=300000,s3=300000,
w2=setNames(c(.30,.30,.30,.10,0),c("msci","b10","recom","libor","infl")),
rho2=0.05,rho3=0.04,ret=ret,retr=retr,psi=0.015)
util_ex2 <- util(ret_age=65,c_age=64,
tw3=setNames(c(1,0,0),c("msci","b10","recom")),
c=1,c2=0,nu2=0,nu3=0,ra=0,delta=0,alpha=1,beta=0,gender=0,
gender_mortalityTable=MortalityTables::baseTable(AVOe2005R.male),
w0=0,CF=NULL,li=0,lg=0,c1=0,s1=c(0,0),s2=0,s3=0,
w2=setNames(c(0,0,0,1,0),c("msci","b10","recom","libor","infl")),
rho2=0.0001,rho3=0.0001,ret=ret[,,1:10],retr=retr[,,1:10],psi=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.