summaryrefslogtreecommitdiff
path: root/backend/app/services
AgeCommit message (Collapse)Author
2026-05-18feat: add projection_years to DcfResult schema and service outputTyler Hoang
Add projection_years: int = 5 field to the DcfResult Pydantic schema and emit it from the data_service.get_valuation() function across all three dcf_out cases (unavailable, error, and successful). This enables frontend DCF sliders to know the default projection horizon. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18fix: add no-key fallback for sector ratio benchmarksTyler Hoang
2026-05-18fix: populate sector benchmark values for ratios tabTyler Hoang
2026-05-18fix: correct historical ratios share and debt inputsTyler Hoang
2026-05-18Add ratios service and testsTyler Hoang
2026-05-18feat: add get_valuation() service functionTyler Hoang
2026-05-18feat: add _run_dcf, _run_ev_ebitda, _run_ev_revenue, _run_price_to_bookTyler Hoang
2026-05-18feat: add valuation math helpers and VALUATION_CACHETyler Hoang
2026-05-18Merge worktree-financials-tab: add financials tab (income/balance/cashflow)Tyler Hoang
2026-05-18fix: give each statement fetcher its own cache to prevent key collisionsTyler Hoang
2026-05-18feat: add get_financials() with income/balance/cashflow buildersTyler Hoang
Implements _build_income, _build_balance, _build_cash_flow, and get_financials() (cached) in data_service.py. Annual mode appends TTM (income/CF) and MRQ (balance) columns; quarterly mode returns up to 8 periods. Adds annual_frame helper and 5 TDD tests covering column labels, TTM sums, MRQ values, FCF computation, and empty-statement graceful returns. Test count: 19 → 24. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18feat: add financials cache and row-builder helper functionsTyler Hoang
2026-05-18feat: add financials cache and row-builder helper functionsTyler Hoang
2026-05-17Fix _json_value crashing on array-valued yfinance info fieldsTyler Hoang
pd.isna() on a numpy array returns an array, not a scalar, causing ValueError in the boolean context. Wrapping in try/except restores get_company_info() for tickers like NFLX whose .info includes array fields. Also suppress FutureWarning in compute_beta pct_change calls. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17Add computed beta fallback and FMP short interest fallbackTyler Hoang
- compute_beta: 2y weekly returns vs SPY, cov/var formula, capped ±3, BETA_CACHE TTL=3600 - get_fmp_short_interest: calls FMP /v4/short-of-float-symbol when all yfinance short fields are None - _build_quote_and_stats: accepts sym, uses compute_beta when info["beta"] is None - PERIODS/YF_PERIOD_MAP: added "2y" support - test_api: clear BETA_CACHE and SHORT_CACHE in clear_service_caches Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17Refine overview ratios and shellTyler Hoang
2026-05-17Add stack start and stop scriptsTyler Hoang