From 952dfcd266b3d3908115ddba4d4843905205b23d Mon Sep 17 00:00:00 2001 From: "Bobby (aider)" Date: Mon, 10 Feb 2025 10:18:59 -0800 Subject: [PATCH] fix: Correct menu logic for portfolio value update and system exit --- src/trading/main.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/trading/main.py b/src/trading/main.py index 1811f6a..6b7bd90 100644 --- a/src/trading/main.py +++ b/src/trading/main.py @@ -145,6 +145,17 @@ def main(): print(f"\nRemoved position: {symbol}") elif choice == "5": + new_value = get_float_input("Enter new portfolio value: $") + new_cash = get_float_input("Enter new cash balance: $") + notes = input("Notes (optional): ") + if new_value and new_cash: + portfolio_value = new_value + cash_balance = new_cash + update_portfolio_value(portfolio_value, cash_balance, notes) + print(f"\nPortfolio value updated: ${portfolio_value:.2f}") + print(f"Cash balance updated: ${cash_balance:.2f}") + + elif choice == "6": print("\nExiting Trading Management System") break