From ce1b9bcab6474f678155da1b6f0133bb6800346e Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Mon, 18 May 2026 02:12:42 -0700 Subject: feat: add RatioPoint and RatiosResponse schemas --- backend/app/schemas.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'backend/app') diff --git a/backend/app/schemas.py b/backend/app/schemas.py index 87acd0d..2c64333 100644 --- a/backend/app/schemas.py +++ b/backend/app/schemas.py @@ -175,5 +175,35 @@ class WatchlistResponse(BaseModel): limit: int = 10 +class RatioPoint(BaseModel): + value: float | None = None + spark: list[float | None] = Field(default_factory=list) + vs_sector: float | None = None + + +class RatiosResponse(BaseModel): + pe_ttm: RatioPoint + ev_ebitda: RatioPoint + gross_margin: RatioPoint + net_margin: RatioPoint + price_to_book: RatioPoint + price_to_sales: RatioPoint + ev_to_sales: RatioPoint + p_fcf: RatioPoint + forward_pe: RatioPoint + operating_margin: RatioPoint + ebitda_margin: RatioPoint + fcf_margin: RatioPoint + roe: RatioPoint + roa: RatioPoint + roic: RatioPoint + debt_to_equity: RatioPoint + current_ratio: RatioPoint + quick_ratio: RatioPoint + interest_coverage: RatioPoint + dividend_yield: RatioPoint + dividend_payout: RatioPoint + + class ErrorResponse(BaseModel): detail: str -- cgit v1.3-2-g0d8e