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

      Python
      General Discussion • • TitusBullo

      6
      0
      Votes
      6
      Posts
      1185
      Views

      T

      @antinomy Ty

    • M

      Futures data issues
      Support • • Msant14

      6
      1
      Votes
      6
      Posts
      768
      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

      Stocks data
      Support • • Sun-73

      6
      0
      Votes
      6
      Posts
      2006
      Views

      S

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

    • A

      toolbox not working in colab
      Support • • alexeigor

      6
      0
      Votes
      6
      Posts
      2838
      Views

      V

      @alexeigor Hello. Version 0.0.501 of the qnt library works correctly in Colab. Python version support has been extended from 3.10 to 3.13. The basic functionality of the library should work without issues.

      To install, use the following command:

      !pip install git+https://github.com/quantiacs/toolbox.git 2>/dev/null

      Note: Installing ta-lib in Colab is not working for me at the moment.

    • M

      Kernel Dies
      Support • • magenta.kabuto

      6
      0
      Votes
      6
      Posts
      883
      Views

      M

      @vyacheslav_b perfect. It wasnt obvious to me that single pass was meant by that. Thank you

    • M

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

      6
      0
      Votes
      6
      Posts
      2957
      Views

      S

      @support, thank you for the clarifications. Regards.

    • S

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

      6
      0
      Votes
      6
      Posts
      776
      Views

      support

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

    • S

      Systems selection for the Q16 contest
      News and Feature Releases • • Sun-73

      6
      2
      Votes
      6
      Posts
      2614
      Views

      support

      @sun-73 Yes, we will, sorry for the issue.

    • news-quantiacs

      The Q17 Contest is running!
      News and Feature Releases • • news-quantiacs

      6
      1
      Votes
      6
      Posts
      4511
      Views

      support

      @magenta-grimer Hello, you can have at most 50 running submissions in your user area. You can stop any of them any moment and replace it with another one.

      Before the end of the Q17 submission phase, you should select at most 15 of them. These will take part to the live contest.

    • illustrious.felice

      Sharpe decreases when submitting strategy
      Support • • illustrious.felice

      6
      0
      Votes
      6
      Posts
      759
      Views

      illustrious.felice

      @vyacheslav_b Thank you so much

    • magenta.grimer

      Optimize the Trend Following strategy with custom args
      Strategy help • • magenta.grimer

      6
      0
      Votes
      6
      Posts
      1294
      Views

      support

      Hello.

      I checked this problem. The script which cut "###DEBUG###" cells was incorrect. I fixed this and resent your strategies (filtered by time out) to checking.

      Regards.

    • X

      Combining classifiers
      Strategy help • • xiaolan

      6
      0
      Votes
      6
      Posts
      1035
      Views

      support

      @xiaolan That is correct, but the logic can be easily re-used. The only novel element will be the introduction of the liquidity filter at intermediate stages/at the final stage for the selection of the weights.

    • nosaai

      Install Toolbox on Python 3.9
      Support • • nosaai

      6
      0
      Votes
      6
      Posts
      1067
      Views

      support

      @magenta-kabuto We support only Python 3.7 right now. But it can coexist with Python 3.9:

      https://quantiacs.com/documentation/en/user_guide/local_development.html

      Basically you can use Python 3.7 inside a conda environment.

    • illustrious.felice

      Strategy trades illiquid instruments
      Support • • illustrious.felice

      5
      0
      Votes
      5
      Posts
      3169
      Views

      V

      @illustrious-felice Hello. The reason you're still seeing a large number of tickers (e.g., around 300) even after applying the filter is that the "best" instrument by Sharpe ratio changes over time. The rank_assets_by function returns a time-dependent mask, selecting the top N assets at each time step. So the total number of unique assets that were selected at any point in time may be much larger than top_assets.

      This is expected behavior.

      To illustrate this more clearly, let's consider a minimal working example that selects only 1 top asset at each point in time and shows all the intermediate steps:

      import qnt.data as qndata import qnt.ta as qnta import qnt.stats as qnstats import qnt.output as qnout import qnt.filter as qnfilter import xarray as xr import pandas as pd top_assets = 1 data = qndata.stocks.load_spx_data(min_date="2005-06-01") weights = data.sel(field="is_liquid") stats_per_asset = qnstats.calc_stat(data, weights, per_asset=True) sharpe_ratio = stats_per_asset.sel(field="sharpe_ratio") asset_filter = qnfilter.rank_assets_by(data, sharpe_ratio, top_assets, ascending=False) weights = weights * asset_filter stats = qnstats.calc_stat(data, weights.sel(time=slice("2005-06-01", None))) display(asset_filter.to_pandas().tail()) display(stats.to_pandas().tail()) display(sharpe_ratio.to_pandas().tail()) display(weights.to_pandas().tail())

      If you want to see which asset was the best on specific dates, you can do something like this:

      dates = ["2015-01-15", "2020-01-15", "2025-01-15"] records = [] for date_str in dates: best_mask = asset_filter.sel(time=date_str) assets = best_mask.where(best_mask > 0, drop=True).asset.values srs = sharpe_ratio.sel(time=date_str, asset=assets).values for a, s in zip(assets, srs): records.append({"time": date_str, "asset": a.item(), "sharpe_ratio": float(s)}) df = pd.DataFrame(records).set_index("time") display(df) asset sharpe_ratio time 2025-05-22 NYS:HRL 1.084683 2025-05-22 NAS:KDP 1.093528 2025-05-22 NAS:AAPL 0.968039

      Or simply for a single date:

      date = "2020-05-22" best_mask = asset_filter.sel(time=date) best_assets = best_mask.where(best_mask > 0, drop=True).asset best_sr = sharpe_ratio.sel(time=date, asset=best_assets) print(best_sr.to_pandas())

      This shows clearly that only one asset is selected at each time step, but over the full time range, many different assets can appear in the top list depending on how their Sharpe ratios change.

    • X

      Pandas and xarray
      Strategy help • • xiaolan

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

    • G

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

      5
      0
      Votes
      5
      Posts
      1258
      Views

      support

      @gjhernandezp Thank you for sharing your solution!

    • N

      KeyError: "cannot represent labeled-based slice indexer for coordinate 'time' with a slice over integer positions; the index is unsorted or non-unique"
      Support • • newbiequant96

      5
      0
      Votes
      5
      Posts
      1069
      Views

      M

      @newbiequant96 no problem.
      I think the issue now is unrelated to the the previous issue. If you can show what is written above return code 1, I can maybe help.
      It seems to be an issue in the code.
      Regards

    • magenta.grimer

      Some clarifications
      General Discussion • • magenta.grimer

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

    • M

      Missed call to write_output although had included it
      Support • • multi_byte.wildebeest

      5
      0
      Votes
      5
      Posts
      798
      Views

      V

      @illustrious-felice Hello. please look at this post
      https://quantiacs.com/community/topic/515/what-is-forward-looking-and-why-it-s-effective-badly-to-strategy/6?_=1711712434795

    • C

      Setup an environment at Google Colab
      Support • • cortezkwan

      5
      2
      Votes
      5
      Posts
      922
      Views

      C

      @support Great help! Thank you so much!

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