<?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[Strategy help]]></title><description><![CDATA[I have a strategy that doesn&#x27;t work, please help improve it.]]></description><link>http://quantiacs.com/community/category/2</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 08:56:20 GMT</lastBuildDate><atom:link href="http://quantiacs.com/community/category/2.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 11 Apr 2026 08:33:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[scritchy scratchy]]></title><description><![CDATA[<p dir="auto">thanks for sharing this! i had the same question about converting stateful strategies to single pass for submission. the <a href="https://scritchyscratchy.cc" rel="nofollow ugc">scritchy scratchy</a> guide helped me understand the difference between multi and single backtest modes - hope the quantiacs team releases more documentation on this soon.</p>
]]></description><link>http://quantiacs.com/community/topic/783/scritchy-scratchy</link><guid isPermaLink="true">http://quantiacs.com/community/topic/783/scritchy-scratchy</guid><dc:creator><![CDATA[teal.pikachu]]></dc:creator><pubDate>Sat, 11 Apr 2026 08:33:03 GMT</pubDate></item><item><title><![CDATA[Is there a way to submit a strategy via the API?]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/3718">@svyable</a> Hi,<br />
sorry for late answer, no we don't provide that option, but we will think about adding it in future.</p>
]]></description><link>http://quantiacs.com/community/topic/761/is-there-a-way-to-submit-a-strategy-via-the-api</link><guid isPermaLink="true">http://quantiacs.com/community/topic/761/is-there-a-way-to-submit-a-strategy-via-the-api</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Fri, 13 Feb 2026 09:29:41 GMT</pubDate></item><item><title><![CDATA[Q24 Example Failed to Run]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/4697">@tim-hub</a> Hi,</p>
<p dir="auto">the template processing has not finished yet, it is on day by day processing (currently beginning of 2023). The reason of the error is that helper function tries to compare stat after 2022-08-31, which is not possible if processing date is 2020-01-01 for example. It doesn't affect the output (weights), and now you don't see this error because processing date is after 2022-08-31. If you had cloned the template and run it, the error would not have occurred.</p>
]]></description><link>http://quantiacs.com/community/topic/722/q24-example-failed-to-run</link><guid isPermaLink="true">http://quantiacs.com/community/topic/722/q24-example-failed-to-run</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Wed, 03 Dec 2025 11:10:49 GMT</pubDate></item><item><title><![CDATA[Strategy filtered after a few days]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/82">@sun-73</a> it should be ok</p>
]]></description><link>http://quantiacs.com/community/topic/631/strategy-filtered-after-a-few-days</link><guid isPermaLink="true">http://quantiacs.com/community/topic/631/strategy-filtered-after-a-few-days</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Tue, 14 Jan 2025 07:27:58 GMT</pubDate></item><item><title><![CDATA[How to submit stateful long short]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/3389">@newbiequant96</a> Hi, the template is a "working code" still to be finalized and published among the templates in the account area, however the logic behind is strictly multi-pass and a conversion to single pass is not really so straightforward.</p>
]]></description><link>http://quantiacs.com/community/topic/590/how-to-submit-stateful-long-short</link><guid isPermaLink="true">http://quantiacs.com/community/topic/590/how-to-submit-stateful-long-short</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Mon, 10 Jun 2024 10:14:10 GMT</pubDate></item><item><title><![CDATA[Os period is not updated]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/3398">@commanderangle</a> Dear commanderangle,</p>
<p dir="auto">Your strategies are processed in a correct manner, but the reason why you see 0 out-of-sample score is due to the fact that your strategies generate zero weights for all assets for out-of-sample time period. You can check your weights for any strategy by downloading them. There is a download button in the submission logs section.</p>
<p dir="auto">Regards</p>
]]></description><link>http://quantiacs.com/community/topic/589/os-period-is-not-updated</link><guid isPermaLink="true">http://quantiacs.com/community/topic/589/os-period-is-not-updated</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Mon, 10 Jun 2024 07:19:37 GMT</pubDate></item><item><title><![CDATA[Optimization speed in python]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/868">@dark-pidgeot</a> Hi, the question is a bit too generic, what do you need exactly to speed up?</p>
]]></description><link>http://quantiacs.com/community/topic/553/optimization-speed-in-python</link><guid isPermaLink="true">http://quantiacs.com/community/topic/553/optimization-speed-in-python</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Tue, 09 Apr 2024 16:36:32 GMT</pubDate></item><item><title><![CDATA[Missed Call to write output]]></title><description><![CDATA[<p dir="auto">I finally resolved the issue, after lots of struggle. The custom layers, custom loss function and the function had to be serialized and deserialized correctly in order to save the architecture and weights as Json, rather than in a dictionary, like is suggested for pytorch in the Neural netowork template.<br />
It seems Pytorch is way more user friendly when it comes to saving and loading models.</p>
]]></description><link>http://quantiacs.com/community/topic/522/missed-call-to-write-output</link><guid isPermaLink="true">http://quantiacs.com/community/topic/522/missed-call-to-write-output</guid><dc:creator><![CDATA[magenta.kabuto]]></dc:creator><pubDate>Sat, 06 Apr 2024 01:27:27 GMT</pubDate></item><item><title><![CDATA[progress check froze]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/12">@support</a> Hello,</p>
<p dir="auto">got it, thanks for the reply,</p>
]]></description><link>http://quantiacs.com/community/topic/539/progress-check-froze</link><guid isPermaLink="true">http://quantiacs.com/community/topic/539/progress-check-froze</guid><dc:creator><![CDATA[dark.pidgeot]]></dc:creator><pubDate>Mon, 18 Mar 2024 11:52:43 GMT</pubDate></item><item><title><![CDATA[TypeError: __init__() got an unexpected keyword argument &#x27;max_value&#x27;]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/2784">@illustrious-felice</a><br />
Hello, sorry for late reply, can you please let us know about the progressbar2 version installed from environment you are currently using? Be sure that "progressbar2" package is installed and not "progressbar".</p>
<p dir="auto">Best regards,</p>
]]></description><link>http://quantiacs.com/community/topic/538/typeerror-__init__-got-an-unexpected-keyword-argument-max_value</link><guid isPermaLink="true">http://quantiacs.com/community/topic/538/typeerror-__init__-got-an-unexpected-keyword-argument-max_value</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Mon, 18 Mar 2024 08:28:09 GMT</pubDate></item><item><title><![CDATA[How to get NASDAQ100 index weights?]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/2548">@buyers_are_back</a> Hi, more info of course can be found here:</p>
<p dir="auto"><a href="https://indexes.nasdaqomx.com/docs/Nasdaq_Index_Weight_Calculations.pdf" rel="nofollow ugc">https://indexes.nasdaqomx.com/docs/Nasdaq_Index_Weight_Calculations.pdf</a></p>
<p dir="auto">and here:</p>
<p dir="auto"><a href="https://indexes.nasdaq.com/docs/Methodology_NDX.pdf" rel="nofollow ugc">https://indexes.nasdaq.com/docs/Methodology_NDX.pdf</a></p>
<p dir="auto">Pages 4 and 5 give more details on the weights and caps.</p>
<p dir="auto">For example, no security weight may exceed 14% of the index value.</p>
]]></description><link>http://quantiacs.com/community/topic/536/how-to-get-nasdaq100-index-weights</link><guid isPermaLink="true">http://quantiacs.com/community/topic/536/how-to-get-nasdaq100-index-weights</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Tue, 12 Mar 2024 20:15:57 GMT</pubDate></item><item><title><![CDATA[RuntimeError: expand(torch.DoubleTensor{[694, 6]}, size=[694]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2)]]></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 so much. I have resolved this error</p>
]]></description><link>http://quantiacs.com/community/topic/529/runtimeerror-expand-torch-doubletensor-694-6-size-694-the-number-of-sizes-provided-1-must-be-greater-or-equal-to-the-number-of-dimensions-in-the-tensor-2</link><guid isPermaLink="true">http://quantiacs.com/community/topic/529/runtimeerror-expand-torch-doubletensor-694-6-size-694-the-number-of-sizes-provided-1-must-be-greater-or-equal-to-the-number-of-dimensions-in-the-tensor-2</guid><dc:creator><![CDATA[illustrious.felice]]></dc:creator><pubDate>Sun, 10 Mar 2024 15:22:08 GMT</pubDate></item><item><title><![CDATA[backtest_ml has too long a run time]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/2784">@illustrious-felice</a></p>
<p dir="auto">Incorporating seed initialization into your PyTorch code ensures reproducibility by making the random number generation predictable. This involves setting seeds for the PyTorch engine, NumPy, and the Python random module if you're using it. Below, I'll show you how to integrate seed initialization into your existing code. Remember, while this can make your experiments more reproducible, it does not guarantee identical results across different hardware or PyTorch versions due to the inherent nondeterminism in some GPU operations.</p>
import xarray as xr  # xarray for data manipulation
import qnt.data as qndata  # functions for loading data
import qnt.backtester as qnbt  # built-in backtester
import qnt.ta as qnta  # technical analysis library
import numpy as np
import pandas as pd
import torch
from torch import nn, optim
import random

