NatualHisak commited on
Commit
83358be
1 Parent(s): 37d65f0

Selectbox > Radio

Browse files
Files changed (1) hide show
  1. Prediction.py +11 -10
Prediction.py CHANGED
@@ -48,29 +48,30 @@ def run ():
48
 
49
  with st.form(key='form_parameters'):
50
  st.subheader('A. Investment Time Horizon')
51
- A1 = st.selectbox('As I withdraw money from these investments, I plan to spend it over a period of...', ('10 years or more','7-9 years','4-6 years','1-3 years','Less than 1 year'))
52
- A2 = st.selectbox('I plan to begin taking money from my investments in...',('10 years or more', '6-10 years','3-5 years','1-2 years','1 or less than a year'))
53
 
54
  st.markdown('---')
55
  st.subheader('B. Investment Knowlegde')
56
- B1 = st.selectbox('When it comes to investing in stock or bond mutual funds or ETFs - or individual stocks or bonds - I would describe myself as...',('Very experienced (≥ 10 years)','Experienced (8 - 10 years)','Somewhat experienced (4 - 7 years)','Somewhat inexperienced (< 4 years)','Very inexperienced (0)'))
57
 
58
  st.markdown('---')
59
  st.subheader('C. Risk Capacity')
60
- C1 = st.selectbox('My purpose of investing money is...',('For the long term wealth growth','For the long term revenue and growth','Periodic income','Income and security of investment funds','Security of investment funds'))
61
- C2 = st.selectbox('My current and future income sources (for example, salary, social security, pensions) are...',('Very stable','Stable','Somewhat stable','Unstable','Very unstable'))
62
- C3 = st.selectbox('How many percent of income that will be invested?', ('> 50%','> 25%-50%', '> 10%-25%','> 0% - 10%','0%'))
63
- C4 = st.selectbox('How many percent of loss investment that can be beared?',('> 50%','> 25%-50%', '> 10%-25%','> 0% - 10%','0%'))
64
 
65
  st.markdown('---')
66
  st.subheader('D. Risk Attitude')
67
- D1 = st.selectbox('From September 2022 through October 2022, bonds lost 4%. If I owned a bond investment that lost 4% in two months, I would...', ('Sell all the remaining investment','Sell a portion of the remaining investment','Hold onto the investment and sell nothing','Buy more of the remaining investment'))
68
- D2 = st.selectbox('The chart shows the greatest 1-year loss and the highest 1-year gain on 3 different hypothetical investments of $10,000.* Given the potential gain or loss in any 1 year, I would invest my money in...',('EITHER a loss of $0 OR a gain of $200','EITHER a loss of $200 OR a gain of $500','EITHER a loss of $800 OR a gain of $1,200','EITHER a loss of $2,000 OR a gain of $2,500'))
69
  image = Image.open('Range-Outcomes.png')
70
  st.image(image)
71
- D3 = st.selectbox('Investments with higher returns typically involve greater risk. The charts below show hypothetical annual returns (annual gains and losses) for four different investment portfolios over a 10 year period. Keeping in mind how the returns fluctuate, which investment portfolio would you be most comfortable holding?', ('Portfolio A', 'Portfolio B','Portfolio C','Portfolio D'))
72
  image = Image.open('image.png')
73
  st.image(image)
 
 
74
 
75
  submitted = st.form_submit_button('Submit')
76
 
 
48
 
49
  with st.form(key='form_parameters'):
50
  st.subheader('A. Investment Time Horizon')
51
+ A1 = st.radio('As I withdraw money from these investments, I plan to spend it over a period of...', ('10 years or more','7-9 years','4-6 years','1-3 years','Less than 1 year'))
52
+ A2 = st.radio('I plan to begin taking money from my investments in...',('10 years or more', '6-10 years','3-5 years','1-2 years','1 or less than a year'))
53
 
54
  st.markdown('---')
55
  st.subheader('B. Investment Knowlegde')
56
+ B1 = st.radio('When it comes to investing in stock or bond mutual funds or ETFs - or individual stocks or bonds - I would describe myself as...',('Very experienced (≥ 10 years)','Experienced (8 - 10 years)','Somewhat experienced (4 - 7 years)','Somewhat inexperienced (< 4 years)','Very inexperienced (0)'))
57
 
58
  st.markdown('---')
59
  st.subheader('C. Risk Capacity')
60
+ C1 = st.radio('My purpose of investing money is...',('For the long term wealth growth','For the long term revenue and growth','Periodic income','Income and security of investment funds','Security of investment funds'))
61
+ C2 = st.radio('My current and future income sources (for example, salary, social security, pensions) are...',('Very stable','Stable','Somewhat stable','Unstable','Very unstable'))
62
+ C3 = st.radio('How many percent of income that will be invested?', ('> 50%','> 25%-50%', '> 10%-25%','> 0% - 10%','0%'))
63
+ C4 = st.radio('How many percent of loss investment that can be beared?',('> 50%','> 25%-50%', '> 10%-25%','> 0% - 10%','0%'))
64
 
65
  st.markdown('---')
66
  st.subheader('D. Risk Attitude')
67
+ D1 = st.radio('From September 2022 through October 2022, bonds lost 4%. If I owned a bond investment that lost 4% in two months, I would...', ('Sell all the remaining investment','Sell a portion of the remaining investment','Hold onto the investment and sell nothing','Buy more of the remaining investment'))
 
68
  image = Image.open('Range-Outcomes.png')
69
  st.image(image)
70
+ D2 = st.radio('The chart shows the greatest 1-year loss and the highest 1-year gain on 3 different hypothetical investments of $10,000.* Given the potential gain or loss in any 1 year, I would invest my money in...',('EITHER a loss of $0 OR a gain of $200','EITHER a loss of $200 OR a gain of $500','EITHER a loss of $800 OR a gain of $1,200','EITHER a loss of $2,000 OR a gain of $2,500'))
71
  image = Image.open('image.png')
72
  st.image(image)
73
+ D3 = st.radio('Investments with higher returns typically involve greater risk. The charts below show hypothetical annual returns (annual gains and losses) for four different investment portfolios over a 10 year period. Keeping in mind how the returns fluctuate, which investment portfolio would you be most comfortable holding?', ('Portfolio A', 'Portfolio B','Portfolio C','Portfolio D'))
74
+
75
 
76
  submitted = st.form_submit_button('Submit')
77