Calendar half year value (CFH#)

This calculates a function for a series for each half calendar year within the display period. Half calendar years run from 1 January to 30 June and 1 July to 31 December.

Format

CFH#(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 half-year values (where PCH uses the start and end of half-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

Examples

CFH#(X,VLO)

VLO retrieves the first reading of each year.

CFH#(MKS,AVG)

This calculates the average of Marks and Spencer for each half year within the display period.

CFH#(FTSE100,VLO,R)

This calculates the value for the first day of each half year requested in the time period, including in both the first half year and the last (unfinished) half year.

CFH#(ABF(P#S),AVG,R,I)

This calculates the average price for each half year requested in the time period, including both the first half year and the last (unfinished) half year. Missing values are ignored.

CFH#(UKGDP...D,PCHP,P)

This calculates the percentage change between two end of half year values for the quarterly UK GDP