Navigation

    Quantiacs Community

    • Register
    • Login
    • Search
    • Categories
    • News
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Recent
    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
    • 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
      344
      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

    • L

      Calculation time exceeded
      Support • • lookman

      2
      0
      Votes
      2
      Posts
      206
      Views

      support

      Dear @lookman,

      Thank you for pointing at a problem with fundamental strategies. We are working on implementing a fix as soon as possible.

      Regards

    • B

      Fundamental data incomplete?
      Support • • buyers_are_back

      11
      0
      Votes
      11
      Posts
      932
      Views

      support

      @buyers_are_back Hi,
      the update was related to market_capitalization field availability and correctness, as vyacheslav_b described. Unfortunately, at the moment we cannot provide missing fundamental data, like number of ordinary shares, for some stocks (e.g. META). We are going to investigate potential new data sources in order to improve our datasets.
      Regards,

    • nosaai

      Collections has no attribute Iterable
      Support • • nosaai

      3
      0
      Votes
      3
      Posts
      824
      Views

      nosaai

      @stefanm said in Collections has no attribute Iterable:

      pip install progressbar2==3.55.0

      Thank you so much @stefanm for support. Yes, it did work. Although on installation I did get these complaints:
      qnt 0.0.306 requires tabulate>=0.9.0, but you have tabulate 0.8.10 which is incompatible.
      qnt 0.0.306 requires xarray==0.20.2, but you have xarray 0.20.1 which is incompatible.

      Also, my apologies for the late response. I had to put things aside for a day or so. Once again, thank you.

    • M

      Please provide more examples
      Support • • machesterdragon

      2
      2
      Votes
      2
      Posts
      200
      Views

      V

      @machesterdragon Hello. Yes, it can never have too many examples 🙂

      Inside the documentation sections, there are examples of strategies and technical indicators.
      It's better to keep track of new strategy examples or updates on GitHub: https://github.com/quantiacs

    • M

      Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('int64') with casting rule 'same_kind'
      Support • • machesterdragon

      2
      1
      Votes
      2
      Posts
      421
      Views

      V

      @machesterdragon said in Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('int64') with casting rule 'same_kind':

      weights *= asset_filter

      Hello. Change

      weights *= asset_filter

      to

      weights = weights * asset_filter

      You can see usage examples here:
      https://quantiacs.com/documentation/en/user_guide/dynamic_assets_selection.html

      Everything is working correctly now, try cloning the strategy.

    • V

      Getting logged out of account
      Support • • vg2001

      3
      0
      Votes
      3
      Posts
      384
      Views

      support

      @vg2001 Dear vg2001,
      There were some problems with the servers, thank you for your patience.
      Regards

    • M

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

      5
      0
      Votes
      5
      Posts
      421
      Views

      M

      @support Thank you !

    • C

      WARNING! Strategy trades non-liquid assets.
      Support • • CommanderAngle

      2
      0
      Votes
      2
      Posts
      156
      Views

      support

      @commanderangle Hi, the reason is that the algorithm is generating non-negative weights for assets which are not liquid at some point in time, in other words they are not part of the Nasdaq index at that time.

    • M

      Submitting Deep Learning model-Filtered by Calculation time exceeded
      Support • • multi_byte.wildebeest

      2
      1
      Votes
      2
      Posts
      235
      Views

      support

      @multi_byte-wildebeest is it taking 2-3 minutes for each point in time?

    • D

      Optimization speed in python
      Strategy help • • dark.pidgeot

      2
      0
      Votes
      2
      Posts
      795
      Views

      support

      @dark-pidgeot Hi, the question is a bit too generic, what do you need exactly to speed up?

    • N

      How to filter ticker futures by sharpe
      Support • • newbiequant96

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

    • V

      Clarification on Sharpe Ratio definition
      Support • • vg2001

      2
      0
      Votes
      2
      Posts
      440
      Views

      support

      @vg2001 of course you are right, thanks for pointing out the typo in the formula!

    • M

      Missed Call to write output
      Strategy help • • magenta.kabuto

      16
      1
      Votes
      16
      Posts
      1192
      Views

      M

      I finally resolved the issue, after lots of struggle. The custom layers, custom loss function and the function had to be serialized and deserialized correctly in order to save the architecture and weights as Json, rather than in a dictionary, like is suggested for pytorch in the Neural netowork template.
      It seems Pytorch is way more user friendly when it comes to saving and loading models.

    • N

      Is it possible to combine stocks with crypto?
      Support • • newbiequant96

      3
      1
      Votes
      3
      Posts
      400
      Views

      N

      @vyacheslav_b Thank you very much for your support.

      I would like to ask, if I want to filter out the crypto codes with the highest sharpness, what should I do? Thank you. I tried using the get_best_instruments function but it didn't work

      import qnt.stats as qnstats # data = qndata.stocks.load_ndx_data(tail = 17*365, dims = ("time", "field", "asset")) data = qndata.stocks.load_ndx_data(min_date="2005-01-01") def get_best_instruments(data, weights, top_size): # compute statistics: stats_per_asset = qnstats.calc_stat(data, weights, per_asset=True) # calculate ranks of assets by "sharpe_ratio": ranks = (-stats_per_asset.sel(field="sharpe_ratio")).rank("asset") # select top assets by rank "top_period" days ago: top_period = 1 rank = ranks.isel(time=-top_period) top = rank.where(rank <= top_size).dropna("asset").asset # select top stats: top_stats = stats_per_asset.sel(asset=top.values) # print results: print("SR tail of the top assets:") display(top_stats.sel(field="sharpe_ratio").to_pandas().tail()) print("avg SR = ", top_stats[-top_period:].sel(field="sharpe_ratio").mean("asset")[-1].item()) display(top_stats) return top_stats.coords["asset"].values get_best_instruments(data, weights, 10)

      19ae499c-71f3-4702-bba3-81d20fb6c5ac-image.png

    • M

      How can we have the estimation of Sharpe submitted ?
      Support • • multi_byte.wildebeest

      3
      2
      Votes
      3
      Posts
      690
      Views

      V

      @multi_byte-wildebeest Hello.

      How to get the Sharpe Ratio is in the Quick Start template.
      https://github.com/quantiacs/strategy-q20-nasdaq100-quick-start/blob/master/strategy.ipynb

      import qnt.stats as qnstats def get_sharpe(market_data, weights): rr = qnstats.calc_relative_return(market_data, weights) sharpe = qnstats.calc_sharpe_ratio_annualized(rr).values[-1] return sharpe sharpe = get_sharpe(data, weights) # weights.sel(time=slice("2006-01-01",None))

      or

      import qnt.output as qnout qnout.check(weights, data, "stocks_nasdaq100")

      or

      stat = qnstats.calc_stat(data, weights) display(stat.to_pandas().tail())

      or

      import qnt.graph as qngraph statistics = qnstats.calc_stat(data, weights) display(statistics.to_pandas().tail()) performance = statistics.to_pandas()["equity"] qngraph.make_plot_filled(performance.index, performance, name="PnL (Equity)", type="log") display(statistics[-1:].sel(field=["sharpe_ratio"]).transpose().to_pandas()) qnstats.print_correlation(weights, data)

      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

    • M

      Kernel Dies
      Support • • magenta.kabuto

      6
      0
      Votes
      6
      Posts
      305
      Views

      M

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

    • M

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

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

      Fot Q21 NASDAQ-100 which are the 100 stocks used out of the 249 that returns "qndata.stocks.load_ndx_data(tail = 365 * 5)" ?
      Support • • captain.dog

      2
      0
      Votes
      2
      Posts
      326
      Views

      S

      @captain-dog Hi,

      This is the total number of different companies that have been constituents of Nasdaq-100 index at some point, from 2006-01-01 and so on. At any point, there are 100 companies in index (sometimes more, up to 108) and those are considered as liquid ("is_liquid"=1.0), as long as they are part of the index.

    • M

      Non Deep learning strategy filtered by Calculation time exceed
      Support • • multi_byte.wildebeest

      2
      0
      Votes
      2
      Posts
      146
      Views

      support

      @multi_byte-wildebeest Dear multi_byte-wildebeest,
      You can check logs for your submission in the Filtered panel, so you can get more information why it might have failed. Please note that installing libraries takes time and should be placed in init.ipynb file and not in strategy.ipynb. Also check for potential bugs, errors and tricky loops.

      Regards

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