Dear All,
We released several functions that work really well for calculating averages of price ratios since they operate point in time. You may of course find other uses for them. You will find them in the reference at FORMULA FUNCTIONS->INDIVIDUAL SECURITY. The “Full Description” reference is included below.
Let us know what you think.
These functions return the specific statistic of the values of “formula” computed in the past using our point-in-time historical engine. The function should NOT be used with split sensitive data, like earnings per share, as it they do not adjust for splits between the point in time date samples. They should also probably not be used with some estimate data since you will accessing different fiscal period.
These functions are typically used to calculate historical statistics for factors that include price , like Price to Sales. For historical statistics that only use financial statement data see the “Loop Historical” functions.
FHistAvg(“formula”, samples[, sample_offset=1, NAPct=20])
FHistMed(“formula”, samples[, sample_offset=1, NAPct=20])
FHistMin(“formula”, samples[, sample_offset=1, NAPct=20])
FHistMax(“formula”, samples[, sample_offset=1, NAPct=20])
Parameters
formula: the factor or formula you want evaluated in the past
samples: number of samples from 2-60
sample_offset: weekly offset of the samples 1-52
NAPct: the maximum percentage of values that can be NA 0-80
For example the average Pr2Sales ratio for the past 3 years can be calculated as
FHistAvg(“Pr2SalesTTM”,39,4)
We use 39 samples since 39 samples offset by 4 weeks = 156 weeks, which corresponds to 3Y.