cryman38 commited on
Commit
f798c5a
Β·
verified Β·
1 Parent(s): 77c2fa5

Upload 13 files

Browse files
app.py CHANGED
@@ -3,22 +3,18 @@ from interface.portfolio_rebalancing_interface import portfolio_rebalancing_inte
3
  from interface.compare_stock_prices_interface import compare_stock_prices_interface
4
  from interface.cost_averaging_interface import cost_averaging_interface
5
  from interface.retirement_planning_interface import retirement_planning_interface
6
- from interface.about_interface import render as render_about_tab, render_about_portfolio_accordion, render_about_compare_accordion, render_about_cost_averaging_accordion, render_about_retirement_planning_accordion
7
 
8
  with gr.Blocks(css='style.css') as demo:
9
  with gr.Column(elem_id="col-container"):
10
  with gr.Tabs():
11
  with gr.TabItem("Portfolio"):
12
- render_about_portfolio_accordion()
13
  portfolio_rebalancing_interface.render()
14
  with gr.TabItem("Compare"):
15
- render_about_compare_accordion()
16
  compare_stock_prices_interface.render()
17
  with gr.TabItem("Cost Averaging"):
18
- render_about_cost_averaging_accordion()
19
  cost_averaging_interface.render()
20
  with gr.TabItem("Retirement Planning"):
21
- render_about_retirement_planning_accordion()
22
  retirement_planning_interface.render()
23
  render_about_tab()
24
- demo.launch()
 
3
  from interface.compare_stock_prices_interface import compare_stock_prices_interface
4
  from interface.cost_averaging_interface import cost_averaging_interface
5
  from interface.retirement_planning_interface import retirement_planning_interface
6
+ from interface.about_interface import render as render_about_tab
7
 
8
  with gr.Blocks(css='style.css') as demo:
9
  with gr.Column(elem_id="col-container"):
10
  with gr.Tabs():
11
  with gr.TabItem("Portfolio"):
 
12
  portfolio_rebalancing_interface.render()
13
  with gr.TabItem("Compare"):
 
14
  compare_stock_prices_interface.render()
15
  with gr.TabItem("Cost Averaging"):
 
16
  cost_averaging_interface.render()
17
  with gr.TabItem("Retirement Planning"):
 
18
  retirement_planning_interface.render()
19
  render_about_tab()
20
+ demo.launch(share=True)
interface/about_interface.py CHANGED
@@ -1,7 +1,308 @@
1
  import gradio as gr
2
 
3
  def render():
