Spaces:
Sleeping
Sleeping
Commit ·
21b021e
1
Parent(s): f6e4a51
Fix GP Investor: GP Investment is TOTAL GP cash, not investor's share
Browse files- GP Investment from sidebar = TOTAL GP cash (e.g., $255K)
- Investor's Cash In = GP Investment × ownership % (e.g., $255K × 10% = $25.5K)
- Total GP balance starts with GP Investment ($255K), not scaled up
- Distribution to investor = total distribution × ownership %
- Fixed in all 3 locations: GP Investor toggle, Entire GP section, GP vs LP tab
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -3528,11 +3528,11 @@ with tab5:
|
|
| 3528 |
# Build monthly income/overhead data for waterfall calculation
|
| 3529 |
GP_BALANCE_THRESHOLD_INV = 300_000
|
| 3530 |
|
| 3531 |
-
# GP Investment from sidebar
|
| 3532 |
-
#
|
| 3533 |
-
#
|
| 3534 |
-
|
| 3535 |
-
total_gp_balance_inv =
|
| 3536 |
gp_investor_monthly_inv = []
|
| 3537 |
|
| 3538 |
for month_idx, month in enumerate(range(1, max_month_inv + 1)):
|
|
@@ -3554,11 +3554,11 @@ with tab5:
|
|
| 3554 |
total_gp_balance_inv = GP_BALANCE_THRESHOLD_INV
|
| 3555 |
|
| 3556 |
# GP Investor's cash flows:
|
| 3557 |
-
# Month 1: Cash In = their
|
| 3558 |
# Other months: Cash In = 0 (no additional contributions)
|
| 3559 |
-
# Distribution = their share of any distributions
|
| 3560 |
if month == 1:
|
| 3561 |
-
investor_cash_in =
|
| 3562 |
else:
|
| 3563 |
investor_cash_in = 0
|
| 3564 |
|
|
@@ -4274,11 +4274,11 @@ with tab5:
|
|
| 4274 |
})
|
| 4275 |
|
| 4276 |
# Second pass: Calculate distributions based on TOTAL GP balance
|
| 4277 |
-
# GP Investment from sidebar
|
| 4278 |
-
#
|
| 4279 |
-
#
|
| 4280 |
-
|
| 4281 |
-
total_gp_balance_tab5 =
|
| 4282 |
gp_investor_monthly_tab5 = []
|
| 4283 |
|
| 4284 |
for month_idx, month in enumerate(range(1, max_month_gp_inv + 1)):
|
|
@@ -4301,11 +4301,11 @@ with tab5:
|
|
| 4301 |
total_gp_balance_tab5 = GP_BALANCE_THRESHOLD_TAB5
|
| 4302 |
|
| 4303 |
# GP Investor's cash flows:
|
| 4304 |
-
# Month 1: Cash In = their
|
| 4305 |
# Other months: Cash In = 0 (no additional contributions)
|
| 4306 |
-
# Distribution = their share of any distributions
|
| 4307 |
if month == 1:
|
| 4308 |
-
investor_cash_in =
|
| 4309 |
else:
|
| 4310 |
investor_cash_in = 0
|
| 4311 |
|
|
@@ -5784,11 +5784,11 @@ with tab11:
|
|
| 5784 |
})
|
| 5785 |
|
| 5786 |
# Second pass: Calculate distributions based on TOTAL GP balance
|
| 5787 |
-
# GP Investment from sidebar
|
| 5788 |
-
#
|
| 5789 |
-
#
|
| 5790 |
-
|
| 5791 |
-
total_gp_balance =
|
| 5792 |
total_distributions_paid = 0
|
| 5793 |
|
| 5794 |
gp_investor_monthly_data = []
|
|
@@ -5815,11 +5815,11 @@ with tab11:
|
|
| 5815 |
total_distributions_paid += distribution
|
| 5816 |
|
| 5817 |
# GP Investor's cash flows:
|
| 5818 |
-
# Month 1: Cash In = their
|
| 5819 |
# Other months: Cash In = 0 (no additional contributions)
|
| 5820 |
-
# Distribution = their share of any distributions
|
| 5821 |
if month == 1:
|
| 5822 |
-
investor_cash_in =
|
| 5823 |
else:
|
| 5824 |
investor_cash_in = 0
|
| 5825 |
|
|
|
|
| 3528 |
# Build monthly income/overhead data for waterfall calculation
|
| 3529 |
GP_BALANCE_THRESHOLD_INV = 300_000
|
| 3530 |
|
| 3531 |
+
# GP Investment from sidebar = TOTAL GP cash
|
| 3532 |
+
# The investor owns gp_own_pct of the GP, so their cash in = gp_inv_amount * gp_own_pct
|
| 3533 |
+
# Example: GP Investment = $255K, ownership = 10% -> investor put in $25.5K
|
| 3534 |
+
investor_initial_cash = gp_inv_amount * gp_own_pct
|
| 3535 |
+
total_gp_balance_inv = gp_inv_amount # Total GP starts with GP Investment
|
| 3536 |
gp_investor_monthly_inv = []
|
| 3537 |
|
| 3538 |
for month_idx, month in enumerate(range(1, max_month_inv + 1)):
|
|
|
|
| 3554 |
total_gp_balance_inv = GP_BALANCE_THRESHOLD_INV
|
| 3555 |
|
| 3556 |
# GP Investor's cash flows:
|
| 3557 |
+
# Month 1: Cash In = their share of GP Investment (gp_inv_amount * ownership %)
|
| 3558 |
# Other months: Cash In = 0 (no additional contributions)
|
| 3559 |
+
# Distribution = their share of any distributions (distribution * ownership %)
|
| 3560 |
if month == 1:
|
| 3561 |
+
investor_cash_in = investor_initial_cash
|
| 3562 |
else:
|
| 3563 |
investor_cash_in = 0
|
| 3564 |
|
|
|
|
| 4274 |
})
|
| 4275 |
|
| 4276 |
# Second pass: Calculate distributions based on TOTAL GP balance
|
| 4277 |
+
# GP Investment from sidebar = TOTAL GP cash
|
| 4278 |
+
# The investor owns gp_own_pct_tab5 of the GP, so their cash in = gp_inv_amount_tab5 * gp_own_pct_tab5
|
| 4279 |
+
# Example: GP Investment = $255K, ownership = 10% -> investor put in $25.5K
|
| 4280 |
+
investor_initial_cash_tab5 = gp_inv_amount_tab5 * gp_own_pct_tab5
|
| 4281 |
+
total_gp_balance_tab5 = gp_inv_amount_tab5 # Total GP starts with GP Investment
|
| 4282 |
gp_investor_monthly_tab5 = []
|
| 4283 |
|
| 4284 |
for month_idx, month in enumerate(range(1, max_month_gp_inv + 1)):
|
|
|
|
| 4301 |
total_gp_balance_tab5 = GP_BALANCE_THRESHOLD_TAB5
|
| 4302 |
|
| 4303 |
# GP Investor's cash flows:
|
| 4304 |
+
# Month 1: Cash In = their share of GP Investment (gp_inv_amount * ownership %)
|
| 4305 |
# Other months: Cash In = 0 (no additional contributions)
|
| 4306 |
+
# Distribution = their share of any distributions (distribution * ownership %)
|
| 4307 |
if month == 1:
|
| 4308 |
+
investor_cash_in = investor_initial_cash_tab5
|
| 4309 |
else:
|
| 4310 |
investor_cash_in = 0
|
| 4311 |
|
|
|
|
| 5784 |
})
|
| 5785 |
|
| 5786 |
# Second pass: Calculate distributions based on TOTAL GP balance
|
| 5787 |
+
# GP Investment from sidebar = TOTAL GP cash
|
| 5788 |
+
# The investor owns gp_own_pct of the GP, so their cash in = gp_inv_amount * gp_own_pct
|
| 5789 |
+
# Example: GP Investment = $255K, ownership = 10% -> investor put in $25.5K
|
| 5790 |
+
investor_initial_cash = gp_inv_amount * gp_own_pct
|
| 5791 |
+
total_gp_balance = gp_inv_amount # Total GP starts with GP Investment
|
| 5792 |
total_distributions_paid = 0
|
| 5793 |
|
| 5794 |
gp_investor_monthly_data = []
|
|
|
|
| 5815 |
total_distributions_paid += distribution
|
| 5816 |
|
| 5817 |
# GP Investor's cash flows:
|
| 5818 |
+
# Month 1: Cash In = their share of GP Investment (gp_inv_amount * ownership %)
|
| 5819 |
# Other months: Cash In = 0 (no additional contributions)
|
| 5820 |
+
# Distribution = their share of any distributions (distribution * ownership %)
|
| 5821 |
if month == 1:
|
| 5822 |
+
investor_cash_in = investor_initial_cash
|
| 5823 |
else:
|
| 5824 |
investor_cash_in = 0
|
| 5825 |
|