Files
suivi_produit/backend/app/services/pricing.py
2026-01-18 12:23:01 +01:00

13 lines
269 B
Python

from __future__ import annotations
def price_trend(prices: list[float]) -> str:
if not prices:
return "stable"
first, last = prices[0], prices[-1]
if last > first:
return "up"
if last < first:
return "down"
return "stable"