aboutsummaryrefslogtreecommitdiff
path: root/services/fmp_service.py
AgeCommit message (Collapse)Author
4 daysRefactor valuation models tabTyler
4 daysHarden valuation edge casesOpenclaw
7 daysUnify valuation calculations across PrismOpenclaw
- compute EV consistently as market cap + debt - cash - derive DCF/EV bridge inputs from balance-sheet rows - centralize latest price, shares outstanding, and computed market cap helpers - relabel negative net debt as net cash in valuation UI - self-compute historical ratios/key metrics instead of relying on vendor ratios - guard against nonsensical historical EV/EBITDA values - add methodology/source notes in DCF tab
7 daysCompute all Key Ratios from raw statements, eliminating FMP ratio callsTyler
Added compute_ttm_ratios() which derives all 16 TTM ratios directly from yfinance quarterly income statements, balance sheets, and cash flow: Valuation: P/E, P/S, P/B, EV/EBITDA, EV/Revenue Profitability: Gross/Operating/Net Margin, ROE, ROA, ROIC Leverage: D/E, Current Ratio, Quick Ratio, Interest Coverage Dividends: Yield, Payout Ratio get_key_ratios() no longer calls FMP's /ratios-ttm or /key-metrics-ttm endpoints, saving ~2 FMP API calls per ticker load (including each Comps peer). Forward P/E still comes from yfinance info dict (analyst estimate). This also fixes EV/EBITDA for all tickers (DDOG was 4998x from FMP/yfinance pre-computed values, now correctly 194x from income statement EBITDA). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 daysAdd yfinance fallback for historical ratios when FMP quota is exhaustedTyler
FMP free tier caps at 250 req/day; hitting the limit caused the Historical Ratios tab to show an error. get_historical_ratios_yfinance now computes margins, ROE, ROA, D/E, P/E, P/B, P/S, and EV/EBITDA directly from yfinance income statements, balance sheets, and price history. FMP functions fall back to this automatically when they receive an empty response. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 daysMigrate FMP ratios and improve comps fallbacksTyler
Switch historical ratios, key metrics, and analyst estimates from deprecated v3 legacy endpoints to stable API equivalents. Quarterly analyst estimates dropped (premium-only on stable API). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 daysAdd historical ratios, forward estimates, insider transactions, SEC filingsOpenclaw
- services/fmp_service.py: add get_historical_ratios, get_historical_key_metrics, get_analyst_estimates, get_insider_transactions, get_sec_filings - components/valuation.py: add Historical Ratios and Forward Estimates subtabs - components/insiders.py: new — insider buy/sell summary, monthly chart, detail table - components/filings.py: new — SEC filings with type filter and direct links - app.py: wire in Insiders and Filings top-level tabs
8 daysUse stable FMP stock-peers endpointOpenclaw
8 daysMigrate FMP ratios and improve comps fallbacksOpenclaw
8 daysInitial commit — Prism financial analysis dashboardTyler
Streamlit app with market bar, price chart, financial statements, DCF valuation engine, comparable companies, and news feed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>