# Seed initialization function
def set_seed(seed_value=42):
    """Set seed for reproducibility."""
    random.seed(seed_value)
    np.random.seed(seed_value)
    torch.manual_seed(seed_value)
    torch.cuda.manual_seed(seed_value)
    torch.cuda.manual_seed_all(seed_value)  # if you are using multi-GPU.
    torch.backends.cudnn.deterministic = True
    torch.backends.cudnn.benchmark = False

# Set the seed for reproducibility
set_seed(42)

asset_name_all = ['NAS:AAPL', 'NAS:AMZN', 'NAS:MSFT']

class LSTM(nn.Module):
    """
    Class to define our LSTM network.
    """
    def __init__(self, input_dim=3, hidden_layers=64):
        super(LSTM, self).__init__()
        self.hidden_layers = hidden_layers
        self.lstm1 = nn.LSTMCell(input_dim, self.hidden_layers)
        self.lstm2 = nn.LSTMCell(self.hidden_layers, self.hidden_layers)
        self.linear = nn.Linear(self.hidden_layers, 1)

    def forward(self, y, future_preds=0):
        outputs = []
        n_samples = y.size(0)
        h_t = torch.zeros(n_samples, self.hidden_layers, dtype=torch.float32)
        c_t = torch.zeros(n_samples, self.hidden_layers, dtype=torch.float32)
        h_t2 = torch.zeros(n_samples, self.hidden_layers, dtype=torch.float32)
        c_t2 = torch.zeros(n_samples, self.hidden_layers, dtype=torch.float32)

        for time_step in range(y.size(1)):
            x_t = y[:, time_step, :]  # Ensure x_t is [batch, input_dim]

            h_t, c_t = self.lstm1(x_t, (h_t, c_t))
            h_t2, c_t2 = self.lstm2(h_t, (h_t2, c_t2))
            output = self.linear(h_t2)
            outputs.append(output.unsqueeze(1))

        outputs = torch.cat(outputs, dim=1).squeeze(-1)
        return outputs

