Input: a line window START END (months YYYY-MM), then a CSV month,value (the full series).
Compute least-squares slopes (value against position 0, 1, 2, …) and relative changes (last vs. first value) for the full series and for the window. Print:
full series 2025-01..2025-12 (12 months): slope -0.75/month (falling), change -23%
shown window 2025-06..2025-09 (4 months): slope +1.70/month (rising), change +12%
WARNING: the window reverses the long-term trend (cherry-picking risk)
The last line is the reversal warning if the slopes have different signs; else WARNING: the window exaggerates the long-term trend if |window slope| > 2 × |full slope|; else window is consistent with the long-term trend.