5yrs and 10yrs average Pr2Sales ratio questions.

As the formula’s example:
The average Pr2Sales ratio for the past 3 years can be calculated as FHistAvg(“Pr2SalesTTM”,39,4)
If I want to get the 5/10yrs ratio number, which one is correct
5yrs: FHistAvg(“Pr2SalesTTM”,65,4) or FHistAvg(“Pr2SalesTTM”,20,13)
10yrs: FHistAvg(“Pr2SalesTTM”,130,4) or FHistAvg(“Pr2SalesTTM”,40,13)
If above are not correct, how to write the ratio formula?

Thanks in advance!

Use FHist if you just a factor’s value in the past

FHist(“Pr2SalesTTM”,260) // 5y - 525
FHist(“Pr2SalesTTM”,520) // 10y 52
10

Marco, thanks a lot!
But I want to get the 5/10 years average value, is it the same one?
And the number of samples must be between 2 and 156 for FHistAvg, I couldn’t use it.

Hi, If you want average of the 10 last annual Price/Sales ratio, you might use a calculation using loopavg() as below for the :

loopavg(“Pr2Sales(CTR,ANN)”,10,0,1)

(I haven’t tested the calc, but I think I’ve typed it correctly)

Thanks, SpacemanJones.
I think “loopavg” works well in Quarterly data, but what I need is daily ratio.

Please moderate Kimmiles before it’s too late.