def get_model():
    model = LSTM(input_dim=3)
    return model

def get_features(data):
    close_price = data.sel(field="close").ffill('time').bfill('time').fillna(1)
    open_price = data.sel(field="open").ffill('time').bfill('time').fillna(1)
    high_price = data.sel(field="high").ffill('time').bfill('time').fillna(1)
    log_close = np.log(close_price)
    log_open = np.log(open_price)
    features = xr.concat([log_close, log_open, high_price], "feature")
    return features

def get_target_classes(data):
    price_current = data.sel(field='close')
    price_future = qnta.shift(price_current, -1)

    class_positive = 1  # prices goes up
    class_negative = 0  # price goes down

    target_price_up = xr.where(price_future &gt; price_current, class_positive, class_negative)
    return target_price_up

def load_data(period):
    return qndata.stocks.load_ndx_data(tail=period, assets=asset_name_all)

def train_model(data):
    features_all = get_features(data)
    target_all = get_target_classes(data)
    models = dict()

    for asset_name in asset_name_all:
        model = get_model()
        target_cur = target_all.sel(asset=asset_name).dropna('time', 'any')
        features_cur = features_all.sel(asset=asset_name).dropna('time', 'any')
        target_for_learn_df, feature_for_learn_df = xr.align(target_cur, features_cur, join='inner')
        criterion = nn.MSELoss()
        optimiser = optim.LBFGS(model.parameters(), lr=0.08)
        epochs = 1
        for i in range(epochs):
            def closure():
                optimiser.zero_grad()
                feature_data = feature_for_learn_df.transpose('time', 'feature').values
                in_ = torch.tensor(feature_data, dtype=torch.float32).unsqueeze(0)
                out = model(in_)
                target = torch.zeros(1, len(target_for_learn_df.values))
                target[0, :] = torch.tensor(np.array(target_for_learn_df.values))
                loss = criterion(out, target)
                loss.backward()
                return loss
            optimiser.step(closure)
        models[asset_name] = model
    return models

