Returns a weight matrix that restricts a development triangle to its
most recent recent calendar diagonals. Cells on or after the last
recent diagonals retain their input values; earlier observed cells
are set to 0. Cells that are NA in the input (not yet observed)
are left as NA.
This is a standard construct for restricting chain-ladder estimation to recent calendar periods when older experience is considered less representative of current conditions (e.g. after a rate change or a claim-handling reform).
Handling of NA cells
NA cells in the input (not yet observed) remain NA in the output.
They are semantically distinct from the 0 cells produced by the
recency filter, which represent observed values explicitly excluded
from the current weighting scheme. Callers who want both to behave
identically can post-process with w[is.na(w)] <- 0.
