forked from skapebolt/SquirrelPlan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample-data.js
More file actions
112 lines (108 loc) · 4.75 KB
/
Copy pathsample-data.js
File metadata and controls
112 lines (108 loc) · 4.75 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
function getSampleData(stage) {
const recentGraduate = {
assets: [
{ name: getTranslation('stocks'), value: '5000', return: '8', tax: '0', withdrawalOrder: 1 },
{ name: getTranslation('savingsAccount'), value: '10000', return: '1', tax: '0', withdrawalOrder: 2 }
],
liabilities: [],
incomes: [
{ name: getTranslation('salary'), value: '2500', frequency: 'monthly', indexed: true }
],
expenses: [
{ name: getTranslation('livingExpenses'), value: '2000', frequency: 'monthly', indexed: true }
],
allocationPeriods: [
{ allocation: { [getTranslation('stocks')]: 1.00 } }
],
currentAge: '22',
pensionAge: '65',
estimatedPension: '1200',
inflation: '0.025',
withdrawalRate: '0'
};
const earlyCareer = {
assets: [
{ name: getTranslation('stocks'), value: '25000', return: '8', tax: '0', withdrawalOrder: 1 },
{ name: getTranslation('bonds'), value: '5000', return: '4', tax: '0', withdrawalOrder: 2 },
{ name: getTranslation('savingsAccount'), value: '25000', return: '1', tax: '0', withdrawalOrder: 3 }
],
liabilities: [],
incomes: [
{ name: getTranslation('salary'), value: '3500', frequency: 'monthly', indexed: true }
],
expenses: [
{ name: getTranslation('livingExpenses'), value: '2500', frequency: 'monthly', indexed: true }
],
allocationPeriods: [
{ allocation: { [getTranslation('stocks')]: 0.90, [getTranslation('savingsAccount')]: 0.10 } },
{ startYear: 2035, allocation: { [getTranslation('stocks')]: 0.80, [getTranslation('bonds')]: 0.20 }, rebalance: true }
],
currentAge: '30',
pensionAge: '65',
estimatedPension: '1500',
inflation: '0.025',
withdrawalRate: '0'
};
const midCareer = {
assets: [
{ name: getTranslation('ownHome'), value: '300000', return: '4', tax: '0', withdrawalOrder: 4 },
{ name: getTranslation('stocks'), value: '100000', return: '8', tax: '0', withdrawalOrder: 1 },
{ name: getTranslation('bonds'), value: '25000', return: '4', tax: '0', withdrawalOrder: 2 },
{ name: getTranslation('savingsAccount'), value: '50000', return: '1', tax: '0', withdrawalOrder: 3 }
],
liabilities: [
{ name: getTranslation('mortgage'), value: '200000', endYear: '2044', interestRate: '3.0' }
],
incomes: [
{ name: getTranslation('salary'), value: '5000', frequency: 'monthly', indexed: true }
],
expenses: [
{ name: getTranslation('livingExpenses'), value: '3000', frequency: 'monthly', indexed: true },
{ name: getTranslation('mortgageRepayment'), value: '1500', frequency: 'monthly', indexed: false, endYear: '2044' }
],
allocationPeriods: [
{ allocation: { [getTranslation('stocks')]: 0.70, [getTranslation('bonds')]: 0.30 }, rebalance: true },
{ startYear: 2045, allocation: { [getTranslation('stocks')]: 0.60, [getTranslation('bonds')]: 0.40 }, rebalance: true }
],
currentAge: '45',
pensionAge: '65',
estimatedPension: '2000',
inflation: '0.025',
withdrawalRate: '0'
};
const lateCareer = {
assets: [
{ name: getTranslation('ownHome'), value: '400000', return: '3', tax: '0', withdrawalOrder: 4 },
{ name: getTranslation('stocks'), value: '250000', return: '6', tax: '0', withdrawalOrder: 1 },
{ name: getTranslation('bonds'), value: '100000', return: '3', tax: '0', withdrawalOrder: 2 },
{ name: getTranslation('savingsAccount'), value: '100000', return: '1', tax: '0', withdrawalOrder: 3 }
],
liabilities: [],
incomes: [
{ name: getTranslation('salary'), value: '6000', frequency: 'monthly', indexed: true, endYear: '2035' }
],
expenses: [
{ name: getTranslation('livingExpenses'), value: '3500', frequency: 'monthly', indexed: true }
],
allocationPeriods: [
{ allocation: { [getTranslation('stocks')]: 0.50, [getTranslation('bonds')]: 0.50 }, rebalance: true }
],
currentAge: '55',
pensionAge: '65',
estimatedPension: '2500',
inflation: '0.025',
withdrawalRate: '0'
};
switch (stage) {
case 'recent-graduate':
return recentGraduate;
case 'early-career':
return earlyCareer;
case 'mid-career':
return midCareer;
case 'late-career':
return lateCareer;
default:
return earlyCareer; // Default to early career
}
}