4
- with gr.TabItem("πŸ’‘ Support Us"):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  gr.Markdown("""
6
  ## Support Us
7
  If you find this tool useful and would like to support the development of such projects, please consider making a donation. Your support is greatly appreciated.
@@ -14,306 +315,4 @@ def render():
14
  <img src="https://static.toss.im/logos/png/1x/logo-toss.png" alt="Donate with Toss" style="width: 150px;">
15
  </a>
16
 
17
- """)
18
-
19
- def render_about_portfolio_accordion():
20
- with gr.Accordion("πŸ’‘ About", open=False):
21
- with gr.Accordion("ν•œκ΅­μ–΄", open=False):
22
- gr.Markdown("""
23
- # 포트폴리였 λ¦¬λ°ΈλŸ°μ‹± 도ꡬ
24
-
25
- 이 λ„κ΅¬λŠ” νˆ¬μžμžλ“€μ΄ ν˜„μž¬ 보유 μžμ‚°μ„ λΆ„μ„ν•˜κ³  λͺ©ν‘œ 배뢄을 λ‹¬μ„±ν•˜κΈ° μœ„ν•΄ 맀수/맀도 쑰치λ₯Ό μ œμ•ˆν•˜μ—¬ 포트폴리였λ₯Ό μž¬μ‘°μ •ν•˜λŠ” 데 도움을 μ€λ‹ˆλ‹€. λ‹€μ–‘ν•œ 주식 μ½”λ“œ, 톡화 및 μ›ν•˜λŠ” λͺ©ν‘œ λΉ„μœ¨μ„ κ³ λ €ν•˜μ—¬ 포트폴리였λ₯Ό μ‘°μ •ν•˜λŠ” 방법에 λŒ€ν•œ μžμ„Έν•œ 정보λ₯Ό μ œκ³΅ν•©λ‹ˆλ‹€.
26
-
27
- ## μ£Όμš” κΈ°λŠ₯
28
- - **닀쀑 톡화 지원**: λͺ¨λ“  κΈˆμ•‘μ€ 메인 ν†΅ν™”λ‘œ λ³€ν™˜λ©λ‹ˆλ‹€.
29
- - **상세 뢄석**: ν˜„μž¬ 포트폴리였, 톡화 λ°°λΆ„ 및 λ¦¬λ°ΈλŸ°μ‹± ꢌμž₯ 사항을 ν‘œμ‹œν•©λ‹ˆλ‹€. λ¦¬λ°ΈλŸ°μ‹± κ³„μ‚°μ‹œ 1μ£Όλ‹¨μœ„λ‘œ κ³„μ‚°λ©λ‹ˆλ‹€.
30
-
31
- ## μ‚¬μš© 방법
32
- 1. **포트폴리였 μ„ΈλΆ€ 정보 μž…λ ₯**: μ§€μ •λœ ν˜•μ‹μœΌλ‘œ `μ£Όμ‹μ½”λ“œ 톡화 λ³΄μœ μˆ˜λŸ‰ λͺ©ν‘œλΉ„쀑`을 μž…λ ₯ν•©λ‹ˆλ‹€. μ’…λͺ©μ•ˆμ˜ ν•­λͺ©λ“€μ€ λ„μ–΄μ“°κΈ°λ‘œ κ΅¬λΆ„ν•©λ‹ˆλ‹€. μ—¬λŸ¬ 주식쒅λͺ©μ„ (,)둜 κ΅¬λΆ„ν•©λ‹ˆλ‹€.
33
- 2. **ν˜„κΈˆ κΈˆμ•‘ 및 λΉ„μœ¨ μ„€μ •**: μœ μ§€ν•˜λ €λŠ” ν˜„κΈˆ κΈˆμ•‘ 및 λΉ„μœ¨(%)을 μ§€μ •ν•©λ‹ˆλ‹€.
34
-
35
- ## 예제 μž…λ ₯
36
- ```
37
- AAPL USD 100 2,
38
- TSLA USD 50 1,
39
- 005930 KRW 200 3
40
- ```
41
- - `AAPL USD 100 2`: USD둜 된 Apple (AAPL) 주식 100μ£Ό, λͺ©ν‘œ 비쀑 2.
42
- - `TSLA USD 50 1`: USD둜 된 Tesla (TSLA) 주식 50μ£Ό, λͺ©ν‘œ 비쀑 1.
43
- - `005930 KRW 200 3`: KRW둜 된 μ‚Όμ„±μ „μž (005930) 주식 200μ£Ό, λͺ©ν‘œ 비쀑 3.
44
-
45
- ## μ€‘μš” 사항
46
- - 주식 μ½”λ“œμ™€ 톡화 μ½”λ“œκ°€ μœ νš¨ν•œμ§€ ν™•μΈν•˜μ„Έμš”.
47
- - 이 λ„κ΅¬λŠ” 주가와 ν™˜μœ¨μ˜ μ‹€μ‹œκ°„ 데이터λ₯Ό μ‚¬μš©ν•˜λ―€λ‘œ 인터넷 연결이 ν•„μš”ν•©λ‹ˆλ‹€.
48
- - Yahoo Finance 및 FinanceDataReader의 데이터λ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€.
49
-
50
-
51
- ## λ©΄μ±… μ‘°ν•­
52
- 이 λ„κ΅¬μ—μ„œ μ œκ³΅ν•˜λŠ” μ •λ³΄λŠ” 일반적인 정보 제곡 λͺ©μ λ§Œμ„ μœ„ν•΄ μ œκ³΅λ©λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ λͺ¨λ“  μ •λ³΄λŠ” μ„ μ˜λ‘œ μ œκ³΅λ˜μ§€λ§Œ, μ‚¬μ΄νŠΈμ˜ μ •λ³΄μ˜ μ •ν™•μ„±, μ μ ˆμ„±, μœ νš¨μ„±, μ‹ λ’°μ„±, κ°€μš©μ„± λ˜λŠ” 완전성에 λŒ€ν•΄ λͺ…μ‹œμ μ΄λ“  λ¬΅μ‹œμ μ΄λ“  μ–΄λ– ν•œ μ’…λ₯˜μ˜ μ§„μˆ μ΄λ‚˜ 보증을 ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ μ‚¬μš©κ³Ό μ‚¬μ΄νŠΈμ˜ 정보λ₯Ό μ‹ λ’°ν•˜λŠ” 것은 μ „μ μœΌλ‘œ μ‚¬μš©μžμ˜ μ±…μž„μž…λ‹ˆλ‹€.
53
- """)
54
-
55
- with gr.Accordion("English", open=False):
56
- gr.Markdown("""
57
- # Portfolio Rebalancing Tool
58
-
59
- This tool helps investors rebalance their portfolios by analyzing their current holdings and suggesting buy/sell actions to achieve target allocations. It provides detailed information on how to adjust the portfolio, considering various stock codes, currencies, and desired target ratios.
60
-
61
- ## Key Features
62
- - **Multi-currency Support**: All amounts are converted to the main currency.
63
- - **Detailed Analysis**: Displays current portfolio, currency allocation, and rebalancing recommendations. Rebalancing is calculated on a per-share basis.
64
-
65
- ## How to Use
66
- 1. **Enter Portfolio Details**: Enter `stock code currency quantity target ratio` in the specified format. Separate items within a stock with spaces. Separate multiple stock items with commas.
67
- 2. **Set Cash Amount and Ratio**: Specify the cash amount and ratio (%) you want to maintain.
68
-
69
- ## Example Input
70
- ```
71
- AAPL USD 100 2,
72
- TSLA USD 50 1,
73
- 005930 KRW 200 3
74
- ```
75
- - `AAPL USD 100 2`: 100 shares of Apple (AAPL) in USD, target ratio 2.
76
- - `TSLA USD 50 1`: 50 shares of Tesla (TSLA) in USD, target ratio 1.
77
- - `005930 KRW 200 3`: 200 shares of Samsung Electronics (005930) in KRW, target ratio 3.
78
-
79
- ## Important Notes
80
- - Ensure stock codes and currency codes are valid.
81
- - This tool requires an internet connection as it uses real-time stock prices and exchange rates.
82
- - Data is sourced from Yahoo Finance and FinanceDataReader.
83
-
84
- ## Disclaimer
85
- The information provided by this tool is for general informational purposes only. All information on the site is provided in good faith, but we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability, or completeness of any information on the site. Your use of the site and reliance on any information on the site is solely at your own risk.
86
- """)
87
-
88
- def render_about_compare_accordion():
89
- with gr.Accordion("πŸ’‘ About", open=False):
90
- with gr.Accordion("ν•œκ΅­μ–΄", open=False):
91
- gr.Markdown("""
92
- # 주식 κ·Έλž˜ν”„ 비ꡐ 도ꡬ
93
-
94
- 이 λ„κ΅¬λŠ” μ‚¬μš©μžκ°€ μ§€μ •ν•œ κΈ°κ°„ λ™μ•ˆ μ—¬λŸ¬ νšŒμ‚¬μ˜ μƒλŒ€ μ£Όκ°€λ₯Ό 비ꡐ할 수 μžˆλ„λ‘ ν•©λ‹ˆλ‹€. 역사적인 μ£Όκ°€λ₯Ό 가져와 μƒλŒ€ μ„±λŠ₯을 보여주도둝 μ •μƒν™”ν•˜κ³  비ꡐ κ·Έλž˜ν”„λ₯Ό μƒμ„±ν•©λ‹ˆλ‹€.
95
-
96
- ## μ£Όμš” κΈ°λŠ₯
97
- - **주식 비ꡐ**: μ‚¬μš©μžκ°€ μ •μ˜ν•œ κΈ°κ°„ λ™μ•ˆ μ—¬λŸ¬ μ£Όμ‹μ˜ μ„±λŠ₯을 λΉ„κ΅ν•©λ‹ˆλ‹€.
98
- - **μƒλŒ€μ  가격비ꡐ**: 가격을 λ™μΌν•œ κΈ°μ€€μ„ μ—μ„œ μ‹œμž‘ν•˜λŠ” μƒλŒ€μ μΈ λ³€ν™”λ₯Ό 보여주도둝 ν•©λ‹ˆλ‹€.
99
-
100
- ## μ‚¬μš© 방법
101
- 1. **주식 μ½”λ“œ μž…λ ₯**: μ‰Όν‘œλ‘œ κ΅¬λΆ„λœ 주식 μ½”λ“œ λͺ©λ‘μ„ μ œκ³΅ν•©λ‹ˆλ‹€ (예: `AAPL, GOOGL, TSLA`).
102
- 2. **λ‚ μ§œ 수 μ§€μ •**: μ£Όκ°€λ₯Ό 비ꡐ할 κΈ°κ°„μ˜ λ‚ μ§œ 수λ₯Ό μž…λ ₯ν•©λ‹ˆλ‹€.
103
- 3. **좜λ ₯**: μ£Όκ°€λ₯Ό 가져와 비ꡐ κ·Έλž˜ν”„λ₯Ό ν‘œμ‹œν•©λ‹ˆλ‹€.
104
-
105
- ## 예제 μž…λ ₯
106
- - `주식 μ½”λ“œ`: AAPL, GOOGL, TSLA
107
- - `λ‚ μ§œ 수`: 30
108
-
109
- ## 예제 좜λ ₯
110
- - Apple (AAPL), Google (GOOGL), Tesla (TSLA)의 졜근 30μΌκ°„μ˜ μƒλŒ€ μ£Όκ°€λ₯Ό λΉ„κ΅ν•˜λŠ” κ·Έλž˜ν”„.
111
-
112
- ## μ€‘μš” 사항
113
- - λͺ¨λ“  주식 μ½”λ“œκ°€ μœ νš¨ν•˜κ³  데이터 μ†ŒμŠ€μ—μ„œ μ§€μ›ν•˜λŠ”μ§€ ν™•μΈν•˜μ„Έμš”.
114
- - λ„κ΅¬λŠ” μ˜μ—…μΌ κΈ°μ€€μœΌλ‘œ 데이터λ₯Ό κ°€μ Έμ˜€λ―€λ‘œ 주말 및 κ³΅νœ΄μΌμ€ μ œμ™Έλ©λ‹ˆλ‹€.
115
- - 이 λ„κ΅¬λŠ” μ£Όκ°€ 데이터λ₯Ό μ‚¬μš©ν•˜λ―€λ‘œ 인터넷 연결이 ν•„μš”ν•©λ‹ˆλ‹€.
116
- - FinanceDataReaderλ₯Ό μ‚¬μš©ν•˜μ—¬ μ£Όκ°€ 데이터λ₯Ό κ°€μ Έμ˜΅λ‹ˆλ‹€.
117
- - κ·Έλž˜ν”½ μ‹œκ°ν™”λ₯Ό μœ„ν•΄ matplotlib을 μ‚¬μš©ν•˜μ—¬ κ°œλ°œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.
118
-
119
- ## λ©΄μ±… μ‘°ν•­
120
- 이 λ„κ΅¬μ—μ„œ μ œκ³΅ν•˜λŠ” μ •λ³΄λŠ” 일반적인 정보 제곡 λͺ©μ λ§Œμ„ μœ„ν•΄ μ œκ³΅λ©λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ λͺ¨λ“  μ •λ³΄λŠ” μ„ μ˜λ‘œ μ œκ³΅λ˜μ§€λ§Œ, μ‚¬μ΄νŠΈμ˜ μ •λ³΄μ˜ μ •ν™•μ„±, μ μ ˆμ„±, μœ νš¨μ„±, μ‹ λ’°μ„±, κ°€μš©μ„± λ˜λŠ” 완전성에 λŒ€ν•΄ λͺ…μ‹œμ μ΄λ“  λ¬΅μ‹œμ μ΄λ“  μ–΄λ– ν•œ μ’…λ₯˜μ˜ μ§„μˆ μ΄λ‚˜ 보증을 ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ μ‚¬μš©κ³Ό μ‚¬μ΄νŠΈμ˜ 정보λ₯Ό μ‹ λ’°ν•˜λŠ” 것은 μ „μ μœΌλ‘œ μ‚¬μš©μžμ˜ μ±…μž„μž…λ‹ˆλ‹€.
121
- """)
122
-
123
- with gr.Accordion("English", open=False):
124
- gr.Markdown("""
125
- # Stock Comparison Tool
126
-
127
- This tool allows users to compare the relative prices of multiple companies over a specified period. It fetches historical stock prices, normalizes them to show relative performance, and generates a comparison graph.
128
-
129
- ## Key Features
130
- - **Stock Comparison**: Compare the performance of multiple stocks over a user-defined period.
131
- - **Relative Price Comparison**: Shows relative changes starting from the same baseline.
132
-
133
- ## How to Use
134
- 1. **Enter Stock Codes**: Provide a comma-separated list of stock codes (e.g., `AAPL, GOOGL, TSLA`).
135
- 2. **Specify Number of Days**: Enter the number of days for the comparison period.
136
- 3. **Output**: Fetches stock prices and displays a comparison graph.
137
-
138
- ## Example Input
139
- - `Stock Codes`: AAPL, GOOGL, TSLA
140
- - `Number of Days`: 30
141
-
142
- ## Example Output
143
- - A graph comparing the relative stock prices of Apple (AAPL), Google (GOOGL), and Tesla (TSLA) over the last 30 days.
144
-
145
- ## Important Notes
146
- - Ensure all stock codes are valid and supported by the data source.
147
- - The tool fetches data based on trading days, excluding weekends and holidays.
148
- - An internet connection is required as the tool uses stock price data.
149
- - Data is sourced from FinanceDataReader.
150
- - Developed using matplotlib for graphical visualization.
151
-
152
- ## Disclaimer
153
- The information provided by this tool is for general informational purposes only. All information on the site is provided in good faith, but we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability, or completeness of any information on the site. Your use of the site and reliance on any information on the site is solely at your own risk.
154
- """)
155
-
156
-
157
- def render_about_cost_averaging_accordion():
158
- with gr.Accordion("πŸ’‘ About", open=False):
159
- with gr.Accordion("ν•œκ΅­μ–΄", open=False):
160
- gr.Markdown("""
161
- # 물타기 계산 도ꡬ
162
-
163
- 이 λ„κ΅¬λŠ” νˆ¬μžμžκ°€ λ‹€λ₯Έ κ°€κ²©μœΌλ‘œ μΆ”κ°€ 주식을 λ§€μˆ˜ν•œ ν›„ μƒˆλ‘œμš΄ 평균 맀수 단가와 수읡λ₯ μ„ κ³„μ‚°ν•˜λŠ” 데 도움을 μ€λ‹ˆλ‹€. μƒˆλ‘œμš΄ νˆ¬μžκ°€ 전체 λΉ„μš© 기반과 잠재적 μˆ˜μ΅μ— λ―ΈμΉ˜λŠ” 영ν–₯을 μ΄ν•΄ν•˜λŠ” 데 μœ μš©ν•©λ‹ˆλ‹€.
164
-
165
- ## μ‚¬μš© 방법
166
- 1. **ν˜„μž¬ 투자 μ„ΈλΆ€ 정보 μž…λ ₯**: λ³΄μœ ν•œ μ£Όμ‹μ˜ 평균 가격과 μˆ˜λŸ‰μ„ μ œκ³΅ν•©λ‹ˆλ‹€.
167
- 2. **μƒˆλ‘œμš΄ 맀수 μ„ΈλΆ€ 정보 μž…λ ₯**: λ§€μˆ˜ν•˜λ €λŠ” μ£Όμ‹μ˜ 가격과 μˆ˜λŸ‰μ„ μ œκ³΅ν•©λ‹ˆλ‹€.
168
- 3. **좜λ ₯**: λ„κ΅¬λŠ” μƒˆλ‘œμš΄ 평균 가격, 총 μˆ˜λŸ‰, μΆ”κ°€ νˆ¬μžμ•‘, 총 νˆ¬μžμ•‘ 및 μƒˆλ‘œμš΄ 수읡λ₯ μ„ κ³„μ‚°ν•˜κ³  ν‘œμ‹œν•©λ‹ˆλ‹€.
169
-
170
- ## 예제 μž…λ ₯
171
- - `이전 평균 가격`: 100
172
- - `이전 μˆ˜λŸ‰`: 50
173
- - `μƒˆλ‘œμš΄ 가격`: 120
174
- - `μƒˆλ‘œμš΄ μˆ˜λŸ‰`: 30
175
-
176
- ## 예제 좜λ ₯
177
- - `수읡λ₯ `: 11.1%
178
- - `μƒˆλ‘œμš΄ 평균 가격`: 108
179
- - `총 μˆ˜λŸ‰`: 80
180
- - `μΆ”κ°€ 투자금`: 3600
181
- - `총 투자금`: 8640
182
-
183
- ## μ€‘μš” 사항
184
- - λͺ¨λ“  μž…λ ₯이 μœ νš¨ν•œ μˆ«μžμΈμ§€ ν™•μΈν•˜μ„Έμš”.
185
- - λ„κ΅¬λŠ” 이전 및 μƒˆλ‘œμš΄ 투자의 가쀑 평균을 기반으둜 μƒˆλ‘œμš΄ 평균 가격을 κ³„μ‚°ν•©λ‹ˆλ‹€.
186
- - μ‚¬μš©ν•˜κΈ° μ‰¬μš΄ μ‚¬μš©μž μΈν„°νŽ˜μ΄μŠ€ 생성을 μœ„ν•΄ Gradioλ₯Ό μ‚¬μš©ν•˜μ—¬ κ°œλ°œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.
187
- - μ‹€μ‹œκ°„ 계산 및 즉각적인 ν”Όλ“œλ°±μ„ μ§€μ›ν•©λ‹ˆλ‹€.
188
-
189
- ## λ©΄μ±… μ‘°ν•­
190
- 이 λ„κ΅¬μ—μ„œ μ œκ³΅ν•˜λŠ” μ •λ³΄λŠ” 일반적인 정보 제곡 λͺ©μ λ§Œμ„ μœ„ν•΄ μ œκ³΅λ©λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ λͺ¨λ“  μ •λ³΄λŠ” μ„ μ˜λ‘œ μ œκ³΅λ˜μ§€λ§Œ, μ‚¬μ΄νŠΈμ˜ μ •λ³΄μ˜ μ •ν™•μ„±, μ μ ˆμ„±, μœ νš¨μ„±, μ‹ λ’°μ„±, κ°€μš©μ„± λ˜λŠ” 완전성에 λŒ€ν•΄ λͺ…μ‹œμ μ΄λ“  λ¬΅μ‹œμ μ΄λ“  μ–΄λ– ν•œ μ’…λ₯˜μ˜ μ§„μˆ μ΄λ‚˜ 보증을 ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ μ‚¬μš©κ³Ό μ‚¬μ΄νŠΈμ˜ 정보λ₯Ό μ‹ λ’°ν•˜λŠ” 것은 μ „μ μœΌλ‘œ μ‚¬μš©μžμ˜ μ±…μž„μž…λ‹ˆλ‹€.
191
- """)
192
-
193
- with gr.Accordion("English", open=False):
194
- gr.Markdown("""
195
- # Cost Averaging Calculator
196
-
197
- This tool helps investors calculate the new average purchase price and yield after purchasing additional shares at different prices. It is useful for understanding the impact of new investments on the overall cost basis and potential returns.
198
-
199
- ## How to Use
200
- 1. **Enter Current Investment Details**: Provide the average price and quantity of the shares you hold.
201
- 2. **Enter New Purchase Details**: Provide the price and quantity of the shares you want to purchase.
202
- 3. **Output**: The tool calculates and displays the new average price, total quantity, additional investment amount, total investment amount, and new yield.
203
-
204
- ## Example Input
205
- - `Previous Average Price`: 100
206
- - `Previous Quantity`: 50
207
- - `New Price`: 120
208
- - `New Quantity`: 30
209
-
210
- ## Example Output
211
- - `Return`: 11.1%
212
- - `New Average Price`: 108
213
- - `Total Quantity`: 80
214
- - `Additional Investment Amount`: 3600
215
- - `Total Investment Amount`: 8640
216
-
217
- ## Important Notes
218
- - Ensure all inputs are valid numbers.
219
- - The tool calculates the new average price based on the weighted average of previous and new investments.
220
- - Developed using Gradio for an easy-to-use user interface.
221
- - Supports real-time calculations and instant feedback.
222
-
223
- ## Disclaimer
224
- The information provided by this tool is for general informational purposes only. All information on the site is provided in good faith, but we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability, or completeness of any information on the site. Your use of the site and reliance on any information on the site is solely at your own risk.
225
- """)
226
-
227
- def render_about_retirement_planning_accordion():
228
- with gr.Accordion("πŸ’‘ About", open=False):
229
- with gr.Accordion("ν•œκ΅­μ–΄", open=False):
230
- gr.Markdown("""
231
- # 은퇴 κ³„νš 도ꡬ
232
-
233
- 이 λ„κ΅¬λŠ” 개인이 은퇴 μ‹œμ κΉŒμ§€ 투자 μ„±μž₯κ³Ό 은퇴 ν›„ λ°°λ‹Ή μ†Œλ“μ„ μ˜ˆμΈ‘ν•˜μ—¬ 은퇴 κ³„νšμ„ μ„Έμš°λŠ” 데 도움을 μ€λ‹ˆλ‹€. 초기 투자금, μ›”κ°„ 투자금, 은퇴 μ „ν›„μ˜ 투자 수읡λ₯  (ROI) 및 λ°°λ‹Ή 수읡λ₯ κ³Ό 같은 λ‹€μ–‘ν•œ μš”μΈμ„ κ³ λ €ν•©λ‹ˆλ‹€.
234
-
235
- ## μ£Όμš” κΈ°λŠ₯
236
- - **μœ μ—°ν•œ μž…λ ₯**: μ‚¬μš©μžλŠ” ν˜„μž¬ λ‚˜μ΄, 은퇴 λ‚˜μ΄, ν˜„μž¬ νˆ¬μžμ•‘, μ›”κ°„ νˆ¬μžμ•‘, ROI, λ°°λ‹Ή 수읡λ₯  및 κΈ°λŒ€ 수λͺ…을 μž…λ ₯ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
237
- - **상세 예츑**: λ„κ΅¬λŠ” 은퇴 μ‹œ 총 투자 κ°€μΉ˜, μ˜ˆμƒ μ—°κ°„ 및 μ›”κ°„ λ°°λ‹Ή μ†Œλ“, 은퇴 ν›„ 투자 μ„±μž₯ 및 λ°°λ‹Ή μ†Œλ“μ„ κ³„μ‚°ν•©λ‹ˆλ‹€.
238
- - **재투자 μ˜΅μ…˜**: μ‚¬μš©μžλŠ” 은퇴 μ „ λ°°λ‹ΉκΈˆμ„ μž¬νˆ¬μžν•˜μ—¬ 볡리 μ„±μž₯을 선택할 수 μžˆμŠ΅λ‹ˆλ‹€.
239
-
240
- ## μ‚¬μš© 방법
241
- 1. **ν˜„μž¬ μ„ΈλΆ€ 사항 μž…λ ₯**: ν˜„μž¬ λ‚˜μ΄, 은퇴 λ‚˜μ΄, ν˜„μž¬ νˆ¬μžμ•‘ 및 μ›”κ°„ νˆ¬μžμ•‘μ„ μ œκ³΅ν•©λ‹ˆλ‹€.
242
- 2. **투자 수읡λ₯  μ§€μ •**: 은퇴 μ „ν›„μ˜ μ˜ˆμƒ ROI 및 λ°°λ‹Ή 수읡λ₯ μ„ μž…λ ₯ν•©λ‹ˆλ‹€.
243
- 3. **재투자 μ˜΅μ…˜ 선택**: 은퇴 μ „ λ°°λ‹ΉκΈˆμ„ μž¬νˆ¬μžν• μ§€ μ„ νƒν•©λ‹ˆλ‹€.
244
- 4. **κΈ°λŒ€ 수λͺ… μ„€μ •**: κΈ°λŒ€ 수λͺ…을 μž…λ ₯ν•©λ‹ˆλ‹€.
245
- 5. **좜λ ₯**: λ„κ΅¬λŠ” 은퇴 μ‹œ 총 투자 κ°€μΉ˜, μ—°κ°„ 및 μ›”κ°„ λ°°λ‹Ή μ†Œλ“, 은퇴 ν›„ 투자 μ„±μž₯ 및 λ°°λ‹Ή μ†Œλ“μ„ κ³„μ‚°ν•˜κ³  ν‘œμ‹œν•©λ‹ˆλ‹€.
246
-
247
- ## 예제 μž…λ ₯
248
- - `ν˜„μž¬ λ‚˜μ΄`: 30
249
- - `은퇴 λ‚˜μ΄`: 65
250
- - `초기 투자금`: 50000
251
- - `μ›”κ°„ 투자금`: 500
252
- - `은퇴 μ „ ROI`: 7%
253
- - `은퇴 ν›„ ROI`: 5%
254
- - `은퇴 μ „ λ°°λ‹Ή 수읡λ₯ `: 2%
255
- - `은퇴 ν›„ λ°°λ‹Ή 수읡λ₯ `: 3%
256
- - `λ°°λ‹ΉκΈˆ 재투자`: 예
257
- - `κΈ°λŒ€ 수λͺ…`: 85
258
-
259
- ## 예제 좜λ ₯
260
- - `은퇴 μ‹œ 총 κΈˆμ•‘`: 500,000
261
- - `은퇴 μ‹œ μ—°κ°„ λ°°λ‹Ή μ†Œλ“`: 10,000
262
- - `은퇴 μ‹œ μ›”κ°„ λ°°λ‹Ή μ†Œλ“`: 833
263
- - `은퇴 ν›„ 투자 μ„±μž₯ 및 λ°°λ‹Ή μ†Œλ“`: 은퇴 ν›„ λ§€λ…„ 상세 ν‘œ ν˜•μ‹μœΌλ‘œ 제곡.
264
-
265
- ## μ€‘μš” 사항
266
- - λͺ¨λ“  μž…λ ₯이 μœ νš¨ν•œ μˆ«μžμΈμ§€ ν™•μΈν•˜μ„Έμš”.
267
- - λ„κ΅¬λŠ” 은퇴 ν›„ μΆ”κ°€ νˆ¬μžλ‚˜ λ°°λ‹ΉκΈˆ 재투자λ₯Ό κ°€μ •ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.
268
- - μ‚¬μš©ν•˜κΈ° μ‰¬μš΄ μ‚¬μš©μž μΈν„°νŽ˜μ΄μŠ€ 생성을 μœ„ν•΄ Gradioλ₯Ό μ‚¬μš©ν•˜μ—¬ κ°œλ°œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.
269
- - μƒμ„Έν•œ 은퇴 κ³„νš 예츑과 즉각적인 ν”Όλ“œλ°±μ„ μ§€μ›ν•©λ‹ˆλ‹€.
270
-
271
- ## λ©΄μ±… μ‘°ν•­
272
- 이 λ„κ΅¬μ—μ„œ μ œκ³΅ν•˜λŠ” μ •λ³΄λŠ” 일반적인 정보 제곡 λͺ©μ λ§Œμ„ μœ„ν•΄ μ œκ³΅λ©λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ λͺ¨λ“  μ •λ³΄λŠ” μ„ μ˜λ‘œ μ œκ³΅λ˜μ§€λ§Œ, μ‚¬μ΄νŠΈμ˜ μ •λ³΄μ˜ μ •ν™•μ„±, μ μ ˆμ„±, μœ νš¨μ„±, μ‹ λ’°μ„±, κ°€μš©μ„± λ˜λŠ” 완전성에 λŒ€ν•΄ λͺ…μ‹œμ μ΄λ“  λ¬΅μ‹œμ μ΄λ“  μ–΄λ– ν•œ μ’…λ₯˜μ˜ μ§„μˆ μ΄λ‚˜ 보증을 ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ μ‚¬μš©κ³Ό μ‚¬μ΄νŠΈμ˜ 정보λ₯Ό μ‹ λ’°ν•˜λŠ” 것은 μ „μ μœΌλ‘œ μ‚¬μš©μžμ˜ μ±…μž„μž…λ‹ˆλ‹€.
273
- """)
274
-
275
- with gr.Accordion("English", open=False):
276
- gr.Markdown("""
277
- # Retirement Planning Tool
278
-
279
- This tool helps individuals plan for retirement by predicting investment growth and dividend income up to the retirement date and beyond. It considers various factors such as initial investment, monthly contributions, ROI before and after retirement, and dividend yield.
280
-
281
- ## Key Features
282
- - **Flexible Input**: Users can enter their current age, retirement age, current investment amount, monthly contribution, ROI, dividend yield, and life expectancy.
283
- - **Detailed Projections**: The tool calculates and displays total investment value at retirement, expected annual and monthly dividend income, investment growth, and dividend income after retirement.
284
- - **Reinvestment Option**: Users can choose to reinvest dividends before retirement for compounded growth.
285
-
286
- ## How to Use
287
- 1. **Enter Current Details**: Provide current age, retirement age, current investment amount, and monthly contribution.
288
- 2. **Specify ROI**: Enter the expected ROI and dividend yield before and after retirement.
289
- 3. **Select Reinvestment Option**: Choose whether to reinvest dividends before retirement.
290
- 4. **Set Life Expectancy**: Enter your expected life expectancy.
291
- 5. **Output**: The tool calculates and displays total investment value at retirement, annual and monthly dividend income, and investment growth and dividend income after retirement.
292
-
293
- ## Example Input
294
- - `Current Age`: 30
295
- - `Retirement Age`: 65
296
- - `Initial Investment`: 50000
297
- - `Monthly Contribution`: 500
298
- - `Pre-Retirement ROI`: 7%
299
- - `Post-Retirement ROI`: 5%
300
- - `Pre-Retirement Dividend Yield`: 2%
301
- - `Post-Retirement Dividend Yield`: 3%
302
- - `Dividend Reinvestment`: Yes
303
- - `Life Expectancy`: 85
304
-
305
- ## Example Output
306
- - `Total Amount at Retirement`: 500,000
307
- - `Annual Dividend Income at Retirement`: 10,000
308
- - `Monthly Dividend Income at Retirement`: 833
309
- - `Post-Retirement Investment Growth and Dividend Income`: Detailed annually in tabular format.
310
-
311
- ## Important Notes
312
- - Ensure all inputs are valid numbers.
313
- - The tool assumes no additional investments or dividend reinvestments after retirement.
314
- - Developed using Gradio for an easy-to-use user interface.
315
- - Supports detailed retirement planning projections and instant feedback.
316
-
317
- ## Disclaimer
318
- The information provided by this tool is for general informational purposes only. All information on the site is provided in good faith, but we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability, or completeness of any information on the site. Your use of the site and reliance on any information on the site is solely at your own risk.
319
- """)
 
