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

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

      4
      3
      Votes
      4
      Posts
      1810
      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.

    • magenta.grimer

      Help !
      Support • • magenta.grimer

      4
      0
      Votes
      4
      Posts
      810
      Views

      A

      @magenta-grimer There are 2 things you might want to change:

      1: the lookback_period is 365 but you want a 400-day SMA. This will only produce NaNs, so the boolean array sma20 < sma20_crypto will be False everywhere resulting in -1 weights. 2*365 as lookback does the trick for these settings.

      2: Bitcoin is trading 24/7, futures aren't. Better use crypto.time.values instead of futures.time.values for the output of load_data.

      There might be something else that I didn't catch but the resulting sharpe is at least close to what would be expected (1.109 with 5 and 385)

    • N

      SMA Example
      Support • • Nikos84

      4
      0
      Votes
      4
      Posts
      708
      Views

      N

      @support Thank you!

    • nosaai

      AttributeError: module 'qnt.data' has no attribute 'stocks_load_spx_data'
      Support • • nosaai

      4
      0
      Votes
      4
      Posts
      2607
      Views

      nosaai

      @vyacheslav_b Apologies for the late response. Thanks for the assistance, all is now well. Cheers

    • M

      training, predicting and backtesting Neural Network
      Support • • magenta.kabuto

      4
      0
      Votes
      4
      Posts
      676
      Views

      support

      @magenta-kabuto The weights generated are simply the daily allocations to the various assets.

    • O

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

      4
      0
      Votes
      4
      Posts
      1275
      Views

      O

      @support Thx for ur reply

    • M

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

      4
      1
      Votes
      4
      Posts
      2914
      Views

      V

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

    • magenta.grimer

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

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

      Q22 submission, strategies excluded
      Support • • Sun-73

      4
      1
      Votes
      4
      Posts
      1442
      Views

      S

      Hi @support, everything is all right now. Thank you!

    • N

      How to submit stateful long short
      Strategy help • • newbiequant96

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

    • X

      allocations and orders
      General Discussion • • xiaolan

      4
      0
      Votes
      4
      Posts
      874
      Views

      support

      @xiaolan Yes, allocations are translate to orders internally, it is enough to check the variation in the allocations and transform it into number of contracts bought/sold. When we designed the toolbox the goal was to simplify development as much as possible for the users.

    • A

      Submission Logic Questions
      Support • • auxiliary.snail

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

    • E

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

      4
      1
      Votes
      4
      Posts
      1004
      Views

      support

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

    • A

      Futures contests and BTC??
      Support • • anthony_m

      4
      1
      Votes
      4
      Posts
      1466
      Views

      support

      @anthony_m we patched with spot BTC data see answer: https://quantiacs.com/community/topic/6/btc-contest-start-date

    • O

      I was logged out automatically
      Support • • omohyoid

      3
      0
      Votes
      3
      Posts
      732
      Views

      O

      @support I got it
      Thanks for ur reply

    • D

      Errors when I save the isssus parameters of my optimization in the json file
      Strategy help • • dark.pidgeot

      3
      1
      Votes
      3
      Posts
      2727
      Views

      D

      @support Thank you for your advise, it's ok

    • V

      Strategy Checking
      Support • submission • • violet.mewtwo

      3
      0
      Votes
      3
      Posts
      4442
      Views

      support

      @violet-mewtwo Dear violet-mewtwo, your submissions are processed correctly, it just needs some more time because of the big submission queue currently on our side. Thank you for your patience.

    • illustrious.felice

      Please create the program "Quantiacs Tips"
      Strategy help • • illustrious.felice

      3
      0
      Votes
      3
      Posts
      2016
      Views

      illustrious.felice

      @support 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),...

      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,...

      Hopefully, Quantiacs will continue to grow. Sincere thanks to Quantiacs for creating extremely high-quality contests.

    • J

      Local SSH development
      General Discussion • • Joshua408

      3
      0
      Votes
      3
      Posts
      908
      Views

      support

      @joshua408 We allow development on our cloud or local development on user's machines. No need to open any port.

    • illustrious.felice

      How to select and combine strategies to optimize your portfolio
      Strategy help • • illustrious.felice

      3
      0
      Votes
      3
      Posts
      1801
      Views

      illustrious.felice

      @support. 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?

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