From ef2374a88c555257f84ad9e629910fb12986aea0 Mon Sep 17 00:00:00 2001 From: Tyler Date: Mon, 30 Mar 2026 23:27:45 -0700 Subject: Update README with all new features Covers: score card, 52W range bar, short interest, Options tab, CSV exports, 7-tab Valuation panel, self-computed key ratios (no FMP quota), updated project structure, corrected API usage table. Co-Authored-By: Claude Sonnet 4.6 --- README.html | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 103 ++++++++++++++++++++++++++++++------------- 2 files changed, 215 insertions(+), 31 deletions(-) create mode 100644 README.html diff --git a/README.html b/README.html new file mode 100644 index 0000000..f866d8d --- /dev/null +++ b/README.html @@ -0,0 +1,143 @@ + + + + + + + +

🔷 Prism

+

A local financial analysis dashboard. Search any stock ticker to get a comprehensive view of financials, valuation, options flow, insider activity, SEC filings, and news — all in your browser.

+
+

Features

+

Market Bar

+

Live S&P 500, NASDAQ, DOW, and VIX at the top of every page.

+

Overview

+ +

Financials

+

Annual and quarterly Income Statement, Balance Sheet, and Cash Flow Statement with year-over-year % change columns color-coded green/red (cost/debt rows are correctly inverted). CSV export on every statement.

+

Valuation

+

Seven sub-tabs:

+ + + + + + + + + + + + + +
TabContents
Key RatiosP/E, Forward P/E, P/S, P/B, EV/EBITDA, EV/Revenue, margins, ROE, ROA, ROIC, D/E, current/quick ratio, interest coverage, dividend yield, payout ratio
Historical RatiosAnnual P/E, P/B, P/S, EV/EBITDA, margins, ROE, ROA, D/E charted over time
DCF ModelAdjustable WACC, terminal growth, projection years, FCF growth; waterfall chart; EV/EBITDA implied price below
CompsPeer valuation table with editable ticker set
Forward EstimatesAnalyst revenue, EPS, and EBITDA estimates with low/avg/high ranges and chart overlay
Analyst TargetsPrice target range (low/mean/median/high), upside to mean, recommendation distribution chart
Earnings HistoryEPS actual vs. estimate, surprise %, color-coded table, chart; CSV export
+

All Key Ratios are self-computed from raw yfinance quarterly statements — no FMP quota consumed.

+

Options

+ +

Insiders

+

Buy/sell transaction history with monthly activity bar chart and filterable table.

+

Filings

+

Recent 10-K, 10-Q, and 8-K filings with direct EDGAR exhibit links, color-coded by type.

+

News

+

Recent articles with Bullish / Bearish / Neutral sentiment badges and a 7-day sentiment summary.

+
+

Setup

+

1. Navigate to the project

+
cd ~/Work/prism
+

2. Activate the virtual environment

+
source .venv/bin/activate
+

3. Add API keys

+
cp .env.example .env
+

Open .env and fill in your keys:

+
FMP_API_KEY=your_key_here
+FINNHUB_API_KEY=your_key_here
+

Both are free:

+ +

No keys? Most of Prism still works. Overview, Financials, Key Ratios, Historical Ratios (yfinance fallback), Options, Insiders, Filings, and the DCF model all run without any API key. The Comps peer list, Forward Estimates, and News require FMP/Finnhub keys.

+

4. Run the app

+
streamlit run app.py
+

Opens at http://localhost:8501

+
+

Daily Usage

+
cd ~/Work/prism
+source .venv/bin/activate
+streamlit run app.py
+
+

Project Structure

+
prism/
+├── app.py                        # Entry point — sidebar, market bar, tab routing
+├── requirements.txt
+├── .env                          # Your API keys (not committed)
+├── .env.example                  # Key template
+├── .streamlit/
+│   └── config.toml               # Dark theme + layout settings
+├── assets/
+│   └── logo.png                  # Sidebar logo
+├── services/
+│   ├── data_service.py           # yfinance — price, financials, options, compute_ttm_ratios
+│   ├── fmp_service.py            # FMP API — peers, forward estimates, historical ratios, news
+│   ├── news_service.py           # Finnhub — news + sentiment
+│   └── valuation_service.py      # DCF engine + EV/EBITDA implied price
+├── components/
+│   ├── market_bar.py             # Index metrics row
+│   ├── overview.py               # Score card, 52W bar, short interest, price chart
+│   ├── financials.py             # Color-coded statement tables + CSV export
+│   ├── valuation.py              # 7-tab valuation panel
+│   ├── options.py                # Options flow — P/C ratio, IV smile, OI chart
+│   ├── insiders.py               # Insider buy/sell history
+│   ├── filings.py                # SEC filings
+│   └── news.py                   # News feed + sentiment
+└── utils/
+    └── formatters.py             # Number formatting helpers
+
+

