Factor Ranks in API

Is it possible to get factor ranks via the API or Data miner?

I see RANKS mentioned in the API doc but no specific example generating factor ranks for a given ticker.


The DataMiner does this in the Ranks operation. See https://help.portfolio123.com/hc/en-us/articles/360054360791-DataMiner and click on Ranks.pdf. You’ll want to include in your script the line

Columns: factor

There is an example for using the ranks API endpoint on the API page in the Knowledge base at [url=https://help.portfolio123.com/hc/en-us/articles/360053182312-Portfolio123-API]https://help.portfolio123.com/hc/en-us/articles/360053182312-Portfolio123-API[/url]

If you want factor level ranks, change the nodeDetails line to “nodeDetails”: “factor”

So, the API is excellent.

Probably nothing more needs to be done and P123 would continue to be the premier provider of data for machine learning on the planet (for retail investors).

For machine learning “DataUniverse” seems to be the most useful template.

I wonder if instead of formulas (including Frank) full ranking systems or nodes could be provided as “column inputs” in DataUniverse. This assumes there is not already a way to do this that I am missing.

There are the obvious benefits everyone is aware of at P123 with nodes and the ranking system. But additionally there are specific machine learning benefits. For example, machine learning has problems with using too many factors—called “the curse of dimensionality.”

As important as the curse of dimensionality is the problems of multicollinearity are probably greater, IMHO. It is something that even Marc Gerstein has mentioned. You can find different opinions on how big of a problem this can be for making predictions. My recommendation would be to ignore most writings about this as machine learning generally assumes unchanging data (independent and identically distributed data).

If there is one thing I am certain about it is that patterns and correlations are constantly changing in the stock market.

As Wikipedia has the sense to mention:

Since multicollinearity causes imprecise estimates of coefficient values, the resulting out-of-sample predictions will also be imprecise. And if the pattern of multicollinearity in the new data differs from that in the data that was fitted, such extrapolation may introduce large errors in the predictions.

In short, multicollinearity and using a large number of factors screws up machine learning for stock data. Something that could be completely resolved if nodes or ranking systems were made easily available for “DataUniverse.”

P123 is still the premier provider of data for retail investors on the planet no matter what you do on this. And actually my main concern would be how to market what P123 already does.

Jim