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"
