Upload 2 files
Browse files
LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
MIT License
|
3 |
+
|
4 |
+
Copyright (c) 2024 cryman38
|
5 |
+
|
6 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 |
+
of this software and associated documentation files (the "Software"), to deal
|
8 |
+
in the Software without restriction, including without limitation the rights
|
9 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10 |
+
copies of the Software, and to permit persons to whom the Software is
|
11 |
+
furnished to do so, subject to the following conditions:
|
12 |
+
|
13 |
+
The above copyright notice and this permission notice shall be included in all
|
14 |
+
copies or substantial portions of the Software.
|
15 |
+
|
16 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22 |
+
SOFTWARE.
|
README.md
CHANGED
@@ -1,12 +1,66 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# Portfolio Re-Balancing Analysis
|
3 |
+
|
4 |
+
## Overview
|
5 |
+
This application allows users to analyze and rebalance their investment portfolios. The main currency is KRW (South Korean Won), and it supports various stock tickers and cash investments. The tool calculates the necessary trades to achieve the desired target weights for each asset.
|
6 |
+
|
7 |
+
## Features
|
8 |
+
- **Portfolio Re-Balancing:** Automatically calculates the necessary trades to balance your portfolio.
|
9 |
+
- **Currency Conversion:** Fetches real-time exchange rates to reflect accurate stock prices.
|
10 |
+
- **Flexible Input:** Supports basic arithmetic operations for input values.
|
11 |
+
- **Cash Management:** Allows users to specify additional cash investments and target cash ratios.
|
12 |
+
|
13 |
+
## Usage
|
14 |
+
To use this application, visit the following URL:
|
15 |
+
|
16 |
+
[Portfolio Re-Balancing App Demo](https://huggingface.co/spaces/cryman38/re-balancing-app-demo)
|
17 |
+
|
18 |
+
### Input Format
|
19 |
+
- **Stocks:** Specify the currency, ticker, quantity, and target weight.
|
20 |
+
- Format: `currency ticker quantity target_weight`
|
21 |
+
- Example: `usd schd 545 8`
|
22 |
+
- **Cash:** Specify the additional investment amount.
|
23 |
+
- Example: `36974411` (additional investment)
|
24 |
+
- **Cash Ratio:** Use the slider to set the target cash ratio as a percentage.
|
25 |
+
|
26 |
+
### Example
|
27 |
+
1. **Portfolio Data Input:**
|
28 |
+
```
|
29 |
+
usd schd 545 8, usd qqq 22 2
|
30 |
+
```
|
31 |
+
|
32 |
+
2. **Additional Investment:**
|
33 |
+
```
|
34 |
+
36974411
|
35 |
+
```
|
36 |
+
|
37 |
+
3. **Target Cash Ratio:**
|
38 |
+
Use the slider to set the desired cash ratio (e.g., 33%).
|
39 |
+
|
40 |
+
### Result Format
|
41 |
+
The output will display the necessary trades to achieve the target weights:
|
42 |
+
- **Stock Ticker @ Price**
|
43 |
+
- Current Value [Current Percentage]
|
44 |
+
- [Target Percentage] Trade Quantity
|
45 |
+
- **Example:**
|
46 |
+
```
|
47 |
+
SCHD @ 75,000
|
48 |
+
3,000,000 [30.0%]
|
49 |
+
[40.0%] +200
|
50 |
+
|
51 |
+
QQQ @ 150,000
|
52 |
+
1,500,000 [15.0%]
|
53 |
+
[20.0%] +50
|
54 |
+
|
55 |
+
Cash
|
56 |
+
2,500,000 [25.0%]
|
57 |
+
[40.0%] +1,000,000
|
58 |
+
|
59 |
+
Total Portfolio Value: 10,000,000
|
60 |
+
```
|
61 |
+
|
62 |
+
## License
|
63 |
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
64 |
+
|
65 |
+
## Contact
|
66 |
+
For any questions or feedback, please contact [your-email@example.com](mailto:your-email@example.com).
|