Spaces:
Running
Running
Upload 13 files
Browse files- app.py +2 -6
- interface/about_interface.py +303 -304
- interface/compare_stock_prices_interface.py +16 -2
- interface/portfolio_rebalancing_interface.py +3 -3
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
|
| 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("π‘
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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.
|
| 13 |
-
gr.
|
| 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.
|
| 18 |
-
gr.Textbox(label="π₯ Holdings", lines=2,
|
| 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 |
|