def predict(models, data):
    weights = xr.zeros_like(data.sel(field='close'))
    for asset_name in asset_name_all:
        features_all = get_features(data)
        features_cur = features_all.sel(asset=asset_name).dropna('time', 'any')
        if len(features_cur.time) &lt; 1:
            continue
        feature_data = features_cur.transpose('time', 'feature').values
        in_ = torch.tensor(feature_data, dtype=torch.float32).unsqueeze(0)
        out = models[asset_name](in_)
        prediction = out.detach()[0]
        weights.loc[dict(asset=asset_name, time=features_cur.time.values)] = prediction
    return weights

weights = qnbt.backtest_ml(
    load_data=load_data,
    train=train_model,
    predict=predict,
    train_period=55,
    retrain_interval=55,
    retrain_interval_after_submit=1,
    predict_each_day=False,
    competition_type='stocks_nasdaq100',
    lookback_period=55,
    start_date='2024-01-01',
    build_plots=True
)


<p dir="auto">I think I won't be available next week. If you have any more questions, don’t expect an answer from me next week.</p>
]]></description><link>http://quantiacs.com/community/topic/528/backtest_ml-has-too-long-a-run-time</link><guid isPermaLink="true">http://quantiacs.com/community/topic/528/backtest_ml-has-too-long-a-run-time</guid><dc:creator><![CDATA[Vyacheslav_B]]></dc:creator><pubDate>Fri, 08 Mar 2024 16:26:54 GMT</pubDate></item><item><title><![CDATA[Errors when I save the isssus parameters of my optimization in the json file]]></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 for your advise, it's ok</p>
]]></description><link>http://quantiacs.com/community/topic/523/errors-when-i-save-the-isssus-parameters-of-my-optimization-in-the-json-file</link><guid isPermaLink="true">http://quantiacs.com/community/topic/523/errors-when-i-save-the-isssus-parameters-of-my-optimization-in-the-json-file</guid><dc:creator><![CDATA[dark.pidgeot]]></dc:creator><pubDate>Thu, 22 Feb 2024 05:40:02 GMT</pubDate></item><item><title><![CDATA[What is forward looking and why it&#x27;s effective badly to strategy?]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/2784">@illustrious-felice</a> Hi, that is not automatic as all trades are punished by slippage, and that is a subtraction from profits irrespective on the sign of the weights.</p>
]]></description><link>http://quantiacs.com/community/topic/515/what-is-forward-looking-and-why-it-s-effective-badly-to-strategy</link><guid isPermaLink="true">http://quantiacs.com/community/topic/515/what-is-forward-looking-and-why-it-s-effective-badly-to-strategy</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Fri, 16 Feb 2024 16:35:54 GMT</pubDate></item><item><title><![CDATA[Please create the program &quot;Quantiacs Tips&quot;]]></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 for your feedback. I also hope Quantiacs updates new strategy examples on how to use technical analysis (besides sma, trix_ema, atr_lwma,...), and strategies on using ML/DL models effectively (not an example that strategy forward-looking),...</p>
<p dir="auto">Hopefully in the future Quantiacs will release new data sets such as news, sentiment, macro, options,... Create new contests that allow merging strategies to build portfolios,...</p>
<p dir="auto">Hopefully, Quantiacs will continue to grow. Sincere thanks to Quantiacs for creating extremely high-quality contests.</p>
]]></description><link>http://quantiacs.com/community/topic/513/please-create-the-program-quantiacs-tips</link><guid isPermaLink="true">http://quantiacs.com/community/topic/513/please-create-the-program-quantiacs-tips</guid><dc:creator><![CDATA[illustrious.felice]]></dc:creator><pubDate>Tue, 13 Feb 2024 12:02:12 GMT</pubDate></item><item><title><![CDATA[How to select and combine strategies to optimize your portfolio]]></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. So as I understand it, I will give higher weight to strategies with lower correlation and vice versa, right? According to your answer, I understand that I can also give high weight to low-volatility strategies and vice versa. So what about equal risk portfolio? In your opinion, is this an effective way to optimize your portfolio?</p>
]]></description><link>http://quantiacs.com/community/topic/505/how-to-select-and-combine-strategies-to-optimize-your-portfolio</link><guid isPermaLink="true">http://quantiacs.com/community/topic/505/how-to-select-and-combine-strategies-to-optimize-your-portfolio</guid><dc:creator><![CDATA[illustrious.felice]]></dc:creator><pubDate>Mon, 22 Jan 2024 04:47:38 GMT</pubDate></item><item><title><![CDATA[Technique to reduce max_drawdown]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/1799">@magenta-kabuto</a> Thank you very much for your advice. I will research to apply your suggestions to the algorithm</p>
]]></description><link>http://quantiacs.com/community/topic/491/technique-to-reduce-max_drawdown</link><guid isPermaLink="true">http://quantiacs.com/community/topic/491/technique-to-reduce-max_drawdown</guid><dc:creator><![CDATA[illustrious.felice]]></dc:creator><pubDate>Thu, 28 Dec 2023 14:52:42 GMT</pubDate></item><item><title><![CDATA[Checking of strategies for Q20 takes two weeks]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/103">@algotime</a> Dear Algotime, all three strategies will participate in the contest. We will update the contest leaderboard once all eligible strategies have finished processing. Thank you for your patience.</p>
]]></description><link>http://quantiacs.com/community/topic/440/checking-of-strategies-for-q20-takes-two-weeks</link><guid isPermaLink="true">http://quantiacs.com/community/topic/440/checking-of-strategies-for-q20-takes-two-weeks</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Mon, 09 Oct 2023 14:00:42 GMT</pubDate></item><item><title><![CDATA[How to load data to work with Multi-backtesting_ml]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/2133">@cyan-gloom</a></p>
<p dir="auto">Hello. The provided code is insufficient to understand the problem.</p>
<p dir="auto">I assume that a certain function might not be returning the required value (for instance, the function where your model is being created).</p>
<p dir="auto">I recommend that you check all return values of functions, using tools like display or print. Then, compare them with what is returned in properly working examples.</p>
<p dir="auto">The state allows you to use data from previous iterations. You can find an example here:<br />
<a href="https://github.com/quantiacs/toolbox/blob/2f4c42e33c7ce789dfad5d170444fd542e28c8ae/qnt/examples/004-strategy-futures-multipass-stateful.py" rel="nofollow ugc">https://github.com/quantiacs/toolbox/blob/2f4c42e33c7ce789dfad5d170444fd542e28c8ae/qnt/examples/004-strategy-futures-multipass-stateful.py</a></p>
]]></description><link>http://quantiacs.com/community/topic/425/how-to-load-data-to-work-with-multi-backtesting_ml</link><guid isPermaLink="true">http://quantiacs.com/community/topic/425/how-to-load-data-to-work-with-multi-backtesting_ml</guid><dc:creator><![CDATA[Vyacheslav_B]]></dc:creator><pubDate>Tue, 05 Sep 2023 08:43:25 GMT</pubDate></item><item><title><![CDATA[Error Q20 output missing when submitting]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/72">@theflyingdutchman</a></p>
<p dir="auto">it can help you. See topic <strong>3) Not enough bid information.</strong></p>
<p dir="auto"><a href="https://github.com/quantiacs/strategy-q20-nasdaq100-quick-start/blob/master/strategy.ipynb" rel="nofollow ugc">https://github.com/quantiacs/strategy-q20-nasdaq100-quick-start/blob/master/strategy.ipynb</a></p>
def get_enough_bid_for(data_, weights_):
    time_traded = weights_.time[abs(weights_).fillna(0).sum('asset') &gt; 0]
    is_strategy_traded = len(time_traded)
    if is_strategy_traded:
        return xr.where(weights_.time &lt; time_traded.min(), data_.sel(field="is_liquid"), weights_)
    return weights_


