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

      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)
      Strategy help • • illustrious.felice

      4
      0
      Votes
      4
      Posts
      2219
      Views

      illustrious.felice

      @support Thank you so much. I have resolved this error

    • A

      Expected Time to Run Strategy
      Support • • anshul96go

      4
      0
      Votes
      4
      Posts
      1735
      Views

      A

      @support Got it, thanks a lot!

    • R

      referral program
      General Discussion • • rezhak21

      4
      0
      Votes
      4
      Posts
      781
      Views

      R

      @support I see, need to push them to submit then....

    • N

      How to submit stateful long short
      Strategy help • • newbiequant96

      4
      0
      Votes
      4
      Posts
      3484
      Views

      support

      @newbiequant96 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.

    • A

      Submission Logic Questions
      Support • • auxiliary.snail

      4
      0
      Votes
      4
      Posts
      1374
      Views

      support

      @auxiliary-snail Hi,

      unfortunately, this is not allowed and in accordance with the rules. Using hard-coded time periods in which trading algorithm will work differently, is not a quantitative method (just like manual asset selection, e.g. "trade only Apple or Microsoft"). We still haven't implemented a mechanism for automatic recognition of such behaviors in trading strategies, and even though a strategy could be successfully submitted, it will not be eligible for prize winning.
      What we are searching for, is well performing strategy over entire in_sample period (SR>0.7), robust to all market movements 2006-2025, so we can expect it will perform well in future, too.

    • R

      Processing Time
      General Discussion • • rezhak21

      4
      0
      Votes
      4
      Posts
      1414
      Views

      R

      @support ok, thank you!

    • S

      Stocks strategy
      Strategy help • • spancham

      4
      0
      Votes
      4
      Posts
      1006
      Views

      support

      @sheikh Hi, when it comes to stocks and historical simulations, the biggest issue is dealing with survivorship bias. The stock universe must include also stocks which have been delisted and we need to define trading rules which allow for trading instruments which make sense at each point in time. This week we are announing a new contest which is preparing the ground for stocks.

    • M

      Why we need to limit the time to process the strategy ?
      Support • • multi_byte.wildebeest

      4
      0
      Votes
      4
      Posts
      709
      Views

      support

      @multi_byte-wildebeest Hi, these limitations refer to the processing time per point in time, not for the full strategy.

      If it takes 10 minutes per historical day, and the simulation has to take into account 250 days for let us say 10 years, the multi-pass simulation would process 6 days per hour, 144 days per real day, that means 2 weeks of processing time for the full submission, it is a lot of time.

    • O

      Can I use astronomical data as features for my machine learning model?
      Support • • omohyoid

      4
      0
      Votes
      4
      Posts
      1101
      Views

      O

      @support Thx for ur reply

    • news-quantiacs

      New futures data and next-to-front contracts
      News and Feature Releases • • news-quantiacs

      4
      1
      Votes
      4
      Posts
      1284
      Views

      support

      @magenta-grimer Hello, we updated the documentation.

      Now there are 78 futures contracts. Yes, we allow allocating to only 1 asset. If you trade more assets, then you can go long on some of them and short others.

      Using more assets helps in increasing the Sharpe ratio, as the mean return grows linearly with the number of assets, and the volatility in the denominator with the square root of the number of assets if there are no correlation terms.

      Using uncorrelated assets would then lead to a scaling of the Sharpe ratio with the square root of the number of assets. In practice, however, correlation terms are decreasing this growth.

      Stated more simply, it is a good idea to avoid putting all your eggs in the same basket...

    • magenta.grimer

      Optimizer for simple MA crypto strategy
      Strategy help • • magenta.grimer

      4
      0
      Votes
      4
      Posts
      1018
      Views

      A

      There is a way to use the optimizer with a (stateful) mulit pass algo, but depending on the total number of changed parameters it can take a very long time. However, if it runs on a local computer with many workers this can still be useful.

      We could run the backtester with the multi pass algo to get all the weights for the test period and pass these weights to the optimizer.
      There's just one problem with this: you can't pass changed parameters to the strategy using the backtester.
      In order to solve this I created a nested function where the outer function takes the changed parameters from the optimizer. The inner function is the actual multi pass strategy and doesn't define the params but just uses the ones from the outer function. Still within the outer function we run the backtester with one set of params, get the weights it returns and return them to the optimizer.

      The time it takes to run the optimization would roughly be
      (time for 1 multi pass backtest) x (total number of parameter changes) / (number of workers that are able to run)
      So if one multi pass takes 1 minute, you want to optimize 10 parameter changes and can run 5 workers it would take about 2 minutes.

      Here's an example based on the one above with 2 parameter changes and 2 workers:

      import qnt.data as qndata import qnt.ta as qnta import qnt.optimizer as qnop import qnt.backtester as qnbt import xarray as xr def load_data(period): """Loads the BTC Futures data for the BTC Futures contest""" return qndata.cryptofutures.load_data(tail=period, dims=("time", "field", "asset")) def multi_pass_strategy(data, ma_slow_param=50, ma_fast_param=10): """The outer function gets called by the optimizer with changed params, the inner function gets passed to the backtester.""" def strategy(data, state): # The state isn't used in this example, this is just to show that it can be used while optimizing. if state is None: state = 0 state += 1 close = data.sel(field="close") ma_slow = qnta.lwma(close, ma_slow_param).isel(time=-1) ma_fast = qnta.lwma(close, ma_fast_param).isel(time=-1) weights = xr.zeros_like(close.isel(time=-1)) weights[:] = 1 if ma_fast > ma_slow else -1 return weights, state """The backtester returns all weights for the test period which will then be returned to the optimizer""" weights, state = qnbt.backtest( strategy=strategy, competition_type="cryptofutures", load_data=load_data, lookback_period=700, start_date='2014-01-01', build_plots=False, ) return weights data = qndata.cryptofutures.load_data(min_date='2014-01-01') result = qnop.optimize_strategy( data, multi_pass_strategy, qnop.full_range_args_generator( ma_slow_param=range(50, 60, 5), # min, max, step # ma_fast_param=range(5, 100, 5) # min, max, step ), workers=2 # you can set more workers on your PC ) print("---") print("Best iteration:") print(result['best_iteration']) qnop.build_plot(result)

      There might be more efficient ways to do this, so if anyone has one feel free to post it here.

    • nosaai

      Local Development with Notifications
      Support • • nosaai

      4
      0
      Votes
      4
      Posts
      929
      Views

      A

      It's safe to ignore these notices but if they bother you, you can set the variables together with your API key using the defaults and the messages go away:

      import os os.environ['API_KEY'] = 'YOUR-API-KEY' os.environ['DATA_BASE_URL'] = 'https://data-api.quantiacs.io/' os.environ['CACHE_RETENTION'] = '7' os.environ['CACHE_DIR'] = 'data-cache'
    • E

      Q17 Contest: When will you update the performance of the strategies?
      Support • • EDDIEE

      4
      1
      Votes
      4
      Posts
      857
      Views

      support

      @theflyingdutchman Hello, before the end of the week the update will be ready, sorry for the delay

    • M

      Printing training performance of neural network models
      Support • • multi_byte.wildebeest

      4
      1
      Votes
      4
      Posts
      2762
      Views

      V

      @multi_byte-wildebeest Hello. I don't use machine learning models in trading.

    • E

      Improving Quantiacs: Aligning Developer Objectives with the ones of Quantiacs
      General Discussion • developers improvement quantiacs rankings risk • • EDDIEE

      4
      3
      Votes
      4
      Posts
      1651
      Views

      N

      @eddiee Hi, Mr. Eddie.

      I am new to building strategies using ML/DL on Quantiacs and am very impressed with the OS performance of your ML strategies. I hope you can give me your contact (mail, limkedin,...) so I can learn from your experience in building an ML/DL strategy.

      Sincerely thank.

    • A

      Jupyter/Jupyter Lab are not working for code editing/running
      Support • • AlgoQuant

      4
      0
      Votes
      4
      Posts
      1246
      Views

      support

      @captain-nidoran Fixed, sorry for issue

    • S

      Cryptocurrency algos issues
      Support • • Sheikh

      4
      1
      Votes
      4
      Posts
      1190
      Views

      S

      @support
      Thanks.
      You guys are the best!🏆

    • P

      Xarray Value Error
      Strategy help • • pink.seel

      4
      0
      Votes
      4
      Posts
      853
      Views

      support

      @pink-seel Super that you found it, please do not hesitate to ask for support!

    • V

      Example strategy for Q19
      Support • • vg2001

      4
      0
      Votes
      4
      Posts
      725
      Views

      support

      @vg2001 Hello, the Q19 is a replica of the Q18, you ccan use the same examples.

    • nosaai

      Local Development Problems
      General Discussion • • nosaai

      4
      1
      Votes
      4
      Posts
      1387
      Views

      V

      @nosaai Hello

      Spyder should be run under conda environment

      conda activate qntdev conda install spyder spyder

      an alternative way is to clone the library from https://github.com/quantiacs/toolbox
      and develop strategies inside qnt. But I recommend using the approach from the documentation.

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