<?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[Q18 Quick start guide not working anymore]]></title><description><![CDATA[<p dir="auto">I am currently trying to retry multi data set. i follow the example of Q18 and change for spx / s&amp;p500. However, it doesn't work anymore. May i know how can i return multi data set in Q22 now? Thanks a lot.</p>
<p dir="auto"><a href="https://quantiacs.com/documentation/en/examples/q18_quick_start.html" rel="nofollow ugc">https://quantiacs.com/documentation/en/examples/q18_quick_start.html</a></p>
<pre><code>def load_data(period):
    futures = qndata.futures.load_data(tail=period, assets=["F_DX"]).isel(asset=0)
    stocks  = qndata.stocks.load_spx_data(tail=period)
    return {"futures": futures, "stocks": stocks}, futures.time.values



qnbt.backtest(
    competition_type= "stocks_s&amp;p500",
    load_data= load_data,
    lookback_period= 365,
    start_date= "2006-01-01",
    strategy= strategy,
    window= window
)

</code></pre>
<p dir="auto">Error happened in validate_data function</p>
<pre><code>File ~/book/qnt/backtester.py:386, in backtest.&lt;locals&gt;.validate_data(data)
    377 def validate_data(data):
    378     mismatches = {
    379         'stocks': ['stocks', 'stocks_long'],
    380         'stocks_s&amp;p500': ['stocks_s&amp;p500'],
   (...)
    384         'futures': ['futures']
    385     }
--&gt; 386     if data.name not in mismatches.get(competition_type, []):
    387         log_err(
    388             f"WARNING! The data type and the competition type are mismatched. Data type: {data.name}, competition type: {competition_type}")

AttributeError: 'tuple' object has no attribute 'name'
</code></pre>
]]></description><link>http://quantiacs.com/community/topic/640/q18-quick-start-guide-not-working-anymore</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 12:42:46 GMT</lastBuildDate><atom:link href="http://quantiacs.com/community/topic/640.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 26 Jan 2025 06:53:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Q18 Quick start guide not working anymore on Mon, 27 Jan 2025 11:26:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/3746">@angusslq</a> Hi. Try cloning the template or restarting JupyterLab. The error was fixed in the new version of the qnt library.</p>
]]></description><link>http://quantiacs.com/community/post/1863</link><guid isPermaLink="true">http://quantiacs.com/community/post/1863</guid><dc:creator><![CDATA[Vyacheslav_B]]></dc:creator><pubDate>Mon, 27 Jan 2025 11:26:17 GMT</pubDate></item></channel></rss>