weights_new = get_enough_bid_for(data, weights)
weights_new = weights_new.sel(time=slice("2006-01-01",None))

]]></description><link>http://quantiacs.com/community/topic/411/error-q20-output-missing-when-submitting</link><guid isPermaLink="true">http://quantiacs.com/community/topic/411/error-q20-output-missing-when-submitting</guid><dc:creator><![CDATA[Vyacheslav_B]]></dc:creator><pubDate>Sun, 13 Aug 2023 10:54:49 GMT</pubDate></item><item><title><![CDATA[Multi-pass Backtesting]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/602">@eddiee</a></p>
<p dir="auto">Hello.</p>
<p dir="auto">This code looks to the future.<br />
It is needed to train the model.<br />
Pay attention to the name of the variable.</p>
]]></description><link>http://quantiacs.com/community/topic/415/multi-pass-backtesting</link><guid isPermaLink="true">http://quantiacs.com/community/topic/415/multi-pass-backtesting</guid><dc:creator><![CDATA[Vyacheslav_B]]></dc:creator><pubDate>Thu, 10 Aug 2023 06:51:03 GMT</pubDate></item><item><title><![CDATA[Why Sharp ratios is not inverted ?]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/12">@support</a><br />
Thanks a lot !</p>
]]></description><link>http://quantiacs.com/community/topic/392/why-sharp-ratios-is-not-inverted</link><guid isPermaLink="true">http://quantiacs.com/community/topic/392/why-sharp-ratios-is-not-inverted</guid><dc:creator><![CDATA[cyan.gloom]]></dc:creator><pubDate>Sun, 28 May 2023 05:32:02 GMT</pubDate></item><item><title><![CDATA[combinations of strategy]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/12">@support</a><br />
Thanks<br />
I got it !</p>
]]></description><link>http://quantiacs.com/community/topic/391/combinations-of-strategy</link><guid isPermaLink="true">http://quantiacs.com/community/topic/391/combinations-of-strategy</guid><dc:creator><![CDATA[cyan.gloom]]></dc:creator><pubDate>Wed, 24 May 2023 07:49:56 GMT</pubDate></item><item><title><![CDATA[Backtesting]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/229">@stefanm</a> Thank you!</p>
]]></description><link>http://quantiacs.com/community/topic/372/backtesting</link><guid isPermaLink="true">http://quantiacs.com/community/topic/372/backtesting</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Sat, 01 Apr 2023 17:51:09 GMT</pubDate></item><item><title><![CDATA[Fundamental Data: Periodic indicators &amp; Instant indicators]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/1797">@johback</a></p>
<p dir="auto">Hello</p>
<p dir="auto">More examples are here <a href="https://github.com/quantiacs/toolbox/blob/main/qnt/tests/test_fundamental_data.py" rel="nofollow ugc">https://github.com/quantiacs/toolbox/blob/main/qnt/tests/test_fundamental_data.py</a></p>
<p dir="auto">This is a simple example.</p>
import qnt.data as qndata
import datetime as dt
import qnt.data.secgov_indicators
import qnt.data as qndata
import qnt.stats as qns

