<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Different Sharpe ratios in backtest and competition filter]]></title><description><![CDATA[<p dir="auto">When I run my futures strategy in a notebook on the server starting 2006-01-01 I get this result:</p>
<p dir="auto"><em>Check the sharpe ratio...<br />
Period: 2006-01-01 - 2021-03-01<br />
Sharpe Ratio = 1.3020322470218595</em></p>
<p dir="auto">However, it gets rejected from the competition because the Sharpe is below 1. When I click on its chart in the "Filtered" tab it shows</p>
<p dir="auto"><em>Sharpe Ratio	0.85</em></p>
<p dir="auto">When I copy the code from the html-previev of the rejected algo and paste it into a notebook, I get exactly the same result as above (Sharpe 1.3), so it doesn't seem to be a saving error.</p>
<p dir="auto">Why is there such a big difference? I thought the backtest results from the notebook shuld indicate if the strategy is elegible for the competition.<br />
How can I calculate the Sharpe ratio used for the competition in the notebook so I will know beforehand if the algo gets accepted or not?</p>
]]></description><link>http://quantiacs.com/community/topic/13/different-sharpe-ratios-in-backtest-and-competition-filter</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 12:32:40 GMT</lastBuildDate><atom:link href="http://quantiacs.com/community/topic/13.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 02 Mar 2021 13:37:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Different Sharpe ratios in backtest and competition filter on Tue, 09 Mar 2021 11:23:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/12">@support</a> Thank you very much for the clarification, and once again congratulations for the great job you are doing <img src="http://quantiacs.com/community/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=r6gpl14klvk" class="not-responsive emoji emoji-android emoji--wink" title=";)" alt="😉" /></p>
]]></description><link>http://quantiacs.com/community/post/92</link><guid isPermaLink="true">http://quantiacs.com/community/post/92</guid><dc:creator><![CDATA[captain.nidoran]]></dc:creator><pubDate>Tue, 09 Mar 2021 11:23:33 GMT</pubDate></item><item><title><![CDATA[Reply to Different Sharpe ratios in backtest and competition filter on Mon, 08 Mar 2021 21:00:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/13">@captain-nidoran</a> The remaining difference you see not is due to the different approximated implementation on the front-end, for the contest the relevant result is the one displayed on the OOS column. As time increases, this difference will vanish.</p>
]]></description><link>http://quantiacs.com/community/post/88</link><guid isPermaLink="true">http://quantiacs.com/community/post/88</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Mon, 08 Mar 2021 21:00:21 GMT</pubDate></item><item><title><![CDATA[Reply to Different Sharpe ratios in backtest and competition filter on Mon, 08 Mar 2021 20:56:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/13">@captain-nidoran</a> Ok, so we tracked the issue, sorry for the delay. The chart uses the fast calculation of the Shape Ratio based on precalculated relative returns, which are cropped:</p>
<p dir="auto">chart_sr = calc_sharpe_ratio(crop(relative_returns))</p>
<p dir="auto">But the rating page calculates it in another way. It crops the output (equity chart), it calculates the relative returns, and then it calculates the Sharpe Ratio.</p>
<p dir="auto">chart_sr = calc_sharpe_ratio(calc_relative_returns(crop(output)))</p>
<p dir="auto">The starting point of the computations (first relative return) is different and it includes a big leap of 18% on day 1.</p>
<p dir="auto">We modified the results displayed in the charts so that the y axis is rescaled, and the very first point has "zero" returns.</p>
<p dir="auto">Now it became as follows (note that y axis started at 1.18, now it starts at 1):</p>
<p dir="auto"><img src="/community/assets/uploads/files/1615237009705-screenshot-from-2021-03-08-21-55-56.png" alt="Screenshot from 2021-03-08 21-55-56.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://quantiacs.com/community/post/87</link><guid isPermaLink="true">http://quantiacs.com/community/post/87</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Mon, 08 Mar 2021 20:56:52 GMT</pubDate></item><item><title><![CDATA[Reply to Different Sharpe ratios in backtest and competition filter on Sat, 06 Mar 2021 09:10:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/12">@support</a> Hi again,</p>
<p dir="auto">As an example, lets consider this one:<br />
<img src="/community/assets/uploads/files/1615021368300-b91dcf98-8689-4a4a-ae1f-88223593b3f4-image.png" alt="b91dcf98-8689-4a4a-ae1f-88223593b3f4-image.png" class="img-responsive img-markdown" /><br />
As you can see the <strong>SR shown for OOS in the global leaderboard is 2.044</strong>, but if we acces this specific system and filter the OOS period we can see this:<br />
<img src="/community/assets/uploads/files/1615021523894-dcb7093a-a980-4a59-8960-c30c49a1e21a-image.png" alt="dcb7093a-a980-4a59-8960-c30c49a1e21a-image.png" class="img-responsive img-markdown" /><br />
In this case the <strong>SR shown inside the specific system is 30.69</strong></p>
<p dir="auto">I hope this example can help you.</p>
<p dir="auto">Thanks one more time! <img src="http://quantiacs.com/community/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=r6gpl14klvk" class="not-responsive emoji emoji-android emoji--wink" title=";)" alt="😉" /></p>
]]></description><link>http://quantiacs.com/community/post/71</link><guid isPermaLink="true">http://quantiacs.com/community/post/71</guid><dc:creator><![CDATA[captain.nidoran]]></dc:creator><pubDate>Sat, 06 Mar 2021 09:10:14 GMT</pubDate></item><item><title><![CDATA[Reply to Different Sharpe ratios in backtest and competition filter on Fri, 05 Mar 2021 21:06:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/13">@captain-nidoran</a> Hi, first of all, two considerations:</p>
<ol>
<li>
<p dir="auto">for systems with a very short track record (some days) there are numerical instabilities in the computation (especially for BTC Futures systems) because of the strong fluctuations in the equity curves.</p>
</li>
<li>
<p dir="auto">the result indicated in the main interface is obtained using the evaluator which runs on the Quantiacs server. The result is then pushed to the front end. If instead you access a specific system and you filter the OOS period using the graphical interface, then the computation will use a quick front-end script for making computations. So numerical discrepancies can arise, but they should become smaller as the OOS period becomes larger (see also point 1).</p>
</li>
</ol>
<p dir="auto">The result indicated in the main interface is more precise.</p>
<p dir="auto">However, could you show one example showing the discrepancy? So we will dig more into the issue, and see if there is only a numerical issue or a bug which has to be fixed.</p>
]]></description><link>http://quantiacs.com/community/post/70</link><guid isPermaLink="true">http://quantiacs.com/community/post/70</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Fri, 05 Mar 2021 21:06:41 GMT</pubDate></item><item><title><![CDATA[Reply to Different Sharpe ratios in backtest and competition filter on Fri, 05 Mar 2021 19:34:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi mates!</p>
<p dir="auto">I have a question about the sharpe ratio shown in the global leaderboard...<br />
If we take the value indicated in the main interface for the out of sample, and then try to replicate it by accessing a specific system and filtering its OOS period, the value obtained differs from the one shown In the main interface of the global leaderboard.</p>
<p dir="auto">Why is this discrepancy generated? And which of the two sharpe ratio values ​​is correct?</p>
<p dir="auto">Thanks in advance!</p>
]]></description><link>http://quantiacs.com/community/post/68</link><guid isPermaLink="true">http://quantiacs.com/community/post/68</guid><dc:creator><![CDATA[captain.nidoran]]></dc:creator><pubDate>Fri, 05 Mar 2021 19:34:22 GMT</pubDate></item><item><title><![CDATA[Reply to Different Sharpe ratios in backtest and competition filter on Wed, 03 Mar 2021 22:30:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/20">@antinomy</a> Ok, that's great. But we put in our roadmap the option to update state between passes also.</p>
]]></description><link>http://quantiacs.com/community/post/57</link><guid isPermaLink="true">http://quantiacs.com/community/post/57</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Wed, 03 Mar 2021 22:30:05 GMT</pubDate></item><item><title><![CDATA[Reply to Different Sharpe ratios in backtest and competition filter on Wed, 03 Mar 2021 18:30:01 GMT]]></title><description><![CDATA[<p dir="auto">I managed to implement it without global variables, now the sharpe ratio matches and it got accepted.<br />
Thanks again!</p>
]]></description><link>http://quantiacs.com/community/post/55</link><guid isPermaLink="true">http://quantiacs.com/community/post/55</guid><dc:creator><![CDATA[antinomy]]></dc:creator><pubDate>Wed, 03 Mar 2021 18:30:01 GMT</pubDate></item><item><title><![CDATA[Reply to Different Sharpe ratios in backtest and competition filter on Wed, 03 Mar 2021 13:56:18 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for the answer!</p>
<p dir="auto"><em>if you use for example global variables and update state between passes</em></p>
<p dir="auto">Yep, that's exactly what I did.</p>
]]></description><link>http://quantiacs.com/community/post/54</link><guid isPermaLink="true">http://quantiacs.com/community/post/54</guid><dc:creator><![CDATA[antinomy]]></dc:creator><pubDate>Wed, 03 Mar 2021 13:56:18 GMT</pubDate></item><item><title><![CDATA[Reply to Different Sharpe ratios in backtest and competition filter on Wed, 03 Mar 2021 10:39:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/20">@antinomy</a>  We decided to open an issue on point 2) as we never mentioned this point in the documentation: <a href="https://quantiacs.com/community/topic/15/share-the-state-between-iterations?_=1614767260575" rel="nofollow ugc">https://quantiacs.com/community/topic/15/share-the-state-between-iterations?_=1614767260575</a></p>
]]></description><link>http://quantiacs.com/community/post/52</link><guid isPermaLink="true">http://quantiacs.com/community/post/52</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Wed, 03 Mar 2021 10:39:15 GMT</pubDate></item><item><title><![CDATA[Reply to Different Sharpe ratios in backtest and competition filter on Wed, 03 Mar 2021 10:37:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/20">@antinomy</a> Hello, sorry for delay, we coded some mock examples to reconstruct potential problems. There are at least 2 options:</p>
<ol>
<li>Single-pass vs multi-pass evaluation. There are 2 ways to code a system on Quantiacs, processing all time series in one shot (single-pass evaluation) or step-by-step using a multi-pass evaluation.</li>
</ol>
<p dir="auto">Single-pass evaluation occurs when the complete time series is accessed at once. In this case, it can happen that the last points of the time series are used to take a decision at a former time. For example, the code could use the global mean of some variable as a reference value for all the time series.</p>
<p dir="auto">Multi-pass evaluation can be performed using the built-in backtesting function. In this way no forward looking can take place as at time "t" (open) only data until time "t-1" (close) are available.</p>
<p dir="auto">Both options are allowed in the Development area (notebooks). Once the code is submitted, it is processed only with our multi-pass backtester on the server.</p>
<p dir="auto">Therefore, a looking-forward single-pass submission could have a large Sharpe ratio when processed on the notebook, and a small one on the server, and be rejected.</p>
<ol start="2">
<li>The second reason is more subtle, and it is connected to the fact that the Quantiacs backtester does not save the state of variables between passes. Variable values are not stored but they are recomputed at every step.</li>
</ol>
<p dir="auto">As a consequence, if you use for example global variables and update state between passes, the result on the notebook will be fine, but the one on the server will not recognize the variable update.</p>
]]></description><link>http://quantiacs.com/community/post/51</link><guid isPermaLink="true">http://quantiacs.com/community/post/51</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Wed, 03 Mar 2021 10:37:43 GMT</pubDate></item></channel></rss>