Back to Community
Ranking System Computations

Is this possible in quantopian? Ranking stocks by given them a number and then combine different value rankings into a composite ranking? It looks a bit like the dollarvolume weighted universe, but how to give a number to a stock and how to re-normalization when different factors are combined. It is not the same as a Piotroski screen as this screens for some "hard" numbers, like ROA > 5% or something like that. That could eliminate stocks that score well on other value rankings and are still good candidates.

"Basically, rank computation is a straightforward task. For each factor (or formula), we sort companies from best to worst (with the user choosing, in each case, whether higher or lower tallies are to be deemed
better) and then convert each to a percentile score, a scale of 100 for the best to zero for the worst. When
multiple factors are used, we combine them into an overall rank based on user-supplied weights.
There are, however, two important subtleties that must be understood to know how we calculate the exact
numbers. (portfolio123)"

3 responses

Hi Jan,
We are testing a new API with this functionality on staging right now. We probably have another couple of weeks to finalize and polish it off, but keep your eyes open in the near term.

KR

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

This is something I've been very interested as well. Is the expectation that the to-be released API will allow us to define/adjust our stock universe on the fly based on rank computation? In other words allow us to constantly rotate in best of breed securities into a portfolio while rotating out securities which which are underperforming - basically just as a fund manager would. Thanks -JM

Hi Jan and Jonathan,
The pipeline API was launched today and should help with these types of strategies. You can read all about it here.

I've also attached an example that calculates two factors (one momentum based, the other liquidity) and then ranks the universe by those factors. It longs and shorts 5% of the resulting universe respectively.

Jonathan, to answer your question about defining and adjusting your universe on the fly based on rank computations. Yes, this is exactly what the pipeline API allows you to do. You can create custom factors, calculate them across the entire universe of 8000 equities, and then set your algorithm universe daily based on the results.

Clone Algorithm
866
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 563a4dc98151f2472da8a847
We have migrated this algorithm to work with a new version of the Quantopian API. The code is different than the original version, but the investment rationale of the algorithm has not changed. We've put everything you need to know here on one page.
There was a runtime error.