Algorithm to predict ranks instead of value or class?



I have a problem that requires ranking rather than regression or classification e.g. out of a portfolio of 3 stocks which stock will go up the most in the next one month, which stock will be 2nd and which will be 3rd. Can anyone suggest an appropriate algorithm and R package to use .


I think you are referring to forecasting the rank where time component is also involved. You take past (for eg) 3 years data for stocks in your portfolio and want to predict next months rank order.

I would approach it as a time series forecasting problem and then rank it appropriately.
Below link should get you started…

Also you can include sectoral indices to refine your prediction.



I realise the stock market aspect might have a time series component. But I’m looking for a more general ranking algorithm which might also rank, say, each horses rank in a horse race. Such a problem might require only ranking with no time series involvement.


I believe logistic regression to predict probability / odds ratio and use it to order the rank (from highest to lowest probability) might serve your need. Not sure about any package readily available in R to predict the ranks!