These “FHist” functions return a summary statistic from a series of weekly historical values evaluated at different observation dates. In other words they are statistics of multiple Point In Time (PIT) values. Please note that if any sample's observation date is before 1999, the functions will return NA. For more information about how historical PIT values are evaluated, see the FHist() function.
These functions calculate an aggregate statistic from all the PIT values. The first sample is always the most recent weekly value, while the second value depends on the increment. For example, with samples=26 and weeks_increment=2, a period of 1 year will be covered with 26 bi-weekly samples.
FHistAvg("formula", samples [, weeks_increment, NA_Pct])
Calculates the average
FHistMed("formula", samples [, weeks_increment, NA_Pct])
Calculates the median
FHistMin("formula", samples [, weeks_increment, NA_Pct])
Calculates the min value
FHistMax("formula", samples [, weeks_increment, NA_Pct])
Calculates the max value
FHistSum("formula", samples [, weeks_increment, NA_Pct])
Calculates the sum
FHistStdDev("formula", samples [, weeks_increment, NA_Pct])
Calculates the Standard Deviation
FHistRelStdDev("formula", samples[, weeks_increment, NA_Pct])
Calculated the Relative Standard Deviation = 100 * (SD / Abs(Avg))
formula: the expression you want evaluated in the past
NA_Pct: the max percentage of values that can be NA (0-80, default 20)
samples: number of samples (2-260)
weeks_increment: how many weeks between samples (1-52, default 1)
To screen for stocks that are trading at a Price to Sales below the 3 year average you can enter:
Pr2SalesTTM < FHistAvg("Pr2SalesTTM", 39, 4)
In this example we use 39 samples every 4 weeks which covers a period of three years.