1
  import gradio as gr
2
 
3
  def render():
4
+ with gr.TabItem("πŸ’‘ How To Use"):
5
+ gr.Markdown("## How To Use:")
6
+ with gr.Accordion("πŸ”₯ Portfolio", open=False):
7
+ with gr.Accordion("ν•œκ΅­μ–΄", open=False):
8
+ gr.Markdown("""
9
+ # 포트폴리였 λ¦¬λ°ΈλŸ°μ‹± 도ꡬ
10
+
11
+ 이 λ„κ΅¬λŠ” νˆ¬μžμžλ“€μ΄ ν˜„μž¬ 보유 μžμ‚°μ„ λΆ„μ„ν•˜κ³  λͺ©ν‘œ 배뢄을 λ‹¬μ„±ν•˜κΈ° μœ„ν•΄ 맀수/맀도 쑰치λ₯Ό μ œμ•ˆν•˜μ—¬ 포트폴리였λ₯Ό μž¬μ‘°μ •ν•˜λŠ” 데 도움을 μ€λ‹ˆλ‹€. λ‹€μ–‘ν•œ 주식 μ½”λ“œ, 톡화 및 μ›ν•˜λŠ” λͺ©ν‘œ λΉ„μœ¨μ„ κ³ λ €ν•˜μ—¬ 포트폴리였λ₯Ό μ‘°μ •ν•˜λŠ” 방법에 λŒ€ν•œ μžμ„Έν•œ 정보λ₯Ό μ œκ³΅ν•©λ‹ˆλ‹€.
12
+
13
+ ## μ£Όμš” κΈ°λŠ₯
14
+ - **닀쀑 톡화 지원**: λͺ¨λ“  κΈˆμ•‘μ€ 메인 ν†΅ν™”λ‘œ λ³€ν™˜λ©λ‹ˆλ‹€.
15
+ - **상세 뢄석**: ν˜„μž¬ 포트폴리였, 톡화 λ°°λΆ„ 및 λ¦¬λ°ΈλŸ°μ‹± ꢌμž₯ 사항을 ν‘œμ‹œν•©λ‹ˆλ‹€. λ¦¬λ°ΈλŸ°μ‹± κ³„μ‚°μ‹œ 1μ£Όλ‹¨μœ„λ‘œ κ³„μ‚°λ©λ‹ˆλ‹€.
16
+
17
+ ## μ‚¬μš© 방법
18
+ 1. **포트폴리였 μ„ΈλΆ€ 정보 μž…λ ₯**: μ§€μ •λœ ν˜•μ‹μœΌλ‘œ `μ£Όμ‹μ½”λ“œ 톡화 λ³΄μœ μˆ˜λŸ‰ λͺ©ν‘œλΉ„쀑`을 μž…λ ₯ν•©λ‹ˆλ‹€. μ’…λͺ©μ•ˆμ˜ ν•­λͺ©λ“€μ€ λ„μ–΄μ“°κΈ°λ‘œ κ΅¬λΆ„ν•©λ‹ˆλ‹€. μ—¬λŸ¬ 주식쒅λͺ©μ„ (,)둜 κ΅¬λΆ„ν•©λ‹ˆλ‹€.
19
+ 2. **ν˜„κΈˆ κΈˆμ•‘ 및 λΉ„μœ¨ μ„€μ •**: μœ μ§€ν•˜λ €λŠ” ν˜„κΈˆ κΈˆμ•‘ 및 λΉ„μœ¨(%)을 μ§€μ •ν•©λ‹ˆλ‹€.
20
+
21
+ ## 예제 μž…λ ₯
22
+ ```
23
+ AAPL USD 100 2,
24
+ TSLA USD 50 1,
25
+ 005930 KRW 200 3
26
+ ```
27
+ - `AAPL USD 100 2`: USD둜 된 Apple (AAPL) 주식 100μ£Ό, λͺ©ν‘œ 비쀑 2.
28
+ - `TSLA USD 50 1`: USD둜 된 Tesla (TSLA) 주식 50μ£Ό, λͺ©ν‘œ 비쀑 1.
29
+ - `005930 KRW 200 3`: KRW둜 된 μ‚Όμ„±μ „μž (005930) 주식 200μ£Ό, λͺ©ν‘œ 비쀑 3.
30
+
31
+ ## μ€‘μš” 사항
32
+ - 주식 μ½”λ“œμ™€ 톡화 μ½”λ“œκ°€ μœ νš¨ν•œμ§€ ν™•μΈν•˜μ„Έμš”.
33
+ - 이 λ„κ΅¬λŠ” 주가와 ν™˜μœ¨μ˜ μ‹€μ‹œκ°„ 데이터λ₯Ό μ‚¬μš©ν•˜λ―€λ‘œ 인터넷 연결이 ν•„μš”ν•©λ‹ˆλ‹€.
34
+ - Yahoo Finance 및 FinanceDataReader의 데이터λ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€.
35
+
36
+
37
+ ## λ©΄μ±… μ‘°ν•­
38
+ 이 λ„κ΅¬μ—μ„œ μ œκ³΅ν•˜λŠ” μ •λ³΄λŠ” 일반적인 정보 제곡 λͺ©μ λ§Œμ„ μœ„ν•΄ μ œκ³΅λ©λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ λͺ¨λ“  μ •λ³΄λŠ” μ„ μ˜λ‘œ μ œκ³΅λ˜μ§€λ§Œ, μ‚¬μ΄νŠΈμ˜ μ •λ³΄μ˜ μ •ν™•μ„±, μ μ ˆμ„±, μœ νš¨μ„±, μ‹ λ’°μ„±, κ°€μš©μ„± λ˜λŠ” 완전성에 λŒ€ν•΄ λͺ…μ‹œμ μ΄λ“  λ¬΅μ‹œμ μ΄λ“  μ–΄λ– ν•œ μ’…λ₯˜μ˜ μ§„μˆ μ΄λ‚˜ 보증을 ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ μ‚¬μš©κ³Ό μ‚¬μ΄νŠΈμ˜ 정보λ₯Ό μ‹ λ’°ν•˜λŠ” 것은 μ „μ μœΌλ‘œ μ‚¬μš©μžμ˜ μ±…μž„μž…λ‹ˆλ‹€.
39
+ """)
40
+
41
+ with gr.Accordion("English", open=False):
42
+ gr.Markdown("""
43
+ # Portfolio Rebalancing Tool
44
+
45
+ This tool helps investors rebalance their portfolios by analyzing their current holdings and suggesting buy/sell actions to achieve target allocations. It provides detailed information on how to adjust the portfolio, considering various stock codes, currencies, and desired target ratios.
46
+
47
+ ## Key Features
48
+ - **Multi-currency Support**: All amounts are converted to the main currency.
49
+ - **Detailed Analysis**: Displays current portfolio, currency allocation, and rebalancing recommendations. Rebalancing is calculated on a per-share basis.
50
+
51
+ ## How to Use
52
+ 1. **Enter Portfolio Details**: Enter `stock code currency quantity target ratio` in the specified format. Separate items within a stock with spaces. Separate multiple stock items with commas.
53
+ 2. **Set Cash Amount and Ratio**: Specify the cash amount and ratio (%) you want to maintain.
54
+
55
+ ## Example Input
56
+ ```
57
+ AAPL USD 100 2,
58
+ TSLA USD 50 1,
59
+ 005930 KRW 200 3
60
+ ```
61
+ - `AAPL USD 100 2`: 100 shares of Apple (AAPL) in USD, target ratio 2.
62
+ - `TSLA USD 50 1`: 50 shares of Tesla (TSLA) in USD, target ratio 1.
63
+ - `005930 KRW 200 3`: 200 shares of Samsung Electronics (005930) in KRW, target ratio 3.
64
+
65
+ ## Important Notes
66
+ - Ensure stock codes and currency codes are valid.
67
+ - This tool requires an internet connection as it uses real-time stock prices and exchange rates.
68
+ - Data is sourced from Yahoo Finance and FinanceDataReader.
69
+
70
+ ## Disclaimer
71
+ The information provided by this tool is for general informational purposes only. All information on the site is provided in good faith, but we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability, or completeness of any information on the site. Your use of the site and reliance on any information on the site is solely at your own risk.
72
+ """)
73
+
74
+ with gr.Accordion("πŸ“ˆ Compare", open=False):
75
+ with gr.Accordion("ν•œκ΅­μ–΄", open=False):
76
+ gr.Markdown("""
77
+ # 주식 κ·Έλž˜ν”„ 비ꡐ 도ꡬ
78
+
79
+ 이 λ„κ΅¬λŠ” μ‚¬μš©μžκ°€ μ§€μ •ν•œ κΈ°κ°„ λ™μ•ˆ μ—¬λŸ¬ νšŒμ‚¬μ˜ μƒλŒ€ μ£Όκ°€λ₯Ό 비ꡐ할 수 μžˆλ„λ‘ ν•©λ‹ˆλ‹€. 역사적인 μ£Όκ°€λ₯Ό 가져와 μƒλŒ€ μ„±λŠ₯을 보여주도둝 μ •μƒν™”ν•˜κ³  비ꡐ κ·Έλž˜ν”„λ₯Ό μƒμ„±ν•©λ‹ˆλ‹€.
80
+
81
+ ## μ£Όμš” κΈ°λŠ₯
82
+ - **주식 비ꡐ**: μ‚¬μš©μžκ°€ μ •μ˜ν•œ κΈ°κ°„ λ™μ•ˆ μ—¬λŸ¬ μ£Όμ‹μ˜ μ„±λŠ₯을 λΉ„κ΅ν•©λ‹ˆλ‹€.
83
+ - **μƒλŒ€μ  가격비ꡐ**: 가격을 λ™μΌν•œ κΈ°μ€€μ„ μ—μ„œ μ‹œμž‘ν•˜λŠ” μƒλŒ€μ μΈ λ³€ν™”λ₯Ό 보여주도둝 ν•©λ‹ˆλ‹€.
84
+
85
+ ## μ‚¬μš© 방법
86
+ 1. **주식 μ½”λ“œ μž…λ ₯**: μ‰Όν‘œλ‘œ κ΅¬λΆ„λœ 주식 μ½”λ“œ λͺ©λ‘μ„ μ œκ³΅ν•©λ‹ˆλ‹€ (예: `AAPL, GOOGL, TSLA`).
87
+ 2. **λ‚ μ§œ 수 μ§€μ •**: μ£Όκ°€λ₯Ό 비ꡐ할 κΈ°κ°„μ˜ λ‚ μ§œ 수λ₯Ό μž…λ ₯ν•©λ‹ˆλ‹€.
88
+ 3. **좜λ ₯**: μ£Όκ°€λ₯Ό 가져와 비ꡐ κ·Έλž˜ν”„λ₯Ό ν‘œμ‹œν•©λ‹ˆλ‹€.
89
+
90
+ ## 예제 μž…λ ₯
91
+ - `주식 μ½”λ“œ`: AAPL, GOOGL, TSLA
92
+ - `λ‚ μ§œ 수`: 30
93
+
94
+ ## 예제 좜λ ₯
95
+ - Apple (AAPL), Google (GOOGL), Tesla (TSLA)의 졜근 30μΌκ°„μ˜ μƒλŒ€ μ£Όκ°€λ₯Ό λΉ„κ΅ν•˜λŠ” κ·Έλž˜ν”„.
96
+
97
+ ## μ€‘μš” 사항
98
+ - λͺ¨λ“  주식 μ½”λ“œκ°€ μœ νš¨ν•˜κ³  데이터 μ†ŒμŠ€μ—μ„œ μ§€μ›ν•˜λŠ”μ§€ ν™•μΈν•˜μ„Έμš”.
99
+ - λ„κ΅¬λŠ” μ˜μ—…μΌ κΈ°μ€€μœΌλ‘œ 데이터λ₯Ό κ°€μ Έμ˜€λ―€λ‘œ 주말 및 κ³΅νœ΄μΌμ€ μ œμ™Έλ©λ‹ˆλ‹€.
100
+ - 이 λ„κ΅¬λŠ” μ£Όκ°€ 데이터λ₯Ό μ‚¬μš©ν•˜λ―€λ‘œ 인터넷 연결이 ν•„μš”ν•©λ‹ˆλ‹€.
101
+ - FinanceDataReaderλ₯Ό μ‚¬μš©ν•˜μ—¬ μ£Όκ°€ 데이터λ₯Ό κ°€μ Έμ˜΅λ‹ˆλ‹€.
102
+ - κ·Έλž˜ν”½ μ‹œκ°ν™”λ₯Ό μœ„ν•΄ matplotlib을 μ‚¬μš©ν•˜μ—¬ κ°œλ°œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.
103
+
104
+ ## λ©΄μ±… μ‘°ν•­
105
+ 이 λ„κ΅¬μ—μ„œ μ œκ³΅ν•˜λŠ” μ •λ³΄λŠ” 일반적인 정보 제곡 λͺ©μ λ§Œμ„ μœ„ν•΄ μ œκ³΅λ©λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ λͺ¨λ“  μ •λ³΄λŠ” μ„ μ˜λ‘œ μ œκ³΅λ˜μ§€λ§Œ, μ‚¬μ΄νŠΈμ˜ μ •λ³΄μ˜ μ •ν™•μ„±, μ μ ˆμ„±, μœ νš¨μ„±, μ‹ λ’°μ„±, κ°€μš©μ„± λ˜λŠ” 완전성에 λŒ€ν•΄ λͺ…μ‹œμ μ΄λ“  λ¬΅μ‹œμ μ΄λ“  μ–΄λ– ν•œ μ’…λ₯˜μ˜ μ§„μˆ μ΄λ‚˜ 보증을 ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ μ‚¬μš©κ³Ό μ‚¬μ΄νŠΈμ˜ 정보λ₯Ό μ‹ λ’°ν•˜λŠ” 것은 μ „μ μœΌλ‘œ μ‚¬μš©μžμ˜ μ±…μž„μž…λ‹ˆλ‹€.
106
+ """)
107
+
108
+ with gr.Accordion("English", open=False):
109
+ gr.Markdown("""
110
+ # Stock Comparison Tool
111
+
112
+ This tool allows users to compare the relative prices of multiple companies over a specified period. It fetches historical stock prices, normalizes them to show relative performance, and generates a comparison graph.
113
+
114
+ ## Key Features
115
+ - **Stock Comparison**: Compare the performance of multiple stocks over a user-defined period.
116
+ - **Relative Price Comparison**: Shows relative changes starting from the same baseline.
117
+
118
+ ## How to Use
119
+ 1. **Enter Stock Codes**: Provide a comma-separated list of stock codes (e.g., `AAPL, GOOGL, TSLA`).
120
+ 2. **Specify Number of Days**: Enter the number of days for the comparison period.
121
+ 3. **Output**: Fetches stock prices and displays a comparison graph.
122
+
123
+ ## Example Input
124
+ - `Stock Codes`: AAPL, GOOGL, TSLA
125
+ - `Number of Days`: 30
126
+
127
+ ## Example Output
128
+ - A graph comparing the relative stock prices of Apple (AAPL), Google (GOOGL), and Tesla (TSLA) over the last 30 days.
129
+
130
+ ## Important Notes
131
+ - Ensure all stock codes are valid and supported by the data source.
132
+ - The tool fetches data based on trading days, excluding weekends and holidays.
133
+ - An internet connection is required as the tool uses stock price data.
134
+ - Data is sourced from FinanceDataReader.
135
+ - Developed using matplotlib for graphical visualization.
136
+
137
+ ## Disclaimer
138
+ The information provided by this tool is for general informational purposes only. All information on the site is provided in good faith, but we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability, or completeness of any information on the site. Your use of the site and reliance on any information on the site is solely at your own risk.
139
+ """)
140
+
141
+
142
+ with gr.Accordion("πŸ“‰ Cost Averaging", open=False):
143
+ with gr.Accordion("ν•œκ΅­μ–΄", open=False):
144
+ gr.Markdown("""
145
+ # 물타기 계산 도ꡬ
146
+
147
+ 이 λ„κ΅¬λŠ” νˆ¬μžμžκ°€ λ‹€λ₯Έ κ°€κ²©μœΌλ‘œ μΆ”κ°€ 주식을 λ§€μˆ˜ν•œ ν›„ μƒˆλ‘œμš΄ 평균 맀수 단가와 수읡λ₯ μ„ κ³„μ‚°ν•˜λŠ” 데 도움을 μ€λ‹ˆλ‹€. μƒˆλ‘œμš΄ νˆ¬μžκ°€ 전체 λΉ„μš© 기반과 잠재적 μˆ˜μ΅μ— λ―ΈμΉ˜λŠ” 영ν–₯을 μ΄ν•΄ν•˜λŠ” 데 μœ μš©ν•©λ‹ˆλ‹€.
148
+
149
+ ## μ‚¬μš© 방법
150
+ 1. **ν˜„μž¬ 투자 μ„ΈλΆ€ 정보 μž…λ ₯**: λ³΄μœ ν•œ μ£Όμ‹μ˜ 평균 가격과 μˆ˜λŸ‰μ„ μ œκ³΅ν•©λ‹ˆλ‹€.
151
+ 2. **μƒˆλ‘œμš΄ 맀수 μ„ΈλΆ€ 정보 μž…λ ₯**: λ§€μˆ˜ν•˜λ €λŠ” μ£Όμ‹μ˜ 가격과 μˆ˜λŸ‰μ„ μ œκ³΅ν•©λ‹ˆλ‹€.
152
+ 3. **좜λ ₯**: λ„κ΅¬λŠ” μƒˆλ‘œμš΄ 평균 가격, 총 μˆ˜λŸ‰, μΆ”κ°€ νˆ¬μžμ•‘, 총 νˆ¬μžμ•‘ 및 μƒˆλ‘œμš΄ 수읡λ₯ μ„ κ³„μ‚°ν•˜κ³  ν‘œμ‹œν•©λ‹ˆλ‹€.
153
+
154
+ ## 예제 μž…λ ₯
155
+ - `이전 평균 가격`: 100
156
+ - `이전 μˆ˜λŸ‰`: 50
157
+ - `μƒˆλ‘œμš΄ 가격`: 120
158
+ - `μƒˆλ‘œμš΄ μˆ˜λŸ‰`: 30
159
+
160
+ ## 예제 좜λ ₯
161
+ - `수읡λ₯ `: 11.1%
162
+ - `μƒˆλ‘œμš΄ 평균 가격`: 108
163
+ - `총 μˆ˜λŸ‰`: 80
164
+ - `μΆ”κ°€ 투자금`: 3600
165
+ - `총 투자금`: 8640
166
+
167
+ ## μ€‘μš” 사항
168
+ - λͺ¨λ“  μž…λ ₯이 μœ νš¨ν•œ μˆ«μžμΈμ§€ ν™•μΈν•˜μ„Έμš”.
169
+ - λ„κ΅¬λŠ” 이전 및 μƒˆλ‘œμš΄ 투자의 가쀑 평균을 기반으둜 μƒˆλ‘œμš΄ 평균 가격을 κ³„μ‚°ν•©λ‹ˆλ‹€.
170
+ - μ‚¬μš©ν•˜κΈ° μ‰¬μš΄ μ‚¬μš©μž μΈν„°νŽ˜μ΄μŠ€ 생성을 μœ„ν•΄ Gradioλ₯Ό μ‚¬μš©ν•˜μ—¬ κ°œλ°œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.
171
+ - μ‹€μ‹œκ°„ 계산 및 즉각적인 ν”Όλ“œλ°±μ„ μ§€μ›ν•©λ‹ˆλ‹€.
172
+
173
+ ## λ©΄μ±… μ‘°ν•­
174
+ 이 λ„κ΅¬μ—μ„œ μ œκ³΅ν•˜λŠ” μ •λ³΄λŠ” 일반적인 정보 제곡 λͺ©μ λ§Œμ„ μœ„ν•΄ μ œκ³΅λ©λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ λͺ¨λ“  μ •λ³΄λŠ” μ„ μ˜λ‘œ μ œκ³΅λ˜μ§€λ§Œ, μ‚¬μ΄νŠΈμ˜ μ •λ³΄μ˜ μ •ν™•μ„±, μ μ ˆμ„±, μœ νš¨μ„±, μ‹ λ’°μ„±, κ°€μš©μ„± λ˜λŠ” 완전성에 λŒ€ν•΄ λͺ…μ‹œμ μ΄λ“  λ¬΅μ‹œμ μ΄λ“  μ–΄λ– ν•œ μ’…λ₯˜μ˜ μ§„μˆ μ΄λ‚˜ 보증을 ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ μ‚¬μš©κ³Ό μ‚¬μ΄νŠΈμ˜ 정보λ₯Ό μ‹ λ’°ν•˜λŠ” 것은 μ „μ μœΌλ‘œ μ‚¬μš©μžμ˜ μ±…μž„μž…λ‹ˆλ‹€.
175
+ """)
176
+
177
+ with gr.Accordion("English", open=False):
178
+ gr.Markdown("""
179
+ # Cost Averaging Calculator
180
+
181
+ This tool helps investors calculate the new average purchase price and yield after purchasing additional shares at different prices. It is useful for understanding the impact of new investments on the overall cost basis and potential returns.
182
+
183
+ ## How to Use
184
+ 1. **Enter Current Investment Details**: Provide the average price and quantity of the shares you hold.
185
+ 2. **Enter New Purchase Details**: Provide the price and quantity of the shares you want to purchase.
186
+ 3. **Output**: The tool calculates and displays the new average price, total quantity, additional investment amount, total investment amount, and new yield.
187
+
188
+ ## Example Input
189
+ - `Previous Average Price`: 100
190
+ - `Previous Quantity`: 50
191
+ - `New Price`: 120
192
+ - `New Quantity`: 30
193
+
194
+ ## Example Output
195
+ - `Return`: 11.1%
196
+ - `New Average Price`: 108
197
+ - `Total Quantity`: 80
198
+ - `Additional Investment Amount`: 3600
199
+ - `Total Investment Amount`: 8640
200
+
201
+ ## Important Notes
202
+ - Ensure all inputs are valid numbers.
203
+ - The tool calculates the new average price based on the weighted average of previous and new investments.
204
+ - Developed using Gradio for an easy-to-use user interface.
205
+ - Supports real-time calculations and instant feedback.
206
+
207
+ ## Disclaimer
208
+ The information provided by this tool is for general informational purposes only. All information on the site is provided in good faith, but we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability, or completeness of any information on the site. Your use of the site and reliance on any information on the site is solely at your own risk.
209
+ """)
210
+
211
+ with gr.Accordion("πŸ§“ Retirement Planning", open=False):
212
+ with gr.Accordion("ν•œκ΅­μ–΄", open=False):
213
+ gr.Markdown("""
214
+ # 은퇴 κ³„νš 도ꡬ
215
+
216
+ 이 λ„κ΅¬λŠ” 개인이 은퇴 μ‹œμ κΉŒμ§€ 투자 μ„±μž₯κ³Ό 은퇴 ν›„ λ°°λ‹Ή μ†Œλ“μ„ μ˜ˆμΈ‘ν•˜μ—¬ 은퇴 κ³„νšμ„ μ„Έμš°λŠ” 데 도움을 μ€λ‹ˆλ‹€. 초기 투자금, μ›”κ°„ 투자금, 은퇴 μ „ν›„μ˜ 투자 수읡λ₯  (ROI) 및 λ°°λ‹Ή 수읡λ₯ κ³Ό 같은 λ‹€μ–‘ν•œ μš”μΈμ„ κ³ λ €ν•©λ‹ˆλ‹€.
217
+
218
+ ## μ£Όμš” κΈ°λŠ₯
219
+ - **μœ μ—°ν•œ μž…λ ₯**: μ‚¬μš©μžλŠ” ν˜„μž¬ λ‚˜μ΄, 은퇴 λ‚˜μ΄, ν˜„μž¬ νˆ¬μžμ•‘, μ›”κ°„ νˆ¬μžμ•‘, ROI, λ°°λ‹Ή 수읡λ₯  및 κΈ°λŒ€ 수λͺ…을 μž…λ ₯ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
220
+ - **상세 예츑**: λ„κ΅¬λŠ” 은퇴 μ‹œ 총 투자 κ°€μΉ˜, μ˜ˆμƒ μ—°κ°„ 및 μ›”κ°„ λ°°λ‹Ή μ†Œλ“, 은퇴 ν›„ 투자 μ„±μž₯ 및 λ°°λ‹Ή μ†Œλ“μ„ κ³„μ‚°ν•©λ‹ˆλ‹€.
221
+ - **재투자 μ˜΅μ…˜**: μ‚¬μš©μžλŠ” 은퇴 μ „ λ°°λ‹ΉκΈˆμ„ μž¬νˆ¬μžν•˜μ—¬ 볡리 μ„±μž₯을 선택할 수 μžˆμŠ΅λ‹ˆλ‹€.
222
+
223
+ ## μ‚¬μš© 방법
224
+ 1. **ν˜„μž¬ μ„ΈλΆ€ 사항 μž…λ ₯**: ν˜„μž¬ λ‚˜μ΄, 은퇴 λ‚˜μ΄, ν˜„μž¬ νˆ¬μžμ•‘ 및 μ›”κ°„ νˆ¬μžμ•‘μ„ μ œκ³΅ν•©λ‹ˆλ‹€.
225
+ 2. **투자 수읡λ₯  μ§€μ •**: 은퇴 μ „ν›„μ˜ μ˜ˆμƒ ROI 및 λ°°λ‹Ή 수읡λ₯ μ„ μž…λ ₯ν•©λ‹ˆλ‹€.
226
+ 3. **재투자 μ˜΅μ…˜ 선택**: 은퇴 μ „ λ°°λ‹ΉκΈˆμ„ μž¬νˆ¬μžν• μ§€ μ„ νƒν•©λ‹ˆλ‹€.
227
+ 4. **κΈ°λŒ€ 수λͺ… μ„€μ •**: κΈ°λŒ€ 수λͺ…을 μž…λ ₯ν•©λ‹ˆλ‹€.
228
+ 5. **좜λ ₯**: λ„κ΅¬λŠ” 은퇴 μ‹œ 총 투자 κ°€μΉ˜, μ—°κ°„ 및 μ›”κ°„ λ°°λ‹Ή μ†Œλ“, 은퇴 ν›„ 투자 μ„±μž₯ 및 λ°°λ‹Ή μ†Œλ“μ„ κ³„μ‚°ν•˜κ³  ν‘œμ‹œν•©λ‹ˆλ‹€.
229
+
230
+ ## 예제 μž…λ ₯
231
+ - `ν˜„μž¬ λ‚˜μ΄`: 30
232
+ - `은퇴 λ‚˜μ΄`: 65
233
+ - `초기 투자금`: 50000
234
+ - `μ›”κ°„ 투자금`: 500
235
+ - `은퇴 μ „ ROI`: 7%
236
+ - `은퇴 ν›„ ROI`: 5%
237
+ - `은퇴 μ „ λ°°λ‹Ή 수읡λ₯ `: 2%
238
+ - `은퇴 ν›„ λ°°λ‹Ή 수읡λ₯ `: 3%
239
+ - `λ°°λ‹ΉκΈˆ 재투자`: 예
240
+ - `κΈ°λŒ€ 수λͺ…`: 85
241
+
242
+ ## 예제 좜λ ₯
243
+ - `은퇴 μ‹œ 총 κΈˆμ•‘`: 500,000
244
+ - `은퇴 μ‹œ μ—°κ°„ λ°°λ‹Ή μ†Œλ“`: 10,000
245
+ - `은퇴 μ‹œ μ›”κ°„ λ°°λ‹Ή μ†Œλ“`: 833
246
+ - `은퇴 ν›„ 투자 μ„±μž₯ 및 λ°°λ‹Ή μ†Œλ“`: 은퇴 ν›„ λ§€λ…„ 상세 ν‘œ ν˜•μ‹μœΌλ‘œ 제곡.
247
+
248
+ ## μ€‘μš” 사항
249
+ - λͺ¨λ“  μž…λ ₯이 μœ νš¨ν•œ μˆ«μžμΈμ§€ ν™•μΈν•˜μ„Έμš”.
250
+ - λ„κ΅¬λŠ” 은퇴 ν›„ μΆ”κ°€ νˆ¬μžλ‚˜ λ°°λ‹ΉκΈˆ 재투자λ₯Ό κ°€μ •ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.
251
+ - μ‚¬μš©ν•˜κΈ° μ‰¬μš΄ μ‚¬μš©μž μΈν„°νŽ˜μ΄μŠ€ 생성을 μœ„ν•΄ Gradioλ₯Ό μ‚¬μš©ν•˜μ—¬ κ°œλ°œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.
252
+ - μƒμ„Έν•œ 은퇴 κ³„νš 예츑과 즉각적인 ν”Όλ“œλ°±μ„ μ§€μ›ν•©λ‹ˆλ‹€.
253
+
254
+ ## λ©΄μ±… μ‘°ν•­
255
+ 이 λ„κ΅¬μ—μ„œ μ œκ³΅ν•˜λŠ” μ •λ³΄λŠ” 일반적인 정보 제곡 λͺ©μ λ§Œμ„ μœ„ν•΄ μ œκ³΅λ©λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ λͺ¨λ“  μ •λ³΄λŠ” μ„ μ˜λ‘œ μ œκ³΅λ˜μ§€λ§Œ, μ‚¬μ΄νŠΈμ˜ μ •λ³΄μ˜ μ •ν™•μ„±, μ μ ˆμ„±, μœ νš¨μ„±, μ‹ λ’°μ„±, κ°€μš©μ„± λ˜λŠ” 완전성에 λŒ€ν•΄ λͺ…μ‹œμ μ΄λ“  λ¬΅μ‹œμ μ΄λ“  μ–΄λ– ν•œ μ’…λ₯˜μ˜ μ§„μˆ μ΄λ‚˜ 보증을 ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ‚¬μ΄νŠΈμ˜ μ‚¬μš©κ³Ό μ‚¬μ΄νŠΈμ˜ 정보λ₯Ό μ‹ λ’°ν•˜λŠ” 것은 μ „μ μœΌλ‘œ μ‚¬μš©μžμ˜ μ±…μž„μž…λ‹ˆλ‹€.
256
+ """)
257
+
258
+ with gr.Accordion("English", open=False):
259
+ gr.Markdown("""
260
+ # Retirement Planning Tool
261
+
262
+ This tool helps individuals plan for retirement by predicting investment growth and dividend income up to the retirement date and beyond. It considers various factors such as initial investment, monthly contributions, ROI before and after retirement, and dividend yield.
263
+
264
+ ## Key Features
265
+ - **Flexible Input**: Users can enter their current age, retirement age, current investment amount, monthly contribution, ROI, dividend yield, and life expectancy.
266
+ - **Detailed Projections**: The tool calculates and displays total investment value at retirement, expected annual and monthly dividend income, investment growth, and dividend income after retirement.
267
+ - **Reinvestment Option**: Users can choose to reinvest dividends before retirement for compounded growth.
268
+
269
+ ## How to Use
270
+ 1. **Enter Current Details**: Provide current age, retirement age, current investment amount, and monthly contribution.
271
+ 2. **Specify ROI**: Enter the expected ROI and dividend yield before and after retirement.
272
+ 3. **Select Reinvestment Option**: Choose whether to reinvest dividends before retirement.
273
+ 4. **Set Life Expectancy**: Enter your expected life expectancy.
274
+ 5. **Output**: The tool calculates and displays total investment value at retirement, annual and monthly dividend income, and investment growth and dividend income after retirement.
275
+
276
+ ## Example Input
277
+ - `Current Age`: 30
278
+ - `Retirement Age`: 65
279
+ - `Initial Investment`: 50000
280
+ - `Monthly Contribution`: 500
281
+ - `Pre-Retirement ROI`: 7%
282
+ - `Post-Retirement ROI`: 5%
283
+ - `Pre-Retirement Dividend Yield`: 2%
284
+ - `Post-Retirement Dividend Yield`: 3%
285
+ - `Dividend Reinvestment`: Yes
286
+ - `Life Expectancy`: 85
287
+
288
+ ## Example Output
289
+ - `Total Amount at Retirement`: 500,000
290
+ - `Annual Dividend Income at Retirement`: 10,000
291
+ - `Monthly Dividend Income at Retirement`: 833
292
+ - `Post-Retirement Investment Growth and Dividend Income`: Detailed annually in tabular format.
293
+
294
+ ## Important Notes
295
+ - Ensure all inputs are valid numbers.
296
+ - The tool assumes no additional investments or dividend reinvestments after retirement.
297
+ - Developed using Gradio for an easy-to-use user interface.
298
+ - Supports detailed retirement planning projections and instant feedback.
299
+
300
+ ## Disclaimer
301
+ The information provided by this tool is for general informational purposes only. All information on the site is provided in good faith, but we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability, or completeness of any information on the site. Your use of the site and reliance on any information on the site is solely at your own risk.
302
+ """)
303
+ gr.Markdown("""
304
+ """)
305
+
306
  gr.Markdown("""
307
  ## Support Us
308
  If you find this tool useful and would like to support the development of such projects, please consider making a donation. Your support is greatly appreciated.
 
315
  <img src="https://static.toss.im/logos/png/1x/logo-toss.png" alt="Donate with Toss" style="width: 150px;">
316
  </a>
317
 
318
+ """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
interface/compare_stock_prices_interface.py CHANGED
@@ -8,9 +8,23 @@ def compare_stock_prices_interface_fn(stock_codes, period):
8
  css = load_css()
9
  return css + result
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  compare_inputs = [
12
- gr.Textbox(label="πŸ“ˆ Stock Codes", lines=2, placeholder="Enter stock codes separated by comma (e.g., AAPL,GOOGL,MSFT)"),
13
- gr.Number(label="πŸ“† Period (days)", value=90)
14
  ]
15
 
16
  compare_stock_prices_interface = gr.Interface(
 
8
  css = load_css()
9
  return css + result
10
 
11
+ stocks_choice = [
12
+ "SCHD,QQQ",
13
+ "458730,368590",
14
+ "AAPL,GOOGL,MSFT"
15
+ ]
16
+
17
+ days_choice = [
18
+ "90",
19
+ "365",
20
+ "1095",
21
+ "1825",
22
+ "3650"
23
+ ]
24
+
25
  compare_inputs = [
26
+ gr.Dropdown(label="πŸ“ˆ Stock Codes", choices=stocks_choice, allow_custom_value=True, info="Enter stock codes separated by comma (e.g., AAPL,GOOGL,MSFT)", value="AAPL,GOOGL,MSFT"),
27
+ gr.Dropdown(label="πŸ“† Period (days)", choices=days_choice, allow_custom_value=True, value="90")
28
  ]
29
 
30
  compare_stock_prices_interface = gr.Interface(
interface/portfolio_rebalancing_interface.py CHANGED
@@ -14,9 +14,9 @@ examples = [
14
  ]
15
 
16
  portfolio_inputs = [
17
- gr.Radio(label="πŸ’± Main Currency", choices=currency_codes, value="KRW"),
18
- gr.Textbox(label="πŸ”₯ Holdings", lines=2, placeholder="Format: [ Ticker Currency Quantity Weight, ... ]"),
19
- gr.Number(label="πŸͺ΅ Cash", value=""),
20
  gr.Slider(label="βš–οΈ Cash Ratio (%)", value=0, minimum=0, maximum=100, step=1)
21
  ]
22
 
 
14
  ]
15
 
16
  portfolio_inputs = [
17
+ gr.Dropdown(label="πŸ’± Main Currency", choices=currency_codes, value="KRW", info="All assets in your portfolio will be converted to the selected main currency."),
18
+ gr.Textbox(label="πŸ”₯ Holdings", lines=2, info="Format: [ Ticker Currency Quantity Weight, ... ]", placeholder="e.g., SCHD USD 500 8, QQQ USD 20 2", value="SCHD USD 500 8,\nQQQ USD 20 2"),
19
+ gr.Number(label="πŸͺ΅ Cash", value="", info="Specify the cash amount and ratio (%) you want to maintain."),
20
  gr.Slider(label="βš–οΈ Cash Ratio (%)", value=0, minimum=0, maximum=100, step=1)
21
  ]
22