Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Python program that when a user inputs his/her age, the program outputs the correct allocation of stocks/bonds for retirement. Note that for this
Write a Python program that when a user inputs his/her age, the program outputs the correct allocation of stocks/bonds for retirement. Note that for this case, assume the user only invests in Stocks and Bonds. Assume that the age of retirement is 65 years and the optimal stock/bond allocations are based on the table below. Include sample outputs from the code.
Age | Years to Retirement(Years Before Target Age) | Stocks | Bonds |
|
20 | 45 | 95% | 5% | |
25 | 40 | 95% | 5% | |
30 | 35 | 92% | 8% | |
35 | 30 | 90% | 10% | |
40 | 25 | 85% | 15% | |
45 | 20 | 80% | 20% | |
50 | 15 | 70% | 30% | |
55 | 10 | 65% | 35% | |
60 | 5 | 50% | 50% | |
65 | 0 | 40% | 60% |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started