This calculates a function for a series for each full calendar year within the display period. A calendar year runs from 1 January to 31 December.
CFY#(Expression,Parameter,Display Indicator,Carry indicator)
Where Parameter is usually the result from another function. Please see: Using function codes as arguments for detail.
An exception is the special parameter PCHP, which calculates the percentage change between the previous and present end of year values (where PCH uses the start and end of year values).
Display Indicator – the default is to display values only for complete periods, however the following optional parameters exist –
P Values calculated for incomplete calendar periods at the start of the display period.
R Values calculated for incomplete calendar periods at the start and end of the display period.
Carry Indicator – – the default is to carry the previous value, but not between periods, however the following optional parameters exist –
C Values are padded
CW Values are padded but only within calendar months
I missing or NA values are ignored
N output values are NA’s if the input values contain an NA
CFY#(X,VLO)
VLO retrieves the first reading of each year.
CFY#(C:GIM,VAL)
This calculates the value of Gulf International for each full year within the display period
CFY#(FTSE100,VLO,R)
This calculates the value for the first day of each year requested in the time period, including in both the first year and the last (unfinished) year.
CFY#(ABF(P#S),AVG,R,I)
This calculates the average price for each year requested in the time period, including both the first year and the last (unfinished) year. Missing values are ignored.
CFY#(S&PCOMP,PCHP,R)
This calculates the percentage change between the last and present end of year values of the SP500 index. The parameter R implies that there is also a calculation for the last unfinished year using the last end of year value and the latest value.