DCF Model Notes

+

The DCF uses historical Free Cash Flow from yfinance and projects forward using your chosen assumptions:

+ + + + + + + + + + +
InputDefaultRange
WACC10%5–20%
Terminal Growth Rate2.5%0.5–5%
Projection Years53–10
FCF Growth RateHistorical median−20–30%
+

Terminal value uses the Gordon Growth Model. Enterprise value is bridged to equity value using net debt before calculating value per share. The FCF growth slider defaults to the historical median and can be overridden.

+

The EV/EBITDA section derives an implied price from a target multiple applied to trailing EBITDA (sourced from the income statement, not the info dict). The slider defaults to the current computed market multiple.

+
+

API Usage

+ + + + + + + + + +
SourceLimitUsed For
yfinanceNonePrice, financials, options, insiders, filings, all key ratios
FMP (free)250 req/dayPeer discovery, forward estimates, historical ratios, news
Finnhub (free)60 req/minNews sentiment
+

All key ratios are computed locally from quarterly statements — Prism only calls FMP for data that cannot be derived from raw statements. Data is cached per session (financials: 1h, news: 10min, indices: 5min, options: 15min).

+ + diff --git a/README.md b/README.md index f50a4a8..f4b471e 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,58 @@ # 🔷 Prism -A local financial analysis dashboard. Enter any stock ticker to get a formatted view of financial statements, valuation metrics, a DCF model, and a news feed — all in your browser. +A local financial analysis dashboard. Search any stock ticker to get a comprehensive view of financials, valuation, options flow, insider activity, SEC filings, and news — all in your browser. --- ## Features -- **Market Bar** — Live S&P 500, NASDAQ, DOW, and VIX at the top of every page -- **Overview** — Price chart (1M / 3M / 6M / 1Y / 5Y), key stats (market cap, P/E, 52W range, beta) -- **Financials** — Annual and quarterly Income Statement, Balance Sheet, and Cash Flow Statement with year-over-year % change columns -- **Valuation** — Key ratios grid (P/E, EV/EBITDA, margins, ROE, etc.), DCF model with adjustable WACC/growth/years, EV/EBITDA implied price, comparable companies table, analyst price targets, and earnings history (EPS actual vs. estimate) -- **News** — Recent articles with heuristic Bullish / Bearish / Neutral tags and a 7-day sentiment summary +### Market Bar +Live S&P 500, NASDAQ, DOW, and VIX at the top of every page. + +### Overview +- **Score card** — at-a-glance green/yellow/red signal badges for Valuation, Growth, Profitability, Leverage, Momentum, and Short Interest +- **52-week range bar** — visual indicator showing where the current price sits between the 52W low and high, with % context +- **Short interest** — % of float, days to cover, shares short vs. prior month +- Price chart (1M / 3M / 6M / 1Y / 5Y), key stats (market cap, P/E, volume, beta) + +### Financials +Annual and quarterly Income Statement, Balance Sheet, and Cash Flow Statement with year-over-year % change columns color-coded green/red (cost/debt rows are correctly inverted). CSV export on every statement. + +### Valuation +Seven sub-tabs: + +| Tab | Contents | +|---|---| +| Key Ratios | P/E, Forward P/E, P/S, P/B, EV/EBITDA, EV/Revenue, margins, ROE, ROA, ROIC, D/E, current/quick ratio, interest coverage, dividend yield, payout ratio | +| Historical Ratios | Annual P/E, P/B, P/S, EV/EBITDA, margins, ROE, ROA, D/E charted over time | +| DCF Model | Adjustable WACC, terminal growth, projection years, FCF growth; waterfall chart; EV/EBITDA implied price below | +| Comps | Peer valuation table with editable ticker set | +| Forward Estimates | Analyst revenue, EPS, and EBITDA estimates with low/avg/high ranges and chart overlay | +| Analyst Targets | Price target range (low/mean/median/high), upside to mean, recommendation distribution chart | +| Earnings History | EPS actual vs. estimate, surprise %, color-coded table, chart; CSV export | + +> All Key Ratios are self-computed from raw yfinance quarterly statements — no FMP quota consumed. + +### Options +- Put/call ratio by volume and open interest (with Bullish / Neutral / Bearish label) +- IV smile chart (calls and puts) with ATM marker +- Open interest by strike (calls above axis, puts mirrored below) +- Full options chain table (expandable) + +### Insiders +Buy/sell transaction history with monthly activity bar chart and filterable table. + +### Filings +Recent 10-K, 10-Q, and 8-K filings with direct EDGAR exhibit links, color-coded by type. + +### News +Recent articles with Bullish / Bearish / Neutral sentiment badges and a 7-day sentiment summary. --- ## Setup -### 1. Clone / navigate to the project +### 1. Navigate to the project ```bash cd ~/Work/prism @@ -45,7 +81,7 @@ Both are **free**: - **FMP** (Financial Modeling Prep) — [financialmodelingprep.com](https://financialmodelingprep.com/developer/docs) — 250 requests/day - **Finnhub** — [finnhub.io](https://finnhub.io) — 60 requests/minute -> **No keys?** The app still works. Price data, financials, and market indices are sourced from `yfinance` (no key required). Ratios, comps, and news won't load until keys are added. +> **No keys?** Most of Prism still works. Overview, Financials, Key Ratios, Historical Ratios (yfinance fallback), Options, Insiders, Filings, and the DCF model all run without any API key. The Comps peer list, Forward Estimates, and News require FMP/Finnhub keys. ### 4. Run the app @@ -71,52 +107,57 @@ streamlit run app.py ``` prism/ -├── app.py # Entry point +├── app.py # Entry point — sidebar, market bar, tab routing ├── requirements.txt -├── .env # Your API keys (not committed) -├── .env.example # Key template +├── .env # Your API keys (not committed) +├── .env.example # Key template ├── .streamlit/ -│ └── config.toml # Dark theme + layout settings +│ └── config.toml # Dark theme + layout settings +├── assets/ +│ └── logo.png # Sidebar logo ├── services/ -│ ├── data_service.py # yfinance — price, financials, indices -│ ├── fmp_service.py # FMP API — ratios, peers -│ ├── news_service.py # Finnhub — news + sentiment -│ └── valuation_service.py # DCF engine (Gordon Growth Model) +│ ├── data_service.py # yfinance — price, financials, options, compute_ttm_ratios +│ ├── fmp_service.py # FMP API — peers, forward estimates, news, historical ratios +│ ├── news_service.py # Finnhub — news + sentiment +│ └── valuation_service.py # DCF engine + EV/EBITDA implied price ├── components/ -│ ├── market_bar.py # Index metrics row -│ ├── overview.py # Company header + price chart -│ ├── financials.py # Statement tables -│ ├── valuation.py # Ratios, DCF, comps -│ └── news.py # News feed +│ ├── market_bar.py # Index metrics row +│ ├── overview.py # Score card, 52W bar, short interest, price chart +│ ├── financials.py # Color-coded statement tables + CSV export +│ ├── valuation.py # 7-tab valuation panel +│ ├── options.py # Options flow — P/C ratio, IV smile, OI chart +│ ├── insiders.py # Insider buy/sell history +│ ├── filings.py # SEC filings +│ └── news.py # News feed + sentiment └── utils/ - └── formatters.py # Number formatting helpers + └── formatters.py # Number formatting helpers ``` --- ## DCF Model Notes -The DCF model uses historical **Free Cash Flow** from yfinance, computes a capped median growth rate from valid positive-FCF periods, and then projects forward using your chosen assumptions: +The DCF uses historical **Free Cash Flow** from yfinance and projects forward using your chosen assumptions: | Input | Default | Range | |---|---|---| | WACC | 10% | 5–20% | | Terminal Growth Rate | 2.5% | 0.5–5% | | Projection Years | 5 | 3–10 | -| FCF Growth Rate | Historical median | -20–30% | +| FCF Growth Rate | Historical median | −20–30% | -The model uses the **Gordon Growth Model** for terminal value. It first estimates **enterprise value**, then bridges to **equity value** using debt and cash before calculating value per share. Terminal growth must remain below WACC. The FCF growth slider defaults to the historical median but can be freely overridden. +Terminal value uses the **Gordon Growth Model**. Enterprise value is bridged to equity value using net debt before calculating value per share. The FCF growth slider defaults to the historical median and can be overridden. -The **EV/EBITDA** tab derives an implied price by applying a target multiple to trailing EBITDA, subtracting net debt, and dividing by shares outstanding. The slider defaults to the company's current market multiple. +The **EV/EBITDA** section derives an implied price from a target multiple applied to trailing EBITDA (sourced from the income statement, not the info dict). The slider defaults to the current computed market multiple. --- -## API Rate Limits +## API Usage | Source | Limit | Used For | |---|---|---| -| yfinance | None | Price, financials, indices | -| FMP (free) | 250 req/day | Ratios, comps, news | -| Finnhub (free) | 60 req/min | News, sentiment | +| yfinance | None | Price, financials, options, insiders, filings, all key ratios | +| FMP (free) | 250 req/day | Peer discovery, forward estimates, historical ratios, news | +| Finnhub (free) | 60 req/min | News sentiment | -Data is cached in-memory per session to minimize API calls (financials: 1h, news: 10min, indices: 5min). +All key ratios are computed locally from quarterly statements — Prism only calls FMP for data that cannot be derived from raw statements. Data is cached per session (financials: 1h, news: 10min, indices: 5min, options: 15min). -- cgit v1.3-2-g0d8e