Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How consistent is consistency factor?

A month ago Mike T post a question and never got the answer.

Mike T  
posted 4 weeks ago

If the intention of the new consistency score is to discourage curve-fitted, "perfect", gamed backtest returns as explained in the original post, why should the consistency score also punish algos whose real world paper-trading performance is better than their backtest performance? Why not just reduce the weight that the backtest score counts towards the final score? To what end would it serve to penalize algos whose actual trading performance exceeds their backtest performance?  

https://www.quantopian.com/posts/scoring-changes-for-the-april-quantopian-open

Is that right to punish the algo which is doing better in paper trading then in backtest by applying consistency factor to the total score?
To my mind punish for doing better is not right.
How to solve the problem and save consistency factor?
You may apply some simple logic like this

if Paper Trading Score > backtesting Score than
Final score = Total score
else
Final score = Total score*consistency factor
Any way of applying such logic will be better than existing final score calculation.

7 responses

What a coincidence that your algo has a higher paper trading score than backtest score. My guess is that total scores are punished based on lower backtest scores so that someone doesn't get lucky for a month and win because of that.

God bless
~Charles

Today analyzed results of April Quantopian open.
The best by consistency factor was 18 algo which done nothing.
Some of them appear on the first page.
The next one was very consistent by it's negative results

Return Rank - 282
StDev Return Rank- 226
Sharpe Ratio Rank- 252
Max Drowdown Rank- 306
Calmar ratio Rank- 224
Beta Rank - 144

My subjective conclusion: By applying consistency factor the way it is now Quantopian promote mangers who doing nothing or consistently loosing money.
May be better apply Gaussian kernel-density estimate to positive daily returns not ranks?

Vladimir - we think that consistency is important no matter what. If a live algo is out-performing the backtest, the question is immediately, "why is that happening?" If it's not something that was predictable, then it's probably some form of luck, and luck flows both ways. We're valuing predictability very highly. I don't think of it as "punishing someone for doing better" because "better" is defined as "consistent." That said, if there is a reason why the performance changed, that's interesting and we might be able to learn from it.

I'm glad you looked at the April results. We put that CSV there for exactly that reason - so people can study it!

When an algo does absolutely nothing, makes no trades, then the consistency can't be calculated (division by zero, effectively). An incalculable factor for the other 7 metrics in the contest aren't so big of a deal because they are ranked. Consistency, though, is multiplied, so we need to have something for a score. We could have chosen 0, or .5, or 1, or anything. In the end we went with 1 because consitency is applied gradually over the first few days of trading while the paper trading record is very volatile, and is fully applied at 20 days of trading. For the algorithms that still haven't traded after 20 days, like the one that you reference, it's definitely an anomaly. I'm simply not worried about it because I don't think a no-trade algorithm will ever challenge for the lead.

Taking a step back, I think it's a healthy thing to see how consistency is affecting the contest. In the chart below I plot consistency against the paper-traded Sharpe rank. That means that the highest Sharpe algos are on the left, ordered left-to-right. The higher dots are are the most consistent algorithms. The color is the final contest rank - dark green are top-ranked, gray is middle of the pack, and red is bottom of the pack.

april analysis

What you see is that, roughly, it goes from green to red, left-to-right. You see algos that are on the left side that aren't well ranked in the contest because they were pushed down by consistency. This is, more or less, what we were hoping to see. I'm sure we'll be doing other revisions later.

Also note: in the upper-right corner are the zero-trade algos, all stacked on top of each other. They are statistically a little weird and that shines through.

Finally, taking an even bigger step back, it's important to remember that this contest isn't just about the contest - it's about the Quantopian hedge fund. When we launch the fund we're going to have more than a couple algorithm writers. In time, we're going to have dozens. The algorithm that comes in 10th, or 30th, or even 100th might end up being a better fit for the fund than the one that came in 2nd. Algorithms that don't trade won't get picked, nor will inconsistent algorithms. Overall, if you write your algorithm to meet the scoring package you see here, it can get you a bigger win than just the contest.

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.

Dan

As I mention above the statistic is for April Quantopian open.
https://www.quantopian.com/leaderboard/2015/4.
I downloaded .csv, sorted by consistency and looked on the top 18 algos which has consistency factor 1.0 the best possible.
Then I check why they got such a high consistency score and find out that they were not traded at all.
Should they get such a consistency score ???
You may use simple logical test to eliminate the bug.

The next algo has consistency score 19(BTW I do not see it on yours chart. Probably different data}
Here is it's statistic:
Paper Trading
score_pt_rank 276 score_pt 33.90

rankAnnRet_pt 282 annRet_pt -32.44%
rankAnnVol_pt 226 annVol_pt 16.30%
rankSharpeRatio_pt 252 sharpe_pt -2.12
rankMaxDD_pt 306 maxDD_pt -11.98%
rankStability_pt 63 stability_pt 0.61
rankCalmar_pt 224 calmar_pt -2.71
rankBetaSPY_pt 144 beta_spy_pt 50.44%
corr_pt 0.44
consistency 0.97

Can You point me where is the winning consistency in this algo statistic?
For what it got the highest consistency factor???
I only see consistency of loosing.
Is that we are looking for?
I am not against consistency I am against consistency of loosing or doing nothing to be considered as positive consistency.
May be there is misinterpretation of Gaussian kernel-density estimate or a bug in the code I just point that there is a problem.
The same I may tell You about Stability
https://www.quantopian.com/posts/how-stable-is-stability-calculation

If you want to see my analysis of Q's Open Contest ranking system and proposed Quantopian Score you may find them here

https://www.quantopian.com/posts/request-real-world-strategy-scoring-metric

Last week I gave a general thought about consistency and the scoreboard. Somebody else here at Quantopian was reading it and was studying Vladimir's response. He looked at it it and said, "how the heck can someone be losing so much money and still have such a decent Sharpe ratio? It doesn't make sense!" He was right, and so was Vladimir. We had a bug.

The bug traces back to a different problem we had earlier in April. Remember how some contest entries got stopped prematurely? We were able to re-run them and bring them back into the contest. But we didn't do it right. Because it was outside our regular process, it didn't get the full contest treatment. That meant that a half-dozen algos ended up looking much better than we should have.

That error has been corrected, and a revised April leaderboard is published.

Quantopian open June 2015 Average metrics of top 10 by stability (of loosing) and consistency (of doing nothing)

Quantopian open June 2015   annRet   annVol   maxDD   sharpe    calmar  stability  consistency  
Stability Best 10_pt       -130.52%  10.64%  -31.62%  -14.226   -4.835  0.973      0.807  
Stability Best 10_bt        -36.15%  14.27%  -73.24%   -3.590   -0.493  0.876  
Consistency Best 10_pt        1.31%  12.74%   -6.44%   -0.258   -0.194  0.128      0.962  
Consistency Best 10_bt       38.59%  15.54%  -13.62%    2.175    3.325  0.780  

If Vladimir stat is correct, there is seriously something wrong here.

Even if scaled, how can a gaussian ret distribution with ann ret 1.31% and 12.74% volatility match ~96% with a gaussian ret distribution that has 38.59% ann ret and 15.5% volatility? The std are similar, but the mean are so different.