Command Reference : Function Reference : Function Reference: Y
  
 
@ytd
 
Within-year cumulative sum (year-to-date).
Syntax: @ytd(x, y[, s])
x: series
y: series
s: (optional) sample string or object
Return: series
Cumulative sum of series x within each year, subject to limitations imposed by the workfile or optional sample.
This function is panel aware.
Examples
If x is a series of monthly profits, then
show @ytd(x)
returns a linked series of year-to-date monthly profits.
Cross-references
See also @periodtodate.