Skip to content

Commit

Permalink
feat: show previous closing prices in portfolio
Browse files Browse the repository at this point in the history
  • Loading branch information
arpandaze committed Jul 23, 2024
1 parent cb06da6 commit 9c7f446
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion nepseutils/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,21 @@ def do_portfolio(self, args):
for entry in portfolio:
total_value += entry.value_as_of_last_transaction_price

headers = ["Scrip", "Balance", "Last Transaction Price", "Value"]
headers = [
"Scrip",
"Balance",
"Previous Closing Price",
"Last Transaction Price",
"Value as of Prev Closing",
"Value",
]
table = [
[
itm.script,
itm.current_balance,
f"{itm.previous_closing_price:,.1f}",
f"{itm.last_transaction_price:,.1f}",
f"{itm.value_as_of_previous_closing_price:,.1f}",
f"{itm.value_as_of_last_transaction_price:,.1f}",
]
for itm in portfolio
Expand Down

0 comments on commit 9c7f446

Please sign in to comment.