I’m trying to calculate a three-year trailing average price-to-book ratio (P/B). Is there a way to do this?
This would be used as part of a ranking system, one part of which would compare a stock’s current P/B to its historical three-year trailing average P/B.
Portfolio123 doesn’t really have a good way to reference average annual and quarterly stock price data. The bars and lags (i.e., trading days) in the price moving averages cap out at 500 – there are about 753 (i.e., ~251 trading-days/year * 3 years) bars in three years of data. It would really be nice if there were a better/easier way to access average historical price and market cap data.
But if you’re willing to accept two years, you could do something like: