diff options
Diffstat (limited to 'components/financials.py')
| -rw-r--r-- | components/financials.py | 60 |
1 files changed, 56 insertions, 4 deletions
diff --git a/components/financials.py b/components/financials.py index 9078770..bc2a482 100644 --- a/components/financials.py +++ b/components/financials.py @@ -5,12 +5,64 @@ import streamlit as st from services.data_service import get_income_statement, get_balance_sheet, get_cash_flow from utils.formatters import fmt_large -# Rows where a decline is actually good (e.g. costs, expenses) +# Rows where an increase is bad (decline = green, increase = red). +# Labels must match yfinance row names (case-insensitive after .strip().lower()). _INVERSE_ROWS = { - "cost of revenue", "cost of goods sold", "operating expenses", - "selling general administrative", "research development", - "interest expense", "income tax expense", "total expenses", + # ── Income statement ────────────────────────────────────────────────────── + "cost of revenue", "reconciled cost of revenue", + "operating expense", + "research and development", + "selling general and administration", + "total expenses", + "interest expense", + "interest expense non operating", + "tax provision", + "reconciled depreciation", # non-cash expense; higher = lower reported income + + # ── Balance sheet ───────────────────────────────────────────────────────── + "net debt", + "total debt", + "long term debt", + "long term debt and capital lease obligation", + "long term capital lease obligation", + "current debt", + "current debt and capital lease obligation", + "current capital lease obligation", + "capital lease obligations", + "other current borrowings", + "commercial paper", + "total liabilities net minority interest", + "total non current liabilities net minority interest", + "current liabilities", + "accounts payable", + "payables and accrued expenses", + "payables", + "current accrued expenses", + "total tax payable", + "income tax payable", + "current deferred liabilities", + "current deferred revenue", + "tradeand other payables non current", + + # ── Cash flow ───────────────────────────────────────────────────────────── + # Debt issuance: positive value = new borrowing = bad + "issuance of debt", + "long term debt issuance", + "net long term debt issuance", + "net short term debt issuance", + "net issuance payments of debt", + # Equity dilution: positive value = new shares issued = bad for holders + "issuance of capital stock", + "common stock issuance", + "net common stock issuance", + # Taxes & interest paid: higher outflow = bad + "income tax paid supplemental data", + "interest paid supplemental data", + # Buybacks shown as negative outflow — more negative = more buybacks = good, + # so INVERSE: decline (more negative) → green + "repurchase of capital stock", + "common stock payments", } |
