refactor: Update portfolio value calculation to include cash and current market positions

This commit is contained in:
Bobby (aider) 2025-02-18 20:44:17 -08:00
parent 735cfdfb65
commit c6da08351f

View File

@ -251,10 +251,10 @@ def trading_journal_page():
avg_entry = summary['avg_entry_price']
position_value = current_price * shares
total_invested_value += position_value
total_invested_value += current_price * shares
total_paper_pl += (current_price - avg_entry) * shares
# Calculate total portfolio value
# Calculate total portfolio value (cash + invested value)
total_portfolio_value = cash_balance + total_invested_value
with col1: