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
    • A

      toolbox not working in colab
      Support • • alexeigor

      5
      0
      Votes
      5
      Posts
      163
      Views

      support

      Hi,
      thanks for pointing this out, we are working on refactoring the code, qnt is reverted to previous version. Sorry for late answer.

    • C

      Multi-pass Backtesting
      Strategy help • • cyan.gloom

      5
      0
      Votes
      5
      Posts
      414
      Views

      V

      @eddiee

      Hello.

      This code looks to the future.
      It is needed to train the model.
      Pay attention to the name of the variable.

    • J

      Alpha Default Value of EMA function
      Strategy help • • juzambranol

      5
      0
      Votes
      5
      Posts
      369
      Views

      support

      @gjhernandezp yes, correct, 2/(n+1), sorry for the typo, thanks for correcting

    • B

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

      5
      0
      Votes
      5
      Posts
      326
      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.

    • X

      Pandas and xarray
      Strategy help • • xiaolan

      5
      1
      Votes
      5
      Posts
      365
      Views

      support

      @xiaolan Ok, but please note that you can work all the time with xarray, the documentation is very good:

      http://xarray.pydata.org/en/stable/

    • C

      What's is the next contest ?
      News and Feature Releases • • cyan.gloom

      5
      0
      Votes
      5
      Posts
      678
      Views

      support

      @yonasbo Hi, sorry for delay, we will start soon a new contest, in the next 2 weeks

    • L

      Fundamental data loading does not work
      Support • • lookman

      5
      0
      Votes
      5
      Posts
      353
      Views

      V

      @lookman Hello. Try cloning your strategy and running it again. It should work correctly with the new version of the qnt library.

      import qnt.data as qndata import qnt.data.secgov_fundamental as fundamental market_data = qndata.stocks.load_spx_data(min_date="2005-01-01") indicators_data = fundamental.load_indicators_for(market_data, indicator_names=['roe']) display(indicators_data.sel(field="roe").to_pandas().tail(2)) display(indicators_data.sel(asset='NAS:AAPL').to_pandas().tail(2)) display(indicators_data.sel(asset=['NAS:AAPL']).sel(field="roe").to_pandas().tail(2))

      https://quantiacs.com/documentation/en/data/fundamental.html

    • news-quantiacs

      The Winners of the Q15 Futures and BTC Contests
      News and Feature Releases • • news-quantiacs

      5
      1
      Votes
      5
      Posts
      585
      Views

      support

      @algotime Hello, on 1st November allocations will start, you will receive a mail soon today!

    • magenta.grimer

      Some clarifications
      General Discussion • • magenta.grimer

      5
      0
      Votes
      5
      Posts
      370
      Views

      support

      @magenta-grimer Hi, we cannot provide the list of strategies we are still trading and the payouts. However, all the statistics are public, the new ones (since Q15) and the old ones at:
      https://legacy.quantiacs.com/Systems.aspx

    • O

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

      5
      0
      Votes
      5
      Posts
      422
      Views

      support

      @omohyoid Dear omohyoid,

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

      Regards

    • N

      How to filter ticker futures by sharpe
      Support • • newbiequant96

      5
      1
      Votes
      5
      Posts
      221
      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

    • M

      Differences between Sharpe in Precheck and Sharpe in strategy.ipynb
      Support • • multi_byte.wildebeest

      5
      0
      Votes
      5
      Posts
      254
      Views

      M

      @support Thank you !

    • E

      Q17 Contest
      General Discussion • • EDDIEE

      5
      0
      Votes
      5
      Posts
      397
      Views

      support

      @theflyingdutchman Yes, we are integrating new data sources for a new asset class, once we are done (next week) the data and leaderboard updates will start again.

    • S

      Stocks strategy
      Strategy help • • spancham

      4
      0
      Votes
      4
      Posts
      389
      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.

    • magenta.grimer

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

      4
      0
      Votes
      4
      Posts
      273
      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.

    • S

      Pairs trading with states iterations
      Strategy help • • spancham

      4
      0
      Votes
      4
      Posts
      332
      Views

      S

      @support
      Cool, thanks very much! 👍

    • nosaai

      Local Development Problems
      General Discussion • • nosaai

      4
      1
      Votes
      4
      Posts
      344
      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.

    • V

      Example strategy for Q19
      Support • • vg2001

      4
      0
      Votes
      4
      Posts
      254
      Views

      support

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

    • nosaai

      Local Development with Notifications
      Support • • nosaai

      4
      0
      Votes
      4
      Posts
      290
      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'
    • M

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

      4
      1
      Votes
      4
      Posts
      341
      Views

      V

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

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