Navigation

    Quantiacs Community

    • Register
    • Login
    • Search
    • Categories
    • News
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Popular
    Log in to post
    • All categories
    • Support
    •      Request New Features
    • Strategy help
    • General Discussion
    • News and Feature Releases
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All Time
    • Day
    • Week
    • Month
    • illustrious.felice

      Translating code from Quantiacs Legacy
      Support • • illustrious.felice

      6
      0
      Votes
      6
      Posts
      907
      Views

      illustrious.felice

      @vyacheslav_b Thank you so much

    • W

      sliding 3d array
      Strategy help • • wool.dewgong

      6
      0
      Votes
      6
      Posts
      1417
      Views

      support

      @wool-dewgong Hello! We added one template which should address your issue and allow you to perform a rolling fast ML training with retraining. It is available in your user space in the Examples section and you can read it here also in the public docs:

      https://quantiacs.com/documentation/en/examples/machine_learning_with_a_voting_classifier.html

    • I

      Getting started with local dev.
      Support • • iron.tentacruel

      6
      0
      Votes
      6
      Posts
      920
      Views

      support

      @iron-tentacruel Sorry for the delay in the answer. We recommend conda as we can better track dependencies. With conda you can create locally an environment which mirrors the one on the Quantiacs server and you can work locally as you would on the server. If you need a specific version of a package, please let us know.

    • A

      Weights different in testing and submission
      Support • • anshul96go

      6
      0
      Votes
      6
      Posts
      1386
      Views

      support

      @antinomy thanks!

    • A

      How are models ranked on the leaderboard before the live period?
      General Discussion • • antinomy

      6
      1
      Votes
      6
      Posts
      1662
      Views

      S

      @support
      oh I see now what you mean.
      15 strategies PER USER are selected.
      At first, I thought you were only going to select 15 strategies total for all users.
      Thanks.

    • N

      Q21 contest results
      News and Feature Releases • • neural.exeggutor

      6
      0
      Votes
      6
      Posts
      11570
      Views

      support

      @theflyingdutchman Hi, sorry for the delay, yes, all fine, more details by e-mail

    • illustrious.felice

      Difference between relative_return & mean_return
      Support • • illustrious.felice

      6
      1
      Votes
      6
      Posts
      1117
      Views

      illustrious.felice

      @vyacheslav_b Thank you so much

    • C

      Why .interpolate_na dosen't work well ?
      Support • • cyan.gloom

      6
      0
      Votes
      6
      Posts
      1709
      Views

      C

      @antinomy

      I got it !
      Thanks a lot !!

    • M

      Futures data issues
      Support • • Msant14

      6
      1
      Votes
      6
      Posts
      784
      Views

      A

      @support I have done that twice before my post, but now F_RY looks fine. There are several directories with scripts and notebooks I use with qnt, so maybe I deleted the wrong data-cache before...
      Thanks for fixing the data!

    • S

      Balance, order size, stop loss, open and close position price
      Support • • ScalpingAF

      6
      0
      Votes
      6
      Posts
      788
      Views

      support

      @scalpingaf Correct, all trades (buy or sell) are taken at the open of the next day you take the decision.

    • S

      Stocks data
      Support • • Sun-73

      6
      0
      Votes
      6
      Posts
      2065
      Views

      S

      @support Yes, I can load now the stocks data. Thank you once again!

    • M

      Strategy takes a long time to get verified
      Support • • magenta.muskrat

      6
      0
      Votes
      6
      Posts
      3010
      Views

      S

      @support, thank you for the clarifications. Regards.

    • E

      Q17 Neural Networks Algo Template; is there an error in train_model()?
      Strategy help • • EDDIEE

      6
      1
      Votes
      6
      Posts
      1888
      Views

      V

      Hello colleagues.

      The solution in case of predicting one financial instrument can be the following (train_period changed)

      def load_data(period): return qndata.cryptodaily_load_data(tail=period, assets=['BTC']) def train_model(data): """ train the LSTM network """ asset_name = 'BTC' features_all = get_features(data) target_all = get_target_classes(data) model = get_model() # drop missing values: target_cur = target_all.sel(asset=asset_name).dropna('time', 'any') features_cur = features_all.sel(asset=asset_name).dropna('time', 'any') # align features and targets: target_for_learn_df, feature_for_learn_df = xr.align(target_cur, features_cur, join='inner') criterion = nn.MSELoss() # define loss function optimiser = optim.LBFGS(model.parameters(), lr=0.08) # we use an LBFGS solver as optimiser epochs = 1 # how many epochs for i in range(epochs): def closure(): # reevaluates the model and returns the loss (forward pass) optimiser.zero_grad() # input tensor in_ = torch.zeros(1, len(feature_for_learn_df.values)) in_[0, :] = torch.tensor(np.array(feature_for_learn_df.values)) # output out = model(in_) # target tensor target = torch.zeros(1, len(target_for_learn_df.values)) target[0, :] = torch.tensor(np.array(target_for_learn_df.values)) # evaluate loss loss = criterion(out, target) loss.backward() return loss optimiser.step(closure) # updates weights return model weights = qnbt.backtest_ml( load_data=load_data, train=train_model, predict=predict, train_period=1 * 365, # the data length for training in calendar days retrain_interval=365, # how often we have to retrain models (calendar days) retrain_interval_after_submit=1, # how often retrain models after submission during evaluation (calendar days) predict_each_day=False, # Is it necessary to call prediction for every day during backtesting? # Set it to true if you suspect that get_features is looking forward. competition_type='crypto_daily_long_short', # competition type lookback_period=365, # how many calendar days are needed by the predict function to generate the output start_date='2014-01-01', # backtest start date build_plots=True # do you need the chart? )
    • illustrious.felice

      Not enough bid information when submit
      Support • • illustrious.felice

      5
      0
      Votes
      5
      Posts
      600
      Views

      illustrious.felice

      @support Thanks for your respond. Now I understand the cause and fixed it

    • B

      Submission failed: what's wrong??
      Support • • buyers_are_back

      5
      0
      Votes
      5
      Posts
      770
      Views

      support

      @buyers_are_back We reprocessed the submission, it is formally correct and passes all the filters. Sorry for the issue, evidently on our side.

    • G

      Colab new error 'EntryPoints' object has no attribute 'get'
      Support • • gjhernandezp

      5
      0
      Votes
      5
      Posts
      1278
      Views

      support

      @gjhernandezp Thank you for sharing your solution!

    • M

      Trying to understand trading
      Support • • mobile.mr_mime

      5
      2
      Votes
      5
      Posts
      782
      Views

      M

      @support Thanks for the detailed answer, that seems to be it, here is the final code:

      import xarray as xr import qnt.stats as qns import qnt.output as qnout import qnt.data as qndata # single-stock trading data = qndata.futures.load_data(min_date="2005-01-01", assets=["F_ES"]) # attempting an optimal (unrealistic) long-only strategy # by looking at future prices, and investing only if there will be profit next_price_open = data.sel(field="open").shift(time=-1) next2_price_open = data.sel(field="open").shift(time=-2) weights = xr.where(next_price_open < next2_price_open, 1.0, 0.0) # sell short when optimal: # weights = xr.where(next_price_open > next2_price_open, -1.0, weights) weights = qnout.clean(weights, data) qnout.check(weights, data) qnout.write(weights) stats = qns.calc_stat( data, weights, # ignoring slippage for simplicity slippage_factor=0, roll_slippage_factor=0) stats.loc[:, "equity"].plot.step();
    • O

      No error messages show why the strategies failed
      Support • • omohyoid

      5
      0
      Votes
      5
      Posts
      863
      Views

      support

      @omohyoid Dear omohyoid,

      Yes, that's right. After submitting your strategy shouldn't override environment variables.

      Regards

    • S

      How to install Python Talib
      Support • • spancham

      5
      0
      Votes
      5
      Posts
      2451
      Views

      support

      @sheikh It is fine, please just submit, check the result and let us know if you see any issue. It should work fine.

    • N

      How to filter ticker futures by sharpe
      Support • • newbiequant96

      5
      1
      Votes
      5
      Posts
      1572
      Views

      N

      @vyacheslav_b Thank you so much.

      I have one more question for you to answer. I ran the precheck and the result was nan value the first time, but I set the min_date to 2005 - 01 - 01. I would like to ask, why is there a nan value problem? Is it because the ticker I chose had some companies that weren't listed at that time? My strategy id code is # 16767242. Thank you so much

      Screenshot 2024-04-09 173002.png
      Screenshot 2024-04-09 173012.png

    • Documentation
    • About
    • Career
    • My account
    • Privacy policy
    • Terms and Conditions
    • Cookies policy
    Home
    Copyright © 2014 - 2026 Quantiacs LLC.
    Powered by NodeBB | Contributors