I'm not sure if this is a bug or a feature, but it seems to be an inconsistency at least.
I am trying to get Future%Chg out of the data_universe. It understands the factor because it returns an N/A on everything.
import p123api
with p123api.Client(api_id="YOUR_ID", api_key="YOUR_KEY") as client:
resp = client.data_universe({
"universe": "SP500",
"asOfDt": "2025-08-29",
"formulas": ["Future%Chg(21)", "Ret%Chg(21, 0)"],
})
print(resp["data"][0][:5]) # Future%Chg(21): [None, None, None, None, None]
print(resp["data"][1][:5]) # Ret%Chg(21, 0): five numbers
The as-of date is a year old, so the 21 trading days after it exist. Ret%Chg on the same rows returns numbers. Future%Chg returns None on every one of the 498 stocks. The same formula as the ranking formula in a screen_run call with the same as-of date returns real ranks.
If this is a bug, it would be helpful if this worked. If its a feature, it would still be helpful if this worked.
Thanks
Tony