Analytics: Get period summary
get_period_summary Compare income, expenses, net, and savings rate across periods.
Covers month-over-month, quarter-over-quarter, and year-over-year
comparisons. Each period includes change_from_previous_pct.
Phase 114 — periods that end before the user's first transaction
are dropped, so a brand-new user asking for ``num_periods=6`` may
see fewer rows. Without this filter the leading zero-padding
rows produced misleading change-from-previous percentages (e.g.
-29.7% comparing the user's first real month to a prior $0
month). Response carries ``clamped_to_first_activity`` (bool)
and ``requested_periods``. When clamped, the returned rows are the
full extent of the user's history (e.g. 2 months of data); no
rows exist for the dropped periods.
Args:
period_type: 'month', 'quarter', or 'year'
num_periods: How many periods to include (default 6)
compare_prior_year: Include same period from prior year
Returns:
List of periods with income, expenses, net, savings_rate_pct,
and change percentages, plus the two clamping metadata fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| num_periods | No | ||
| period_type | No | month | |
| compare_prior_year | No |