RollingMax / Computation Layer
Calculate the rolling (moving) maximum over a sliding window of values. Similar to pandas.rolling().max() or R's rollapply(FUN=max).
Mathematical form: where is the window size and are optional weights.
Common applications:
- Financial analysis (peak prices over time)
- Environmental monitoring (maximum pollution levels)
- Performance tracking (best results in period)
- Quality control (peak measurements)
- Network monitoring (peak usage)
- Sensor data analysis (maximum readings)
- Risk assessment (worst-case scenarios)
Note: Results include null values for windows with insufficient observations based on MinPeriods
setting.
Select
columnThe numeric column to compute rolling maximums for. Common input types:
- Price series (stock prices, commodities)
- Measurement data (temperatures, pressures)
- Performance metrics (response times, scores)
- Resource usage (CPU, memory, bandwidth)
- Sensor readings (IoT data streams)
WindowSize
u32Number of observations in each sliding window. Common values:
- 7: Weekly maximum from daily data
- 30: Monthly maximum from daily data
- 252: Annual maximum for trading days
- 60: Hourly maximum from minute data
Must be ≥ 1. Larger windows provide more smoothing.
Weights
[f64, ...]Optional weights for window values. Length must match WindowSize
. Uses:
- Exponential weighting (recent data more important)
- Custom smoothing patterns
- Seasonal adjustments
- Trend emphasis
If not provided, all values weighted equally.
MinPeriods
oneofSet minimum required observations equal to window size. Ensures complete windows only. Use when you need strict window completeness, such as:
- Regulatory compliance calculations
- Complete data requirements
- Strict quality control measures
- Full-window-only analysis
Value
u32Minimum number of non-null observations required in window (Value
) to compute result. Must be ≥ 1 and ≤ window size. Examples:
- 1: Calculate with any non-null value
- window_size/2: Require half window
- window_size: Require complete window
Controls trade-off between data availability and calculation reliability.
Center
boolWhen true
, aligns the result label to the center of the window instead of the end. Effects:
true
: Better for identifying peak timingfalse
: Better for real-time processing
Important for temporal alignment in analysis.
AsColumn
nameName for the new column. If not provided, the system generates a unique name. If AsColumn
matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.