assets = qndata.stocks.load_ndx_list(tail=dt.timedelta(days=5 * 365))
assets_names = [i["id"] for i in assets]
data = qndata.stocks.load_ndx_data(tail=dt.timedelta(days=5 * 365),
                                   dims=("time", "field", "asset"),
                                   assets=assets_names,
                                   forward_order=True)

facts_names = ['operating_expense']  # 'assets', 'liabilities', 'ivestment_short_term' and other

fundamental_data = qnt.data.secgov_load_indicators(assets,
                                                   time_coord=data.time,
                                                   standard_indicators=facts_names)

# Operating expenses include marketing, noncapitalized R&amp;D,
# travel and entertainment, office supply, rent, salary, cogs...
weights = fundamental_data.sel(field='operating_expense')
is_liquid = data.sel(field="is_liquid")
weights = weights * is_liquid

# calc stats
stats = qns.calc_stat(data, weights.sel(time=slice("2006-01-01", None)))
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")


]]></description><link>http://quantiacs.com/community/topic/353/fundamental-data-periodic-indicators-instant-indicators</link><guid isPermaLink="true">http://quantiacs.com/community/topic/353/fundamental-data-periodic-indicators-instant-indicators</guid><dc:creator><![CDATA[Vyacheslav_B]]></dc:creator><pubDate>Fri, 27 Jan 2023 09:33:17 GMT</pubDate></item></channel></rss>