Command Reference : Function Reference : Function Reference: M
  
 
@mmax
Trailing moving maximums (ignore NAs).
n-period trailing maximums, ignoring NAs.
Syntax: @mmax(x, n)
x: series
n integer, series
Return: series
For each observation and integer , compute the maximum () using the current and previous observations of the series,
and ignoring missing values (NAs).
If n is not an integer, the integer floor will be used.
Examples
show @mmax(x, 12)
produces a linked series of maximums based on a 12-period moving window over the series x where NAs are ignored.
Cross-references
See also @mmin for moving minimums.
For the NA-propagating variant of this function, see @movmax.