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>
3527 unmodified lines3528352935303531353235333534353535363537353815 unmodified lines35543555355635573558355935603561356235633564709 unmodified lines4274427542764277427842794280428142824283428416 unmodified lines430143024303430443054306430743084309431043111472 unmodified lines5784578557865787578857895790579157925793579420 unmodified lines581558165817581858195820582158225823582458253527 unmodified lines# Build monthly income/overhead data for waterfall calculationGP_BALANCE_THRESHOLD_INV = 300_000# GP Investment from sidebar is the TOTAL cash the investor puts in at month 1# No additional cash injections - this is all they contribute# Scale up to total GP: if investor owns 10% and invests $100K, total GP has $1Mtotal_gp_investment_inv = gp_inv_amount / gp_own_pct if gp_own_pct > 0 else gp_inv_amounttotal_gp_balance_inv = total_gp_investment_inv # Start with total GP Investmentgp_investor_monthly_inv = []for month_idx, month in enumerate(range(1, max_month_inv + 1)):15 unmodified linestotal_gp_balance_inv = GP_BALANCE_THRESHOLD_INV# GP Investor's cash flows:# Month 1: Cash In = their investment amount (from sidebar)# Other months: Cash In = 0 (no additional contributions)# Distribution = their share of any distributionsif month == 1:investor_cash_in = gp_inv_amountelse:investor_cash_in = 0709 unmodified lines})# Second pass: Calculate distributions based on TOTAL GP balance# GP Investment from sidebar is the TOTAL cash the investor puts in at month 1# No additional cash injections - this is all they contribute# Scale up to total GP: if investor owns 10% and invests $100K, total GP has $1Mtotal_gp_investment_tab5 = gp_inv_amount_tab5 / gp_own_pct_tab5 if gp_own_pct_tab5 > 0 else gp_inv_amount_tab5total_gp_balance_tab5 = total_gp_investment_tab5 # Start with total GP Investmentgp_investor_monthly_tab5 = []for month_idx, month in enumerate(range(1, max_month_gp_inv + 1)):16 unmodified linestotal_gp_balance_tab5 = GP_BALANCE_THRESHOLD_TAB5# GP Investor's cash flows:# Month 1: Cash In = their investment amount (from sidebar)# Other months: Cash In = 0 (no additional contributions)# Distribution = their share of any distributionsif month == 1:investor_cash_in = gp_inv_amount_tab5else:investor_cash_in = 01472 unmodified lines})# Second pass: Calculate distributions based on TOTAL GP balance# GP Investment from sidebar is the TOTAL cash the investor puts in at month 1# No additional cash injections - this is all they contribute# Scale up to total GP: if investor owns 10% and invests $100K, total GP has $1Mtotal_gp_investment = gp_inv_amount / gp_own_pct if gp_own_pct > 0 else gp_inv_amounttotal_gp_balance = total_gp_investment # Start with total GP Investmenttotal_distributions_paid = 0gp_investor_monthly_data = []20 unmodified linestotal_distributions_paid += distribution# GP Investor's cash flows:# Month 1: Cash In = their investment amount (from sidebar)# Other months: Cash In = 0 (no additional contributions)# Distribution = their share of any distributionsif month == 1:investor_cash_in = gp_inv_amountelse:investor_cash_in = 03527 unmodified lines3528352935303531353235333534353535363537353815 unmodified lines35543555355635573558355935603561356235633564709 unmodified lines4274427542764277427842794280428142824283428416 unmodified lines430143024303430443054306430743084309431043111472 unmodified lines5784578557865787578857895790579157925793579420 unmodified lines581558165817581858195820582158225823582458253527 unmodified lines# Build monthly income/overhead data for waterfall calculationGP_BALANCE_THRESHOLD_INV = 300_000# GP Investment from sidebar = TOTAL GP cash# The investor owns gp_own_pct of the GP, so their cash in = gp_inv_amount * gp_own_pct# Example: GP Investment = $255K, ownership = 10% -> investor put in $25.5Kinvestor_initial_cash = gp_inv_amount * gp_own_pcttotal_gp_balance_inv = gp_inv_amount # Total GP starts with GP Investmentgp_investor_monthly_inv = []for month_idx, month in enumerate(range(1, max_month_inv + 1)):15 unmodified linestotal_gp_balance_inv = GP_BALANCE_THRESHOLD_INV# GP Investor's cash flows:# Month 1: Cash In = their share of GP Investment (gp_inv_amount * ownership %)# Other months: Cash In = 0 (no additional contributions)# Distribution = their share of any distributions (distribution * ownership %)if month == 1:investor_cash_in = investor_initial_cashelse:investor_cash_in = 0709 unmodified lines})# Second pass: Calculate distributions based on TOTAL GP balance# GP Investment from sidebar = TOTAL GP cash# The investor owns gp_own_pct_tab5 of the GP, so their cash in = gp_inv_amount_tab5 * gp_own_pct_tab5# Example: GP Investment = $255K, ownership = 10% -> investor put in $25.5Kinvestor_initial_cash_tab5 = gp_inv_amount_tab5 * gp_own_pct_tab5total_gp_balance_tab5 = gp_inv_amount_tab5 # Total GP starts with GP Investmentgp_investor_monthly_tab5 = []for month_idx, month in enumerate(range(1, max_month_gp_inv + 1)):16 unmodified linestotal_gp_balance_tab5 = GP_BALANCE_THRESHOLD_TAB5# GP Investor's cash flows:# Month 1: Cash In = their share of GP Investment (gp_inv_amount * ownership %)# Other months: Cash In = 0 (no additional contributions)# Distribution = their share of any distributions (distribution * ownership %)if month == 1:investor_cash_in = investor_initial_cash_tab5else:investor_cash_in = 01472 unmodified lines})# Second pass: Calculate distributions based on TOTAL GP balance# GP Investment from sidebar = TOTAL GP cash# The investor owns gp_own_pct of the GP, so their cash in = gp_inv_amount * gp_own_pct# Example: GP Investment = $255K, ownership = 10% -> investor put in $25.5Kinvestor_initial_cash = gp_inv_amount * gp_own_pcttotal_gp_balance = gp_inv_amount # Total GP starts with GP Investmenttotal_distributions_paid = 0gp_investor_monthly_data = []20 unmodified linestotal_distributions_paid += distribution# GP Investor's cash flows:# Month 1: Cash In = their share of GP Investment (gp_inv_amount * ownership %)# Other months: Cash In = 0 (no additional contributions)# Distribution = their share of any distributions (distribution * ownership %)if month == 1:investor_cash_in = investor_initial_cashelse:investor_cash_in = 0
app.py+24-24