Request body for POST /api/portfolio/performance-analytics.
Two mutually exclusive date-range modes:
- Mode A —
as_of + horizon: evaluation window ends at
as_of, starts horizon before it.
- Mode B —
start_date + end_date: explicit window.
Trailing-only callers still send a full Mode A or Mode B payload;
trailing ignores horizon (Mode A) or start_date (Mode B) and
always emits its 9 fixed-horizon points anchored at as_of (Mode A)
or end_date (Mode B).
rolling_window is required when rolling_return in metrics.
discrete_returns_frequency is required when discrete_return
in metrics.
frequency (the old top-level cadence field) is gone: rolling is
hardcoded daily, discrete uses discrete_returns_frequency, trailing
has no cadence, and non-return metrics (volatility / sharpe / sortino /
max_drawdown) never used it.