I'm analyzing a factor using a Loop in P123, and I noticed that when a company stops reporting a particular metric, P123 seems to forward-fill the last available value.
Take OWLT:USA as an example (pictured).
According to the data, the last available value for ROE%Q
was reported in November 2022. Since then, the company has released earnings reports, it's just that P123 no longer reports this specific metric — which is fine.
However, when I calculate something like the median ROE over the last 12 quarters, the results suggest that P123 is filling in the missing quarters with the last reported value of -591. So the median calculation ends up being something like:
median(-274, ..., -591, -591, -591, ..., -591)
— with every post-Nov. 2022 quarter using the repeated -591 value. This dramatically biases the metric, and could damper performance.
Instead of forward-filling, I'd prefer to use something like the industry average for those missing quarters. Or even 0 would be fine.
Is there a way in P123 to replace missing data with the industry average, or at least prevent it from being forward-filled in the Loop?