Metric trend
get_metric_trendCalculate the daily trend of a metric series using least-squares fit, returning slope per day, endpoints, and spread to assess direction and variability over a chosen data window.
Instructions
Least-squares trend for one daily series: slope per day, endpoints, spread.
series is a name from list_metric_series. days selects the newest N days
THAT HAVE DATA, not the last N calendar days — compare n_days with
span_days to see whether the history is dense or sparse.
Returns arithmetic only. slope_per_day is in the series' own unit per day and
carries no threshold, band or verdict; fewer than 3 days returns a null slope
with a reason rather than a number fitted to noise.
Carries a coverage block over the days the arithmetic used: quote
coverage.days_covered and coverage.span_days beside any number here, and
read coverage.window_satisfied: false as a shorter history than you asked
for rather than as a missing kind.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| fresh | No | ||
| owner | No | ||
| series | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||