forked from alistair-marshall/cFIREsim-open
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
2143 lines (2099 loc) · 123 KB
/
index.html
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en" ng-app="cFIREsim">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A Crowdsourced Financial Independence and Early Retirement Simulator and Calculator. Uses historic stock data to model your retirement and give you a success rate based on all of the possible periods of time in the stock market (good and bad).">
<title>Crowdsourced Financial Independence and Early Retirement Simulator/Calculator</title>
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#428BCA" />
<style>
.dygraph-axis-label-y {
padding-right: 10px;
padding-left: 10px;
}
.output > span {
display: none;
}
.output > span.highlight {
display: inline;
}
.output {
color: black;
}
#tabNav .nav-pills > li > a {
border-radius: 4px 4px 0 0;
}
#tabNav .tab-content {
color: white;
background-color: #428bca;
}
.table {
background-color: white;
color: black;
}
.table-nonfluid {
width: auto !important;
font-size: 80%;
}
.table-nonfluid th {
width: auto !important;
}
.table-nonfluid th {
background-color: grey;
}
.rowHeaders tr td:first-child {
background-color: grey;
font-weight: bold;
}
.ot_banner {
color: white;
background-color: #e78f08;
width: 50%;
float: none;
margin: 0 auto;
border: 2px;
border-radius: 8px;
padding: 3px;
text-align: center;
margin-bottom: 5px;
}
.ot_banner a {
color: #23568f;
}
.ot_banner_output {
color: white;
background-color: #e78f08;
width: 50%;
float: none;
border: 2px;
border-radius: 8px;
padding: 3px;
text-align: center;
margin-bottom: 5px;
margin-top: 5px;
}
.ot_banner_output a {
color: #23568f;
}
/**
* Reset button styles
* It takes some work to achieve a “blank slate” look.
*/
button {
padding: 0;
border: none;
font: inherit;
color: inherit;
background-color: transparent;
/* show a hand cursor on hover; some argue that we
should keep the default arrow cursor for buttons */
cursor: pointer;
}
/**
* Button component
*/
input[type=button], .custom-file-upload{
/* default for <button>, but needed for <a> */
display: inline-block;
text-align: center;
text-decoration: none;
font-size: 0.8rem;
/* create a small space when buttons wrap on 2 lines */
margin: 2px 0;
/* invisible border (will be colored on hover/focus) */
border: solid 1px currentColor; /*transparent;*/
border-radius: 4px;
/* button size comes from text + padding, avoid height */
padding: 0.5em 1em;
/* make sure colors have enough contrast! */
color: #666;
background-color: #FFFFFF;
}
/* old-school "down" effect on clic + color tweak */
input[type=button]:active, .custom-file-upload:active {
transform: translateY(1px);
filter: saturate(150%);
}
/* inverse colors on hover */
input[type=button]:hover, .custom-file-upload:hover {
color: #FFFFFF;
border-color: transparent;
background-color: #999;
}
/* gray out disabled buttons*/
input[type=button]:disabled{
color: #666;
background-color: #ccc;
border-color: currentColor
}
/* Firefox: remove the inner border shown on focus */
input[type=button]::-moz-focus-inner {
border: none;
}
/* make sure we have a visible focus ring */
input[type=button]:focus, .custom-file-upload:focus {
outline: none;
box-shadow: 0 0 0 1px #eb989b,
0 0 0 1px #eb989b;
border-color: #ec1d24;
}
/* hide focus style if not from keyboard navigation */
.js-focus-visible input[type=button]:focus:not(.focus-visible),
.js-focus-visible .custom-file-upload:focus:not(.focus-visible) {
box-shadow: none;
}
input.highlight {
color: #ec1d24;
}
input.highlight:hover {
background-color: #ec1d24;
}
input[type="file"] {
display: none;
}
</style>
<!-- Bootstrap core CSS
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-select.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/r/bs/dt-1.10.8/datatables.min.css" /> -->
<!-- MDC core CSS -->
<link rel="stylesheet" href="css/mdc-style.css" />
</head>
<body>
<div class="page-header">
<h1 class="text-center">The Crowdsourced FIRE Simulator (cFIREsim) - Open Source</h1>
</div>
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><button type="button" class="btn btn-default navbar-btn" id="saveSimBtn">Save Simulation Inputs</button></li>
<li><button type="button" class="btn btn-default navbar-btn" id="loadSimBtn">Load Saved Sim</button></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<p class="navbar-btn">
<a href="faq.html" class="btn btn-default">FAQ/Tutorial</a>
</p>
</li>
<li>
<p class="navbar-btn">
<a data-toggle="modal" href="#donateModal" class="btn btn-default">Donate/Support</a>
</p>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Blogs/Forums <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="http://www.bogleheads.org">Bogleheads</a></li>
<li><a href="http://bucking-the-trend.com/">Bucking The Trend</a></li>
<li><a href="http://earlyretirementextreme.com/">Early Retirement Extreme</a></li>
<li><a href="http://early-retirement.org">Early-Retirement.org</a></li>
<li><a href="http://www.gocurrycracker.com/">Go Curry Cracker!</a></li>
<li><a href="http://www.1500Days.com/">1500 Days</a></li>
<li><a href="http://the-military-guide.com/">Military Retirement</a></li>
<li><a href="http://www.mrmoneymustache.com">Mr. Money Mustache</a></li>
<li><a href="http://wpfau.blogspot.com/">Wade Pfau's Retirement Research</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Other Calculators/Tools <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://www.fidelity.com/calculators-tools/retirement-income-planner">Fidelity Retirement Income Planner</a></li>
<li><a href="http://www.firecalc.com">FireCalc</a></li>
<li><a href="http://www.i-orp.com/">Optimized Retirement Planner (i-ORP)</a></li>
<li><a href="http://www.ssa.gov/estimator/">Social Security Benefits Estimator</a></li>
<li><a href="http://www.vanguard.com/us/insights/retirement/plan-for-a-long-retirement-tool">Vanguard Life Expectancy Tool</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div id="input" ng-controller="simulationInputController">
<form name="form">
<div class="row">
<div class="col-md-12" style="display:none" id="loadedSimHeader">
<div class="panel panel-success">
<div class="panel-heading" id="loadedSimHeaderText">
Successfully loaded
</div>
</div>
</div>
<div class="col-md-12" style="display:none" id="loadedSimFail">
<div class="panel panel-danger">
<div class="panel-heading" id="loadedSimFailText">
Failed to load
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
Timeframe
</div>
<div class="panel-body">
<div class="alert alert-danger" role="alert" id="yearsError" style="display:none">
<span class="sr-only">Error:</span>
Retirement Start must be >= Simulation Start. Retirement Start must be before Retirement End.
</div>
<label>Simulation Start Year:<input type="text" class="form-control toot" ng-model="data.simulationStartYear" id="simulationStartYear"></label>
<label>Retirement Year:<input type="text" class="form-control toot" ng-model="data.retirementStartYear" id="retirementStartYear"></label>
<label>Retirement End Year:<input type="text" class="form-control" ng-model="data.retirementEndYear" id="retirementEndYear"></label>
<p>Pre-retirement length = {{ data.retirementStartYear - data.simulationStartYear }} years.</p>
<p>Retirement length = {{ data.retirementEndYear - data.retirementStartYear }} years.</p>
<p>Total simulation length = {{ data.retirementEndYear - data.simulationStartYear }} years.</p>
<!-- cFIREsim Open -->
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
Data Options
</div>
<div class="alert alert-danger" role="alert" id="dataError" style="display:none">
<span class="sr-only">Error:</span>
Start Year must be >= 1871. Start Year must be less than End Year. End Year must be less than current year. Total span of years must be > simulation period.
</div>
<div class="alert alert-danger" role="alert" id="dataRateError" style="display:none">
<span class="sr-only">Error:</span>
Market Growth must be a positive number.
</div>
<div class="alert alert-danger" role="alert" id="dataSingleYearError" style="display:none">
<span class="sr-only">Error:</span>
Start Year must be >= 1871 and early enough to have enough data available for the simulation length.
</div>
<div class="alert alert-danger" role="alert" id="dataCapeError" style="display:none">
<span class="sr-only">Error:</span>
CAPE limits must be positive numbers and minimum CAPE must be less than maximum CAPE.
</div>
<div class="alert alert-danger" role="alert" id="investigateError" style="display:none">
<span class="sr-only">Error:</span>
Chance of suscess must be >0 and <=100.
</div>
<div class="panel-body">
<label>
Data To Use:
<select class="form-control"
ng-model="data.data.method"
ng-change="refreshDataForm()"
ng-options="dataOptions.value as dataOptions.text for dataOptions in dataOptionTypes"></select>
</label>
<div id="historicalSpecificOptions" class="dataOptions" style="display:none">
<label>
Starting Data Year:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.data.start">
</div>
</label>
<label>
Ending Data Year:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.data.end">
</div>
</label>
</div>
<div id="singleCycleOptions" class="dataOptions" style="display:none">
<label>
Starting Data Year:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.data.singleStart">
</div>
</label>
</div>
<div id="constantGrowthOptions" class="dataOptions" style="display:none">
<label>
Market Growth:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.data.growth">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
<div id="historicalCapeOptions" class="dataOptions" style="display:none">
<label>
Minimum Starting Cape:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.data.mincape">
</div>
</label>
<label>
Maximum Starting Cape:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.data.maxcape">
</div>
</label>
</div>
<div class="row">
<div class="col-md-12">
<label>
Investigate:
<select class="form-control"
ng-model="data.investigate.type"
ng-change="refreshInvestigateForm()"
ng-options="investigateOptions.value as investigateOptions.text for investigateOptions in investigateOptionTypes"></select>
</label>
</div>
</div>
<div id="maxInitialSpendingOptions" class="dataOptions" style="display:none">
<label>
Minimum Success Rate:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.investigate.successRate">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
<br><a data-toggle="modal" href="#outputModal" class="btn btn-success btn-lg runSim" ng-click="runSimulation()">Run Simulation</a>
<a data-toggle="modal" href="#outputModal" class="btn btn-success btn-lg runSim" style="display:none" id="showPreviousSimulations">Show Previous Simulations</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="panel panel-primary" id="portfolioPanel">
<div class="panel-heading">
Portfolio
</div>
<div class="panel-body">
<div class="alert alert-danger" role="alert" id="portfolioError" style="display:none">
<span class="sr-only">Error:</span>
Portfolio must be a positive number.
</div>
<label>Portfolio Value:
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="number" class="form-control" ng-model="data.portfolio.initial">
</div>
</label>
<div class="panel panel-default">
<div class="panel-heading">
Initial Assets
</div>
<div class="panel-body">
<div class="row">
<div class="alert alert-danger" role="alert" id="allocationError" style="display:none">
<span class="sr-only">Error:</span>
Allocations must add up to 100%
</div>
<div class="col-md-6">
<label>
Equities:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.portfolio.percentEquities">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
<div class="col-md-6">
<label>
Bonds:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.portfolio.percentBonds">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>
Gold:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.portfolio.percentGold">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
<div class="col-md-6">
<label>
Cash:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.portfolio.percentCash">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>
Fees/Drag:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.portfolio.percentFees">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
<div class="col-md-6">
<label>
Growth of Cash:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.portfolio.growthOfCash">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>
Annual Rebalancing Strategy:
<select class="form-control"
ng-model="data.portfolio.rebalanceAnnually"
ng-change="refreshRebalanceAnnuallyOptions()"
ng-options="rebalanceAnnuallyOptions.value as rebalanceAnnuallyOptions.text for rebalanceAnnuallyOptions in rebalanceAnnuallyOptionsTypes"></select>
</label>
</div>
</div>
</div>
<div class="panel panel-default" id="targetAssets" style="display:none">
<div class="panel-heading">
Target Assets
</div>
<div class="panel-body">
<div class="alert alert-danger" role="alert" id="targetAllocationError" style="display:none">
<span class="sr-only">Error:</span>
Allocations must add up to 100%
</div>
<div class="alert alert-danger" role="alert" id="targetAllocationYearsError" style="display:none">
<span class="sr-only">Error:</span>
Start Year must be greater than simulation start year. End Year must be after Start Year.
</div>
<div class="row">
<div class="col-md-6">
<label>
Start Year:
<input type="text" class="form-control" ng-model="data.portfolio.changeAllocationStartYear">
</label>
</div>
<div class="col-md-6">
<label>
End Year:
<input type="text" class="form-control" ng-model="data.portfolio.changeAllocationEndYear">
</label>
</div>
</div><div class="row">
<div class="col-md-6">
<label>
Equities:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.portfolio.targetPercentEquities">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
<div class="col-md-6">
<label>
Bonds:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.portfolio.targetPercentBonds">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>
Gold:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.portfolio.targetPercentGold">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
<div class="col-md-6">
<label>
Cash:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.portfolio.targetPercentCash">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
Spending Plan
</div>
<div class="alert alert-danger" role="alert" id="initialSpendingError" style="display:none">
<span class="sr-only">Error:</span>
Initial Spending amount must be a positive number.
</div>
<div class="panel-body">
<label>
Spending Plan:
<select class="form-control"
ng-model="data.spending.method"
ng-change="refreshSpendingForm()"
ng-options="spendingPlan.value as spendingPlan.text for spendingPlan in spendingPlanTypes"></select>
</label>
<div id="yearlySpendingOptions" class="spendingOptions">
<label>
Initial Yearly Spending:
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="text" class="form-control" ng-model="data.spending.initial">
</div>
</label>
</div>
<div id="percentageOfPortfolioOptions" class="spendingOptions">
<label>
Yearly Spending (% of portfolio):
<div class="input-group">
<input type="text"
class="form-control"
ng-model="data.spending.percentageOfPortfolioPercentage">
<span class="input-group-addon">%</span>
</div>
</label>
<div id="percentageOfPortfolioLimits">
<label>
Floor Spending:
<div class="input-group">
<select class="form-control"
ng-model="data.spending.percentageOfPortfolioFloorType"
ng-change="clearProperty(true, 'data.spending.percentageOfPortfolioFloorValue')"
ng-options="limitType.value as limitType.text for limitType in percentOfPortfolioFloorLimitTypes"></select>
</div>
</label>
<label>
Never Less Than:
<div class="input-group">
<span class="input-group-addon" ng-show="data.spending.percentageOfPortfolioFloorType == 'definedValue'">$</span>
<input type="text"
class="form-control"
ng-model="data.spending.percentageOfPortfolioFloorValue"
ng-disabled="data.spending.percentageOfPortfolioFloorType == 'none' || data.spending.percentageOfPortfolioFloorType == 'pensions'">
<span class="input-group-addon" ng-show="data.spending.percentageOfPortfolioFloorType != 'definedValue'">%</span>
</div>
</label>
<br>
<label>
Ceiling Spending:
<div class="input-group">
<select class="form-control"
ng-model="data.spending.percentageOfPortfolioCeilingType"
ng-change="clearProperty(true, 'data.spending.percentageOfPortfolioCeilingValue')"
ng-options="limitType.value as limitType.text for limitType in percentOfPortfolioCeilingLimitTypes"></select>
</div>
</label>
<label>
Never More Than:
<div class="input-group">
<span class="input-group-addon" ng-show="data.spending.percentageOfPortfolioCeilingType == 'definedValue'">$</span>
<input type="text"
class="form-control"
ng-model="data.spending.percentageOfPortfolioCeilingValue"
ng-disabled="data.spending.percentageOfPortfolioCeilingType == 'none'">
<span class="input-group-addon" ng-show="data.spending.percentageOfPortfolioCeilingType != 'definedValue'">%</span>
</div>
</label>
</div>
</div>
<div id="hebelerAutopilotOptions" class="spendingOptions">
<label>
Age of Retirement:
<input type="text" class="form-control" ng-model="data.spending.hebelerAgeOfRetirement">
</label>
<label>
Weighted RMD:
<div class="input-group">
<input type="text"
class="form-control"
ng-model="data.spending.hebelerWeightedRMD">
<span class="input-group-addon">%</span>
</div>
</label>
<label>
Weighted CPI:
<div class="input-group">
<input type="text"
class="form-control"
ng-model="data.spending.hebelerWeightedCPI">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
<div id="variableSpendingOptions" class="spendingOptions">
<label>
Z Value (0.000 - 1.000):
<input type="text" class="form-control" ng-model="data.spending.variableSpendingZValue">
</label>
</div>
<div id="guytonKlingerOptions" class="spendingOptions">
<label>
Exceeds:
<div class="input-group">
<input type="text"
class="form-control"
ng-model="data.spending.guytonKlingerExceeds">
<span class="input-group-addon">%</span>
</div>
</label>
<label>
Cut:
<div class="input-group">
<input type="text"
class="form-control"
ng-model="data.spending.guytonKlingerCut">
<span class="input-group-addon">%</span>
</div>
</label>
<br>
<label>
Fall:
<div class="input-group">
<input type="text"
class="form-control"
ng-model="data.spending.guytonKlingerFall">
<span class="input-group-addon">%</span>
</div>
</label>
<label>
Raise:
<div class="input-group">
<input type="text"
class="form-control"
ng-model="data.spending.guytonKlingerRaise">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
<div id="vpwOptions" class="spendingOptions">
<label>
Rate of Return:
<div class="input-group">
<input type="text"
class="form-control"
ng-model="data.spending.vpwRateOfReturn">
<span class="input-group-addon">%</span>
</div>
</label>
<label>
Future Value:
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="text" class="form-control" ng-model="data.spending.vpwFutureValue">
</div>
</label>
</div>
<div id="variableCAPEOptions" class="spendingOptions">
<label>
Cyclically Adjusted Earnings Yield Multiplier:
<div class="input-group">
<input type="text"
class="form-control"
ng-model="data.spending.variableCAPEMultiplier">
<span class="input-group-addon">*</span>
</div>
</label>
<label>
Constant Adjustment:
<div class="input-group">
<input type="text" class="form-control" ng-model="data.spending.variableCAPEConstantAdjustment">
<span class="input-group-addon">+</span>
</div>
</label>
</div>
<div id="retireAgainAndAgainOptions" class="spendingOptions">
<label>
RAA Target Portfolio Amount:
<div class="input-group">
<select class="form-control"
ng-model="data.spending.retireAgainAmountType"
ng-options="retireAgainAmountType.value as retireAgainAmountType.text for retireAgainAmountType in retireAgainAmountTypes"></select>
</div>
</label>
<label>
RAA Custom Portfolio Target:
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="text"
class="form-control"
ng-model="data.spending.retireAgainCustomTarget">
</div>
</label>
<label>
Threshold for Spending Increase:
<div class="input-group">
<input type="text"
class="form-control"
ng-model="data.spending.retireAgainThreshold">
<span class="input-group-addon">%</span>
</div>
</label>
</div>
<div id="spendingLimitOptions" class="spendingOptions">
<label>
Spending Floor (Inflation Adjusted):
<select class="form-control"
ng-model="data.spending.floor"
ng-options="floor.value as floor.text for floor in spendingFloorTypes"></select>
</label>
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="text"
class="form-control"
ng-model="data.spending.floorValue"
ng-disabled="data.spending.floor != 'definedValue'">
</div>
<label>
Spending Ceiling (Inflation Adjusted):
<select class="form-control"
ng-model="data.spending.ceiling"
ng-options="ceiling.value as ceiling.text for ceiling in spendingCeilingTypes"></select>
</label>
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="text"
class="form-control"
ng-model="data.spending.ceilingValue"
ng-disabled="data.spending.ceiling != 'definedValue'">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">
Income
</div>
<div class="panel-body">
<div class="panel panel-default">
<div class="panel-heading">
Social Security
</div>
<div class="panel-body">
<div class="alert alert-danger" role="alert" id="ssError" style="display:none">
<span class="sr-only">Error:</span>
Start Year must be >= simulation start year. Start Year must be less than End Year.
</div>
<div class="alert alert-danger" role="alert" id="ssValueError" style="display:none">
<span class="sr-only">Error:</span>
Amount must be a positive number.
</div>
<div class="row">
<div class="col-md-4">
<label>
Annual Amount:
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="text" class="form-control" ng-model="data.extraIncome.socialSecurity.val">
</div>
</label>
</div>
<div class="col-md-4">
<label>Start Year:<input type="text" class="form-control" ng-model="data.extraIncome.socialSecurity.startYear"></label>
</div>
<div class="col-md-4">
<label>End Year:<input type="text" class="form-control" ng-model="data.extraIncome.socialSecurity.endYear"></label>
</div>
</div>
<div class="row">
<div class="col-md-4">
<label>
Annual Spousal Amount:
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="text" class="form-control" ng-model="data.extraIncome.socialSecuritySpouse.val">
</div>
</label>
</div>
<div class="col-md-4">
<label>Start Year:<input type="text" class="form-control" ng-model="data.extraIncome.socialSecuritySpouse.startYear"></label>
</div>
<div class="col-md-4">
<label>End Year:<input type="text" class="form-control" ng-model="data.extraIncome.socialSecuritySpouse.endYear"></label>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
Pensions
</div>
<div class="panel-body">
<div class="alert alert-danger" role="alert" id="pensionsError" style="display:none">
<span class="sr-only">Error:</span>
Pension Start Year must be >= the simulation start year and must be an integer.
</div>
<div class="alert alert-danger" role="alert" id="pensionsValueError" style="display:none">
<span class="sr-only">Error:</span>
Amount must be a positive number.
</div>
<div class="alert alert-danger" role="alert" id="pensionsRateError" style="display:none">
<span class="sr-only">Error:</span>
Pension inflation rate must be a positive number.
</div>
<table class="table">
<thead>
<tr>
<th id="p_label">
Label
</th>
<th id="p_amount">
Annual Amount
</th>
<th id="p_year">
Start Year
</th>
<th id="p_infadj">
Inflation Adjusted
</th>
<th id="p_inftyp">
Inflation Type
</th>
<th id="p_infrate">
Inflation Rate
</th>
<th>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="pension in data.extraIncome.pensions">
<td>
<input type="text" class="form-control" ng-model="pension.label" aria-labelledby="p_label">
</td>
<td>
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="text" class="form-control" ng-model="pension.val" aria-labelledby="p_amount">
</div>
</td>
<td>
<input type="text" class="form-control" ng-model="pension.startYear" aria-labelledby="p_amount">
</td>
<td>
<select class="form-control"
ng-model="pension.inflationAdjusted"
ng-options="bool for bool in boolOptions"
ng-change="changeInflationAdjusted($index, data.extraIncome.pensions)"
aria-labelledby="p_infadj"></select>
</td>
<td>
<select class="form-control"
ng-model="pension.inflationType"
ng-options="option.value as option.text for option in inflationTypes"
ng-change="changeInflationType($index, data.extraIncome.pensions)"
ng-disabled="!pension.inflationAdjusted"
aria-labelledby="p_inftyp"></select>
</td>
<td>
<div class="input-group">
<input type="text"
class="form-control"
ng-model="pension.inflationRate"
ng-disabled="pension.inflationType != 'constant' || !pension.inflationAdjusted"
aria-labelledby="p_infrate">
<span class="input-group-addon">%</span>
</div>
</td>
<td>
<button type="button" class="btn btn-default" ng-click="removeObject($index, data.extraIncome.pensions)">Delete</button>
</td>
</tr>
</tbody>
</table>
<button type="button" class="btn btn-default" ng-click="addObject(data.extraIncome.pensions)" class="btn btn-default">Add Pension</button>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
Other Income
</div>
<div class="alert alert-danger" role="alert" id="extraIncomeRateError" style="display:none">
<span class="sr-only">Error:</span>
Extra Income inflation rate must be a positive number.
</div>
<div class="alert alert-danger" role="alert" id="extraIncomeValueError" style="display:none">
<span class="sr-only">Error:</span>
Amount must be a positive number.
</div>
<div class="alert alert-danger" role="alert" id="extraIncomeError" style="display:none">
<span class="sr-only">Error:</span>
Start Year must be >= current year. Start Year must be less than End Year.
</div>
<div class="panel-body">
<table class="table">
<thead>
<tr>
<th id="i_label">
Label
</th>
<th id="i_amount">
Annual Amount
</th>
<th id="i_type">
Recurring
</th>
<th id="i_syear">
Start Year
</th>
<th id="i_eyear">
End Year
</th>