<?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[Calculation time exceeded on submission]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/12">@support</a> : My Q21 submission gives a “Calculation time exceeded” error. This revers to: “Timeout, An error message stating that the strategy calculation exceeds a given time implies that you need to optimize the code and reduce the execution time. Futures systems should be evaluated in 10 minutes and Bitcoin futures/Crypto long systems in 5 minutes of time.”</p>
<p dir="auto">Could you please help? Submission number is # 16381634.</p>
<p dir="auto">Best Regards.</p>
]]></description><link>http://quantiacs.com/community/topic/507/calculation-time-exceeded-on-submission</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 18:46:48 GMT</lastBuildDate><atom:link href="http://quantiacs.com/community/topic/507.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Jan 2024 18:12:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Calculation time exceeded on submission on Tue, 06 Feb 2024 09:55:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/72">@theflyingdutchman</a> Hello,</p>
<p dir="auto">Another option is to rewrite your strategy for a single-pass version before submitting it. This approach will significantly speed up the calculations. However, it's important to note that the actual statistical values can only be tracked after submitting the strategy to the competition.</p>
<p dir="auto">For example:<br />
<a href="https://github.com/quantiacs/strategy-ml-crypto-long-short/blob/master/strategy.ipynb" rel="nofollow ugc">https://github.com/quantiacs/strategy-ml-crypto-long-short/blob/master/strategy.ipynb</a></p>
<p dir="auto">To adapt this strategy for a single-pass version, follow these steps:</p>
<ol>
<li>Comment out or delete the line where <code>qnbt.backtest_ml</code> is used.</li>
<li>Insert the following code:</li>
</ol>
<pre><code class="language-python">import xarray as xr
import qnt.ta as qnta
import qnt.data as qndata
import qnt.output as qnout
import qnt.stats as qnstats

retrain_interval = 3*365 + 1
data = qndata.stocks.load_ndx_data(tail=retrain_interval)

models = train_model(data)
weights = predict(models, data)
</code></pre>
<ol start="3">
<li>In a new cell, insert code to save the weights:</li>
</ol>
<pre><code class="language-python">qnout.write(weights)
</code></pre>
<p dir="auto">To view the strategy's statistics, use the following code in a new cell:</p>
<pre><code class="language-python">
# Calculate stats
stats = qnstats.calc_stat(data, weights)
display(stats.to_pandas().tail())

# Graph
performance = stats.to_pandas()["equity"]
import qnt.graph as qngraph
qngraph.make_plot_filled(performance.index, performance, name="PnL (Equity)", type="log")
</code></pre>
<p dir="auto">The qnbt.backtest_ml function is a unique tool for evaluating machine learning strategies, which stands out from what is offered on other platforms. It allows users to set retraining intervals and analyze statistical metrics of the strategy, as opposed to the traditional evaluation of the machine learning model. This provides a deeper understanding of the strategy's effectiveness under various market conditions.</p>
]]></description><link>http://quantiacs.com/community/post/1368</link><guid isPermaLink="true">http://quantiacs.com/community/post/1368</guid><dc:creator><![CDATA[Vyacheslav_B]]></dc:creator><pubDate>Tue, 06 Feb 2024 09:55:06 GMT</pubDate></item><item><title><![CDATA[Reply to Calculation time exceeded on submission on Wed, 31 Jan 2024 08:15:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/12">@support</a> The Ml algo does not train on a daily basis, I also tried to decrease the traning days, but that lowered the SR. Could you look into the process? Maybe the execution time does take longer for certain ML algo's.</p>
]]></description><link>http://quantiacs.com/community/post/1365</link><guid isPermaLink="true">http://quantiacs.com/community/post/1365</guid><dc:creator><![CDATA[TheFlyingDutchman]]></dc:creator><pubDate>Wed, 31 Jan 2024 08:15:55 GMT</pubDate></item><item><title><![CDATA[Reply to Calculation time exceeded on submission on Fri, 26 Jan 2024 21:10:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/72">@theflyingdutchman</a> Hi, sorry for delay. That is correct, execution takes too long. Can you try to speed up computation on your side? Are you maybe trying to train a ML model on a daily basis?</p>
]]></description><link>http://quantiacs.com/community/post/1364</link><guid isPermaLink="true">http://quantiacs.com/community/post/1364</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Fri, 26 Jan 2024 21:10:03 GMT</pubDate></item></channel></rss>