Spaces:
Running
Running
File size: 30,279 Bytes
069fbff 2702515 069fbff 3c7ad8d 069fbff 3c7ad8d 069fbff ac3f9d0 143cfdd ac3f9d0 069fbff 3c7ad8d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 |
import gradio as gr
def render_about_tab():
with gr.TabItem("π€ Support Us"):
# def create_tool_section(tool_name, korean_description, english_description):
# with gr.Accordion(tool_name, open=False):
# with gr.Accordion("νκ΅μ΄", open=False):
# gr.Markdown(korean_description)
# with gr.Accordion("English", open=False):
# gr.Markdown(english_description)
# # Portfolio Rebalancing Tool Section
# create_tool_section(
# "RE-BALANCING CALCULATOR",
# """
# ## π 리밸λ°μ± κ³μ°κΈ°
# μ΄ λꡬλ μ£Όμ΄μ§ μ£Όμ 보μ λ, νκΈ κΈμ‘ λ° νκΈ λΉμ¨μ λ°νμΌλ‘ ν¬νΈν΄λ¦¬μ€λ₯Ό λΆμνκ³ μ¬μ‘°μ ν©λλ€.
# ### μ
λ ₯κ°
# - **μ£Όμ 보μ λ (holdings)**: κ° μ£Όμμ μ½λ, ν΅ν μ½λ, μλ, λͺ©ν λΉμ¨μ μ
λ ₯ν©λλ€. μ¬λ¬ μ£Όμ μ’
λͺ©μ μΌνλ‘ κ΅¬λΆνμ¬ μ
λ ₯ν©λλ€. μ: `AAPL USD 10 0.30,TSLA USD 5 0.20`
# - **νκΈ κΈμ‘ (cash_amount)**: ν¬νΈν΄λ¦¬μ€μ ν¬ν¨λ νκΈμ κΈμ‘μ
λλ€. μ: `1000`
# - **νκΈ λΉμ¨ (cash_ratio)**: ν¬νΈν΄λ¦¬μ€μμ νκΈμ΄ μ°¨μ§νλ λΉμ¨μ
λλ€. μ: `10` (10%)
# ### κΈ°λ₯
# 1. **μ
λ ₯ νμ±**: μ£Όμ 보μ λ, νκΈ κΈμ‘ λ° λΉμ¨μ λΆμνμ¬ κ° μ£Όμμ λͺ©ν λΉμ¨μ κ³μ°ν©λλ€.
# 2. **νμ¨ μ‘°ν**: κ° μ£Όμμ ν΅ν μ½λμ λ©μΈ ν΅ν κ°μ νμ¨μ μ‘°ννμ¬ μ£Όμ κ°κ²©μ λ³νν©λλ€.
# 3. **ν¬νΈν΄λ¦¬μ€ ꡬμΆ**: μ£Όμκ³Ό νκΈ μ 보λ₯Ό λ°νμΌλ‘ ν¬νΈν΄λ¦¬μ€λ₯Ό ꡬμΆν©λλ€.
# 4. **ν¬νΈν΄λ¦¬μ€ μ¬μ‘°μ μ 보 μ 곡**: νμ¬ ν¬νΈν΄λ¦¬μ€μ κ°μΉμ λͺ©ν λΉμ¨μ λΉκ΅νμ¬ μ¬μ‘°μ νμμ±μ λΆμν©λλ€.
# - **νμ¬ λ³΄μ λ λ° κ°μΉ**: κ° μ£Όμ λ° νκΈμ νμ¬ λ³΄μ λκ³Ό κ°μΉλ₯Ό κ³μ°ν©λλ€.
# - **μ¬μ‘°μ νλͺ©**: λͺ©ν λΉμ¨μ λ§μΆκΈ° μν΄ λ§€μ λλ λ§€λν΄μΌ ν μ£Όμ μλκ³Ό κΈμ‘μ κ³μ°ν©λλ€.
# - **ν΅νλ³ μμ½**: ν¬νΈν΄λ¦¬μ€μ ν΅νλ³ λΆν¬λ₯Ό μμ½ν©λλ€.
# ### κ²°κ³Ό
# - **ν¬νΈν΄λ¦¬μ€ μ 보**: νμ¬ ν¬νΈν΄λ¦¬μ€μ μ΄ κ°μΉ λ° νκΈ μ 보λ₯Ό ν¬ν¨ν HTML μ½λμ
λλ€.
# - **νμ¬ λ³΄μ λ λ° κ°μΉ**: κ° μ£Όμμ νμ¬ λΉμ¨ λ° κ°μΉμ λν μ 보μ
λλ€.
# - **μ¬μ‘°μ λΆμ**: μ£Όμμ λ§€μ/λ§€λ μ‘°μ μ΄ νμν νλͺ© λ° κΈμ‘μ λν μμΈ λΆμμ
λλ€.
# - **ν΅νλ³ μμ½**: ν¬νΈν΄λ¦¬μ€μ ν΅νλ³ λΉμ¨ λ° μ΄ κ°μΉλ₯Ό μμ½ν μ 보μ
λλ€.
# μ΄ λꡬλ₯Ό ν΅ν΄ ν¬νΈν΄λ¦¬μ€λ₯Ό ν¨μ¨μ μΌλ‘ μ¬μ‘°μ νκ³ , μ£Όμ λ° νκΈμ λΉμ¨μ μ΅μ νν μ μμ΅λλ€! ππΌ
# ### μ€μ μ¬ν
# - μ£Όμ μ½λμ ν΅ν μ½λκ° μ ν¨νμ§ νμΈνμΈμ.
# - μ΄ λꡬλ μ£Όκ°μ νμ¨μ μ€μκ° λ°μ΄ν°λ₯Ό μ¬μ©νλ―λ‘ μΈν°λ· μ°κ²°μ΄ νμν©λλ€.
# - Yahoo Finance λ° FinanceDataReaderμ λ°μ΄ν°λ₯Ό μ¬μ©ν©λλ€.
# ### λ©΄μ±
μ‘°ν
# μ΄ λꡬμμ μ 곡νλ μ 보λ μΌλ°μ μΈ μ 보 μ 곡 λͺ©μ λ§μ μν΄ μ 곡λ©λλ€. μ¬μ΄νΈμ λͺ¨λ μ 보λ μ μλ‘ μ 곡λμ§λ§, μ¬μ΄νΈμ μ 보μ μ νμ±, μ μ μ±, μ ν¨μ±, μ λ’°μ±, κ°μ©μ± λλ μμ μ±μ λν΄ λͺ
μμ μ΄λ 묡μμ μ΄λ μ΄λ ν μ’
λ₯μ μ§μ μ΄λ 보μ¦μ νμ§ μμ΅λλ€. μ¬μ΄νΈμ μ¬μ©κ³Ό μ¬μ΄νΈμ μ 보λ₯Ό μ λ’°νλ κ²μ μ μ μΌλ‘ μ¬μ©μμ μ±
μμ
λλ€.
# """,
# """
# ## π RE-BALANCING CALCULATOR
# This tool analyzes and rebalances a portfolio based on given stock holdings, cash amount, and cash ratio.
# ### Input Values
# - **Stock Holdings (holdings)**: Enter the stock code, currency code, quantity, and target weight for each stock. Separate multiple stocks with commas. Example: `AAPL USD 10 0.30,TSLA USD 5 0.20`
# - **Cash Amount (cash_amount)**: The amount of cash in the portfolio. Example: `1000`
# - **Cash Ratio (cash_ratio)**: The proportion of cash in the portfolio. Example: `10` (10%)
# ### Functionality
# 1. **Parse Input**: Analyzes stock holdings, cash amount, and ratio to calculate the target weights for each stock.
# 2. **Exchange Rate Lookup**: Retrieves exchange rates between each stock's currency code and the main currency to convert stock prices.
# 3. **Build Portfolio**: Constructs the portfolio based on stock and cash information.
# 4. **Get Portfolio Rebalancing Information**: Compares the current portfolio value and target weights to analyze rebalancing needs.
# - **Current Holdings and Value**: Calculates the current holdings and value of each stock and cash.
# - **Rebalancing Items**: Calculates the quantities and amounts of stocks to buy or sell to meet target weights.
# - **Currency Summary**: Summarizes the portfolio's distribution by currency.
# ### Results
# - **Portfolio Information**: HTML code containing the total value of the current portfolio and cash information.
# - **Current Holdings and Value**: Information on the current weights and values of each stock.
# - **Rebalancing Analysis**: Detailed analysis of the adjustments needed to buy/sell stocks to meet target weights.
# - **Currency Summary**: Summary of portfolio distribution by currency, including total value.
# Use this tool to efficiently rebalance your portfolio and optimize the ratio of stocks and cash! ππΌ
# ### Important Notes
# - Ensure stock codes and currency codes are valid.
# - This tool requires an internet connection as it uses real-time stock prices and exchange rates.
# - Data is sourced from Yahoo Finance and FinanceDataReader.
# ### Disclaimer
# 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.
# """
# )
# # Stock Comparison Tool Section
# create_tool_section(
# "STOCK PRICE TREND VISUALIZATION",
# """
# ## π μ£Όμ κ°κ²© μΆμΈ μκ°ν
# μ΄ μ½λλ μ£Όμ΄μ§ μ£Όμ μ½λλ€μ κ°κ²© μΆμΈλ₯Ό μκ°νν©λλ€. μ¬λ¬ μ£Όμμ κ°κ²©μ μΆμ νκ³ λΉκ΅νκΈ° μν΄ μ¬μ©λ©λλ€. π
# ### μ
λ ₯κ°
# - **μ£Όμ μ½λ (stock_codes)**: κ°κ²©μ μΆμ ν μ£Όμμ μ½λλ€μ
λλ€. μΌνλ‘ κ΅¬λΆλ λ¬Έμμ΄ νμμΌλ‘ μ
λ ₯ν©λλ€. μ: `AAPL,GOOGL,MSFT`
# - **μΌμ (days)**: κ°κ²©μ μ‘°νν κΈ°κ°μ
λλ€. μ: `30` (μ΅κ·Ό 30μΌ)
# ### κΈ°λ₯
# 1. **μ£Όμ κ°κ²© λ°μ΄ν° κ°μ Έμ€κΈ°**: μ£Όμ΄μ§ μ£Όμ μ½λμ κΈ°κ°μ λν΄ μ£Όμ κ°κ²© λ°μ΄ν°λ₯Ό κ°μ Έμ΅λλ€.
# 2. **κ°κ²© λ³λ μκ°ν**: κ° μ£Όμμ κ°κ²© λ³λμ μκ°ννμ¬ λΉκ΅ν μ μλ κ·Έλνλ₯Ό μμ±ν©λλ€.
# - **μλ κ°κ²©**: κ° μ£Όμμ κ°κ²©μ μ²μ κ°κ²©μ λν΄ μλμ μΌλ‘ λ³λμ 보μ¬μ€λλ€.
# - **μ€νμΌ**: κ·Έλνμλ μμ κ·ΈλΌλμΈνΈμ κ·Έλ¦Όμ ν¨κ³Όκ° μ μ©λ©λλ€.
# - **μ λλ©μ΄μ
**: μ μ μ λλ©μ΄μ
ν¨κ³Όκ° μΆκ°λμ΄ μκ°μ μΌλ‘ λμ± λ§€λ ₯μ μ
λλ€.
# 3. **λ°μ΄ν° ν
μ΄λΈ μμ±**: κ° λ μ§μ μ£Όμμ κ°κ²©μ ν¬ν¨ν HTML ν
μ΄λΈμ μμ±ν©λλ€.
# ### κ²°κ³Ό
# - **κ·Έλν**: μ΅κ·Ό `days` μΌ λμμ μλ μ£Όμ κ°κ²© μΆμΈλ₯Ό 보μ¬μ£Όλ κ·Έλνμ
λλ€.
# - **λ°μ΄ν° ν
μ΄λΈ**: λ μ§λ³λ‘ κ° μ£Όμμ κ°κ²©μ ν¬ν¨νλ HTML ν
μ΄λΈμ
λλ€.
# ### μ¬μ© μμ
# μ£Όμ μ½λμ κΈ°κ°μ μ
λ ₯νλ©΄, λ€μκ³Ό κ°μ κ²°κ³Όλ₯Ό μ»μ μ μμ΅λλ€:
# - **μ£Όμ μ½λ**: `AAPL,GOOGL,MSFT`
# - **μΌμ**: `30`
# κ²°κ³Όλ μ΅κ·Ό 30μΌ λμμ μ£Όμ κ°κ²© λ³λμ 보μ¬μ£Όλ κ·Έλνμ λ°μ΄ν° ν
μ΄λΈμ΄ ν¬ν¨λ©λλ€.
# μ΄ λꡬλ₯Ό ν΅ν΄ μ£Όμ κ°κ²©μ λ³λ μΆμΈλ₯Ό νλμ νμΈνκ³ λΆμν μ μμ΅λλ€! ππ‘
# ### μ€μ μ¬ν
# - μ£Όμ μ½λκ° μ ν¨νμ§ νμΈνμΈμ.
# - μ΄ λꡬλ μ£Όκ°μ μ€μκ° λ°μ΄ν°λ₯Ό μ¬μ©νλ―λ‘ μΈν°λ· μ°κ²°μ΄ νμν©λλ€.
# - Yahoo Finance λ° FinanceDataReaderμ λ°μ΄ν°λ₯Ό μ¬μ©ν©λλ€.
# ### λ©΄μ±
μ‘°ν
# μ΄ λꡬμμ μ 곡νλ μ 보λ μΌλ°μ μΈ μ 보 μ 곡 λͺ©μ λ§μ μν΄ μ 곡λ©λλ€. μ¬μ΄νΈμ λͺ¨λ μ 보λ μ μλ‘ μ 곡λμ§λ§, μ¬μ΄νΈμ μ 보μ μ νμ±, μ μ μ±, μ ν¨μ±, μ λ’°μ±, κ°μ©μ± λλ μμ μ±μ λν΄ λͺ
μμ μ΄λ 묡μμ μ΄λ μ΄λ ν μ’
λ₯μ μ§μ μ΄λ 보μ¦μ νμ§ μμ΅λλ€. μ¬μ΄νΈμ μ¬μ©κ³Ό μ¬μ΄νΈμ μ 보λ₯Ό μ λ’°νλ κ²μ μ μ μΌλ‘ μ¬μ©μμ μ±
μμ
λλ€.
# """,
# """
# ## π Stock Price Trend Visualization
# This script visualizes the price trends of given stock codes over a specified period. It allows you to track and compare the price movements of multiple stocks. π
# ### Input Values
# - **Stock Codes (stock_codes)**: The codes of the stocks you want to track. Enter them as a comma-separated string. Example: `AAPL,GOOGL,MSFT`
# - **Days (days)**: The period for which you want to fetch the price data. Example: `30` (last 30 days)
# ### Functionality
# 1. **Fetch Stock Price Data**: Retrieves stock price data for the given stock codes and period.
# 2. **Visualize Price Trends**: Creates a graph to visualize and compare the price trends of each stock.
# - **Relative Price**: Shows each stock's price relative to its initial price.
# - **Style**: The graph includes color gradients and shadow effects.
# - **Animation**: Line animation effects are added for visual appeal.
# 3. **Generate Data Table**: Creates an HTML table with the price data for each stock and date.
# ### Results
# - **Graph**: A graph showing the relative stock price trends over the last `days` days.
# - **Data Table**: An HTML table displaying the prices of each stock by date.
# ### Example Usage
# Given stock codes and days, you can obtain results such as:
# - **Stock Codes**: `AAPL,GOOGL,MSFT`
# - **Days**: `30`
# The result will include a graph showing the price trends over the last 30 days and an HTML table with the price data.
# Use this tool to easily analyze and visualize stock price movements! ππ‘
# ### Important Notes
# - Ensure stock codes are valid.
# - This tool requires an internet connection as it uses real-time stock prices.
# - Data is sourced from Yahoo Finance and FinanceDataReader.
# ### Disclaimer
# 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.
# """
# )
# # Cost Averaging Tool Section
# create_tool_section(
# "DOLLAR-COST AVERAGING CALCULATOR",
# """
# ## πΈ λ¬ΌνκΈ° κ³μ°κΈ°
# λ¬ΌνκΈ°(Dollar-Cost Averaging, DCA) κ³μ°κΈ°λ₯Ό μ΄μ©ν΄ 보μΈμ! μ΄ κ³μ°κΈ°λ νΉμ μ£Όμμ λν μΆκ° ν¬μλ₯Ό ν λ νκ· κ΅¬λ§€ κ°κ²©μ κ³μ°ν΄μ€λλ€. π
# ### μ
λ ₯κ° μ€μ π
# λ€μμ κ°μ μ
λ ₯ν΄ μ£ΌμΈμ:
# - **μ΄μ νκ· κ°κ²© (old_avg_price)**: κΈ°μ‘΄ μ£Όμμ νκ· κ°κ²© π΅
# - **μ΄μ μλ (old_quantity)**: κΈ°μ‘΄ μ£Όμμ μλ π¦
# - **μ κ°κ²© (new_price)**: μλ‘ κ΅¬λ§€ν μ£Όμμ κ°κ²© π²
# - **μ μλ (new_quantity)**: μλ‘ κ΅¬λ§€ν μ£Όμμ μλ π
# ### κ³μ° λ°©λ² π’
# 1. **νμ¬ ν¬μ κΈμ‘ κ³μ°**: μ΄μ νκ· κ°κ²©κ³Ό μ΄μ μλμ κ³±νμ¬ νμ¬ ν¬μ κΈμ‘μ κ³μ°ν©λλ€.
# 2. **μΆκ° ν¬μ κΈμ‘ κ³μ°**: μ κ°κ²©κ³Ό μ μλμ κ³±νμ¬ μΆκ° ν¬μ κΈμ‘μ κ³μ°ν©λλ€.
# 3. **μ΄ ν¬μ κΈμ‘ λ° μ΄ μ£Όμ μ κ³μ°**: νμ¬ ν¬μ κΈμ‘κ³Ό μΆκ° ν¬μ κΈμ‘μ ν©μ³μ μ΄ ν¬μ κΈμ‘μ κ³μ°νκ³ , μ΄μ μλκ³Ό μ μλμ λνμ¬ μ΄ μ£Όμ μλ₯Ό κ³μ°ν©λλ€.
# 4. **μ νκ· κ°κ²© κ³μ°**: μ΄ ν¬μ κΈμ‘μ μ΄ μ£Όμ μλ‘ λλμ΄ μλ‘μ΄ νκ· κ°κ²©μ κ³μ°ν©λλ€.
# 5. **μμ΅λ₯ κ³μ°**: μ΄μ κ³Ό μλ‘μ΄ μμ΅λ₯ μ κ³μ°νμ¬ ν¬μ κ²°κ³Όλ₯Ό λΆμν©λλ€.
# ### κ²°κ³Ό π―
# **1) μ΄μ μμ΅λ₯ (Old Return)**
# μ΄μ νκ· κ°κ²©μ κΈ°μ€μΌλ‘ ν μμ΅λ₯ μ νμν©λλ€.
# **2) μλ‘μ΄ μμ΅λ₯ (New Return)**
# μλ‘μ΄ νκ· κ°κ²©μ κΈ°μ€μΌλ‘ ν μμ΅λ₯ μ νμν©λλ€.
# **3) μΆκ° ν¬μ κΈμ‘ (Additional Investment)**
# μΆκ°λ‘ ν¬μν κΈμ‘μ νμν©λλ€.
# **4) μλ‘μ΄ νκ· κ°κ²© (Average Price)**
# μλ‘κ² κ³μ°λ νκ· κ°κ²©μ νμν©λλ€.
# **5) μ΄ μλ (Total Quantity)**
# μ΄ μ£Όμ μλμ νμν©λλ€.
# **6) μ΄ ν¬μ κΈμ‘ (Total Investment)**
# μ΄ ν¬μ κΈμ‘μ νμν©λλ€.
# ### μμ π
# - **μ΄μ νκ· κ°κ²©**: 100
# - **μ΄μ μλ**: 10
# - **μ κ°κ²©**: 120
# - **μ μλ**: 5
# κ²°κ³Ό:
# - μλ‘μ΄ νκ· κ°κ²©: 105
# - μ΄ μλ: 15
# - μ΄ ν¬μ κΈμ‘: 1,575
# - μ΄μ μμ΅λ₯ : 20.00%
# - μλ‘μ΄ μμ΅λ₯ : 14.29%
# - μΆκ° ν¬μ κΈμ‘: 600
# λ¬ΌνκΈ° κ³μ°κΈ°λ₯Ό ν΅ν΄ ν¬μμ νκ· κ΅¬λ§€ κ°κ²©μ μ½κ² κ³μ°ν΄ 보μΈμ! ππ°
# ### λ©΄μ±
μ‘°ν
# μ΄ λꡬμμ μ 곡νλ μ 보λ μΌλ°μ μΈ μ 보 μ 곡 λͺ©μ λ§μ μν΄ μ 곡λ©λλ€. μ¬μ΄νΈμ λͺ¨λ μ 보λ μ μλ‘ μ 곡λμ§λ§, μ¬μ΄νΈμ μ 보μ μ νμ±, μ μ μ±, μ ν¨μ±, μ λ’°μ±, κ°μ©μ± λλ μμ μ±μ λν΄ λͺ
μμ μ΄λ 묡μμ μ΄λ μ΄λ ν μ’
λ₯μ μ§μ μ΄λ 보μ¦μ νμ§ μμ΅λλ€. μ¬μ΄νΈμ μ¬μ©κ³Ό μ¬μ΄νΈμ μ 보λ₯Ό μ λ’°νλ κ²μ μ μ μΌλ‘ μ¬μ©μμ μ±
μμ
λλ€.
# """,
# """
# ## πΈ Dollar-Cost Averaging Calculator
# Try out the Dollar-Cost Averaging (DCA) calculator! This tool helps you calculate the average purchase price of stocks when making additional investments. π
# ### Input Values π
# Please enter the following details:
# - **Old Average Price (old_avg_price)**: The average price of the existing stocks π΅
# - **Old Quantity (old_quantity)**: The quantity of the existing stocks π¦
# - **New Price (new_price)**: The price of the newly purchased stocks π²
# - **New Quantity (new_quantity)**: The quantity of the newly purchased stocks π
# ### Calculation Process π’
# 1. **Current Investment**: Calculate the current investment amount by multiplying the old average price by the old quantity.
# 2. **Additional Investment**: Calculate the additional investment amount by multiplying the new price by the new quantity.
# 3. **Total Investment and Total Quantity**: Add the current investment amount and additional investment amount to get the total investment. Sum the old quantity and new quantity to get the total quantity of stocks.
# 4. **New Average Price**: Calculate the new average price by dividing the total investment by the total quantity of stocks.
# 5. **Return Calculation**: Calculate the old and new returns to analyze the investment results.
# ### Results π―
# **1) Old Return**
# Displays the return based on the old average price.
# **2) New Return**
# Displays the return based on the new average price.
# **3) Additional Investment**
# Shows the amount of additional investment made.
# **4) Average Price**
# Displays the newly calculated average price.
# **5) Total Quantity**
# Shows the total quantity of stocks.
# **6) Total Investment**
# Displays the total investment amount.
# ### Example π
# - **Old Average Price**: 100
# - **Old Quantity**: 10
# - **New Price**: 120
# - **New Quantity**: 5
# Results:
# - New Average Price: 105
# - Total Quantity: 15
# - Total Investment: 1,575
# - Old Return: 20.00%
# - New Return: 14.29%
# - Additional Investment: 600
# Use the Dollar-Cost Averaging Calculator to easily compute the average purchase price of your investments! ππ°
# ### Disclaimer
# 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.
# """
# )
# # Retirement Planning Tool Section
# create_tool_section(
# "RETIREMENT PLANNING CALCULATOR",
# """
# ## ποΈ μν΄ κ³ν κ³μ°κΈ° μ¬μ©λ²
# μλ
νμΈμ! π μν΄ κ³ν κ³μ°κΈ°μ μ€μ κ²μ νμν©λλ€. μ΄ λꡬλ μ¬λ¬λΆμ μν΄ ν μ¬μ μν©μ μμΈ‘νκ³ μ€λΉνλ λ° λμμ μ€ κ±°μμ. μλλ μ΄ κ³μ°κΈ°μ μλ λ°©μκ³Ό νμν μ 보μ
λλ€.
# ### 1. μ
λ ₯ κ° π
# κ³μ°κΈ°μμ λ€μ μ 보λ₯Ό μ
λ ₯ν΄ μ£ΌμΈμ:
# - **νμ¬ λμ΄ (current_age)**: νμ¬ λμ΄ π
# - **μν΄ λμ΄ (retirement_age)**: μν΄νκ³ μΆμ λμ΄ π
# - **νμ κΈ°λ μλͺ
(life_expectancy)**: μμλλ νμ μλͺ
π
# - **μλ³ νμν μνλΉ (monthly_income_required)**: λ§€μ νμν μνλΉ π΅
# - **μΈνλ μ΄μ
μ¨ (inflation_rate)**: λ¬Όκ° μμΉλ₯ π
# - **νμ¬ ν¬μμ‘ (current_investment)**: νμ¬ λ³΄μ ν ν¬μμ‘ π°
# - **μλ³ μΆκ° ν¬μμ‘ (monthly_investment)**: λ§€μ μΆκ°λ‘ ν¬μν κΈμ‘ πΈ
# - **μ ν¬μμ‘μ μ°κ° μ¦κ°μ‘ (annual_increase_in_monthly_investment)**: λ§€μ μ¦κ°ν ν¬μμ‘(λ§€λ
μ μ 립μ ν¬μκΈμμ λλ €λκ° κΈμ‘. (ex: λ§€λ
10λ§μμ© λ릴 μμ μ΄λΌλ©΄, 100,000 μ
λ ₯)) π
# - **λ°°λΉκΈ μ¬ν¬μ μ¬λΆ (reinvest_dividends)**: λ°°λΉκΈμ μ¬ν¬μν μ§ μ¬λΆ π
# - **μν΄ μ μμ΅λ₯ (pre_retirement_roi)**: μν΄ μ μμ μ° μμ΅λ₯ π
# - **μν΄ μ λ°°λΉ μμ΅λ₯ (pre_retirement_dividend_yield)**: μν΄ μ λ°°λΉκΈ μμ΅λ₯ π
# - **μν΄ ν μμ΅λ₯ (post_retirement_roi)**: μν΄ ν μμ μ° μμ΅λ₯ πΏ
# - **μν΄ ν λ°°λΉ μμ΅λ₯ (post_retirement_dividend_yield)**: μν΄ ν λ°°λΉκΈ μμ΅λ₯ π΅
# ### 2. κ³μ° κ³Όμ π’
# **1) μν΄ μ μμ° κ³μ°**
# νμ¬ μμ°κ³Ό λ§€μ μΆκ° ν¬μμ‘μ κ³ λ €ν΄ μν΄ μ μμ°μ κ³μ°ν΄μ. μλ³ μμ΅λ₯ μ μ μ©νμ¬ μμ°μ΄ μ΄λ»κ² μ±μ₯ν μ§ μμΈ‘ν©λλ€.
# **곡μ:**
# \[ \text{μκ° μμ΅λ₯ } = \left(1 + \frac{\text{μ° μμ΅λ₯ }}{100}\right)^{\frac{1}{12}} - 1 \]
# **2) μν΄ ν μμ° λ° λ°°λΉ μμ΅ κ³μ°**
# μν΄ μμ μ μμ°κ³Ό λ°°λΉ μμ΅μ κΈ°λ‘νκ³ , μν΄ ν λ§€λ
μμ°κ³Ό λ°°λΉ μμ΅μ μ
λ°μ΄νΈν©λλ€. λ§€λ
νμν μνλΉλ λ¬Όκ° μμΉλ₯ μ λ§μΆ° μ‘°μ ν©λλ€.
# **3) μΆκ° νκΈ νμλ κ³μ°**
# λ°°λΉ μμ΅κ³Ό νμν μνλΉλ₯Ό λΉκ΅νμ¬ μΆκ°λ‘ νμν νκΈμ κ³μ°ν΄μ.
# **곡μ:**
# \[ \text{μ°κ° νμν μνλΉ} = \text{μλ³ νμν μνλΉ} \times 12 \]
# \[ \text{μΆκ° νκΈ νμλ} = \text{μ°κ° νμν μνλΉ} - \text{μ°κ° λ°°λΉ μμ΅} \]
# ### 3. κ²°κ³Ό μΆλ ₯ π
# κ³μ°λ κ²°κ³Όλ λ€μκ³Ό κ°μ νμμΌλ‘ μ 곡λ©λλ€:
# - **μν΄ μ§ν νμν μνλΉ**μ **λ°°λΉ μμ΅**μ νλμ λ³Ό μ μμ΄μ.
# - μν΄ ν λ§€λ
μμ°, νμν μνλΉ, λ°°λΉ μμ΅ λ±μ νλ‘ νμΈν μ μμ΅λλ€.
# - μΆκ°λ‘ νμν νκΈμ κ³μ°νμ¬ μ΄ νμ νκΈμ 보μ¬μ€λλ€.
# ### μμ π
# **μ
λ ₯ κ° μμ:**
# - νμ¬ λμ΄: 40μΈ
# - μν΄ λμ΄: 65μΈ
# - νμ κΈ°λ μλͺ
: 85μΈ
# - μλ³ νμν μνλΉ: 2,000,000 μ
# - μΈνλ μ΄μ
μ¨: 2%
# - νμ¬ ν¬μμ‘: 50,000,000 μ
# - μλ³ μΆκ° ν¬μμ‘: 500,000 μ
# - μλ³ ν¬μ μ¦κ°μ‘: 50,000 μ
# - λ°°λΉκΈ μ¬ν¬μ μ¬λΆ: μ
# - μν΄ μ μμ΅λ₯ : 5%
# - μν΄ μ λ°°λΉ μμ΅λ₯ : 2%
# - μν΄ ν μμ΅λ₯ : 4%
# - μν΄ ν λ°°λΉ μμ΅λ₯ : 2%
# **μΆλ ₯ κ²°κ³Ό:**
# - μν΄ μ§ν μλ³ νμν μνλΉ: 2,000,000 μ
# - μν΄ μ§ν μλ³ λ°°λΉ μμ΅: 500,000 μ
# - μ΄ μΆκ° νκΈ νμλ: λ§€λ
μΆκ°λ‘ νμν κΈμ‘
# **κ·Έλνμ CSV νμΌ π:**
# - μν΄ κ³νμ μκ°μ μΌλ‘ 보μ¬μ£Όλ κ·Έλνμ κ³μ° κ²°κ³Όλ₯Ό ν¬ν¨ν CSV νμΌ λ€μ΄λ‘λ λ§ν¬λ μ 곡λ©λλ€.
# μν΄ κ³ν κ³μ°κΈ°λ₯Ό ν΅ν΄ μ¬λ¬λΆμ μ¬μ κ³νμ 미리 μ€λΉνκ³ , μμ μ μΈ λ―Έλλ₯Ό κ³νν΄λ³΄μΈμ! ππΌ
# ### λ©΄μ±
μ‘°ν
# μ΄ λꡬμμ μ 곡νλ μ 보λ μΌλ°μ μΈ μ 보 μ 곡 λͺ©μ λ§μ μν΄ μ 곡λ©λλ€. μ¬μ΄νΈμ λͺ¨λ μ 보λ μ μλ‘ μ 곡λμ§λ§, μ¬μ΄νΈμ μ 보μ μ νμ±, μ μ μ±, μ ν¨μ±, μ λ’°μ±, κ°μ©μ± λλ μμ μ±μ λν΄ λͺ
μμ μ΄λ 묡μμ μ΄λ μ΄λ ν μ’
λ₯μ μ§μ μ΄λ 보μ¦μ νμ§ μμ΅λλ€. μ¬μ΄νΈμ μ¬μ©κ³Ό μ¬μ΄νΈμ μ 보λ₯Ό μ λ’°νλ κ²μ μ μ μΌλ‘ μ¬μ©μμ μ±
μμ
λλ€.
# """,
# """
# ## ποΈ Retirement Planning Calculator Guide
# Welcome to the Retirement Planning Calculator! π This tool helps you forecast and prepare for your financial situation after retirement. Hereβs how it works and what information you need to provide:
# ### 1. Input Values π
# Please provide the following details:
# - **Current Age (current_age)**: Your current age π
# - **Retirement Age (retirement_age)**: Age at which you plan to retire π
# - **Life Expectancy (life_expectancy)**: Expected lifespan π
# - **Monthly Income Required (monthly_income_required)**: Monthly expenses needed π΅
# - **Inflation Rate (inflation_rate)**: Rate of inflation π
# - **Current Investment (current_investment)**: Amount currently invested π°
# - **Monthly Investment (monthly_investment)**: Additional monthly investment πΈ
# - **Annual Increase in Monthly Investment (annual_increase_in_monthly_investment)**: Increase in monthly investment (For example, if you plan to increase your monthly investment by $100,000 each year, enter 100,000.) π
# - **Reinvest Dividends (reinvest_dividends)**: Whether to reinvest dividends π
# - **Pre-Retirement ROI (pre_retirement_roi)**: Expected annual return before retirement π
# - **Pre-Retirement Dividend Yield (pre_retirement_dividend_yield)**: Dividend yield before retirement π
# - **Post-Retirement ROI (post_retirement_roi)**: Expected annual return after retirement πΏ
# - **Post-Retirement Dividend Yield (post_retirement_dividend_yield)**: Dividend yield after retirement π΅
# ### 2. Calculation Process π’
# **1) Pre-Retirement Asset Calculation**
# The calculator uses your current assets and monthly contributions to forecast your asset growth before retirement. Monthly returns are applied to estimate how your assets will grow.
# **Formula:**
# \[ \text{Monthly Return} = \left(1 + \frac{\text{Annual ROI}}{100}\right)^{\frac{1}{12}} - 1 \]
# **2) Post-Retirement Asset and Dividend Income Calculation**
# The calculator tracks your assets and dividend income at retirement, then updates these figures annually. It also adjusts monthly income needs for inflation.
# **3) Additional Cash Needed Calculation**
# It compares dividend income with required income to determine if additional cash is needed.
# **Formula:**
# \[ \text{Annual Income Required} = \text{Monthly Income Required} \times 12 \]
# \[ \text{Additional Cash Required} = \text{Annual Income Required} - \text{Annual Dividend Income} \]
# ### 3. Results π
# The results are displayed as follows:
# - **Immediate Post-Retirement Income Needs** and **Dividend Income** for easy comparison.
# - Annual asset, required income, and dividend income details in a table.
# - Total additional cash required to cover any shortfall.
# ### Example π
# **Example Input Values:**
# - Current Age: 40 years
# - Retirement Age: 65 years
# - Life Expectancy: 85 years
# - Monthly Income Required: $2,000
# - Inflation Rate: 2%
# - Current Investment: $50,000
# - Monthly Investment: $500
# - Monthly Increase in Investment: $50
# - Reinvest Dividends: Yes
# - Pre-Retirement ROI: 5%
# - Pre-Retirement Dividend Yield: 2%
# - Post-Retirement ROI: 4%
# - Post-Retirement Dividend Yield: 2%
# **Output Results:**
# - Monthly Income Required Immediately After Retirement: $2,000
# - Monthly Dividend Income Immediately After Retirement: $500
# - Total Additional Cash Required: Amount needed annually
# **Graph and CSV File π:**
# - Visual graphs of the retirement plan and a CSV file with detailed calculations are available for download.
# Use the Retirement Planning Calculator to prepare for your future and ensure a secure retirement! ππΌ
# ### Disclaimer
# 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.
# """
# )
gr.Markdown("""
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.
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M8SBRC396DPBW)
Or, if you prefer, you can also support us through KakaoPay at:
<a href="https://qr.kakaopay.com/Ej7jF6o7B" target="_blank">
<img src="https://t1.kakaocdn.net/pay_brand_admin/file/NvAxmhwMItNT4J2Uq1Rxt/ic-pfm.png" alt="Donate with KakaoPay" style="width: 150px;">
</a>
If you have any questions or feedback, please contact us at: <a href="mailto:cryman38@daum.net">cryman38@daum.net</a>
""")
|