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

      I can't find why the submission failed
      Support • • omohyoid

      3
      0
      Votes
      3
      Posts
      189
      Views

      O

      @support
      Actually, I've write the weights to the output function.
      螢幕擷取畫面 2024-04-24 235034.png
      I think the reason might be that the data was out-of-date when the strategy received at the weekend. After the data update in the next day, it failed to pass the test.

    • magenta.grimer

      Can't apply optimizer to another simple strategy!
      Strategy help • • magenta.grimer

      3
      0
      Votes
      3
      Posts
      181
      Views

      support

      @magenta-grimer

      Hello.

      Remove .isel(time=-1).

      ma_slow = close.rolling(time=parameter1).mean() #.isel(time=-1) ma_fast = close.rolling(time=parameter2).mean()#.isel(time=-1)

      It selects the last day, you need an entire series.

      Regards.

    • L

      Windows or Linux?
      Strategy help • • laudis

      3
      0
      Votes
      3
      Posts
      242
      Views

      L

      Thanks !

    • L

      Error message when enter JupyterLab
      Support • • lemonpie

      3
      0
      Votes
      3
      Posts
      127
      Views

      L

      @support Thanks. Works fine now.

    • S

      Error for importing quantiacs module
      Support • • steel.camel

      3
      0
      Votes
      3
      Posts
      359
      Views

      support

      @steel-camel Sorry for the issue, it has been fixed.

    • V

      Getting logged out of account
      Support • • vg2001

      3
      0
      Votes
      3
      Posts
      145
      Views

      support

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

    • M

      Error in Online Enviroment
      Support • • magenta.kabuto

      3
      0
      Votes
      3
      Posts
      185
      Views

      support

      Dear magenta.kabuto,

      It appears to be a pandas version mismatch. You can try using different pandas version but it's not documented nor supported and our library could behave in an unexpected manner.

    • M

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

      3
      2
      Votes
      3
      Posts
      185
      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

    • A

      Saving and recalling a dictionary of trained models
      Support • • alfredaita

      3
      0
      Votes
      3
      Posts
      218
      Views

      A

      @alfredaita
      In case you don't want to run init.py every time in order to install external libraries, I came up with a solution for this. You basically install the library in a folder in your home directory and let the strategy create symlinks to the module path at runtime. More details in this post.

    • N

      Use of Technical indicators
      Support • • noka'sworld

      3
      0
      Votes
      3
      Posts
      151
      Views

      N

      @support that is really useful! thank you very much!

    • A

      Erroneous Data?
      Support • • antinomy

      3
      1
      Votes
      3
      Posts
      270
      Views

      support

      @antinomy Hello, sorry for delay again. We found a problem with the data provider, sorry.

    • A

      notebook for googlecolab not working
      Support • • alfredaita

      3
      1
      Votes
      3
      Posts
      186
      Views

      A

      @support Thanks seems fine

    • cespadilla

      Leaderboard not updating again
      Support • • cespadilla

      3
      1
      Votes
      3
      Posts
      206
      Views

      support

      @cespadilla It is fine now. We announced the Q15 winners and changed some details, sorry for the problems.

    • A

      Issues with the Legacy Website
      Support • • antinomy

      3
      1
      Votes
      3
      Posts
      285
      Views

      A

      @jeppe_and Ok, thanks for the quick reply!

    • cespadilla

      Q17 ML Example not running on Local Development
      Support • • cespadilla

      3
      1
      Votes
      3
      Posts
      221
      Views

      cespadilla

      @support thanks, I deleted the old environment, installed it again according to the documentation, and now it is working 👌

    • A

      Clarification regarding execution time
      Support • • anshul96go

      3
      0
      Votes
      3
      Posts
      219
      Views

      support

      @anshul96go Dear Anshul, it means that the weights for each day have to be generated in less than 10 minutes of time per day.

      Note that all submissions are processed on the server after submission using a muti-pass approach (not single-pass).

      10 minutes per day, times 250 days, times 10 years, that is more than 400 hours of running time.

    • A

      BTC and Crypto contest
      Support • • anthony_m

      3
      0
      Votes
      3
      Posts
      240
      Views

      A

      @support Ok, I see, thanks

    • A

      Output the results in an excel or other format file
      Support • • anshul96go

      3
      1
      Votes
      3
      Posts
      298
      Views

      A

      @anshul96go
      To get the actual statistics you currently have to calculate them like so:

      import qnt.stats as qns data = qndata.cryptodaily_load_data(min_date="2014-01-01") # or whenever your backtest started stats = qns.calc_stat(data, weights)

      And if you really need them as xls file you can do:

      stats.to_pandas().to_excel('stats.xls') # I got a ModuleNotFoundError the first time - pip install did the trick.

      Allthough I can't recommend xls because at least LibreOffice becomes very slow / unresponsive when handling such a file.

      Getting the statistics after a backtest could be a little simpler, which brings me to a feature request:
      @support
      Do you think you could add a parameter to the backtester which makes it return the statistics? They get calculated anyway by default, but we only see a truncated printout or the plots and can't use them for further analysis.
      .
      In my local environment I did it like this in qnt.backtester.py:

      Add the parameter return_stats: bool = False to the parameters of the backtest function From line 353 onward my backtester now looks like this: qnout.write(result) qnstate.write(state) if return_stats: analyze = True out = [result] if analyze: log_info("---") stats = analyze_results(result, data, competition_type, build_plots, start_date) if return_stats: out.append(stats) if args_count > 1: out.append(state) if len(out) == 1: out = out[0] return out finally: qndc.set_max_datetime(None) And of course I made analyze_results return the statistics like so (line 458 in the original): if not build_plots: log_info(stat_global.to_pandas().tail()) return stat_global # here log_info("---") log_info("Calc stats per asset...") stat_per_asset = qnstat.calc_stat(data, output, per_asset=True) stat_per_asset = stat_per_asset.loc[output.time.values[0]:] if is_notebook(): build_plots_jupyter(output, stat_global, stat_per_asset) else: build_plots_dash(output, stat_global, stat_per_asset) return stat_global # and there

      This might not be the most elegant solution but you get the idea.
      Now I can get the statistics immediately after the backtest with

      weights, stats = backtest(...return_stats=True)

      and can do further analysis.
      For instance, I started to calculate the correlations between my strategies to avoid uploading more of the same to the contest.

      It would be nice to have this feature in a future version, so I don't have to mess with the backtester after each update 😉

      Best regards

    • nosaai

      Collections has no attribute Iterable
      Support • • nosaai

      3
      0
      Votes
      3
      Posts
      406
      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.

    • A

      Correlation Check always fails
      Support • • antinomy

      3
      1
      Votes
      3
      Posts
      290
      Views

      support

      @antinomy Hello, sorry for the delay in the answer, the problem has been fixed in the meanwhile. If correlations are too high, you will get a warning. Note that correlations will be checked against template code and submissions to past contests of the same kind (which are not present currently as this is the 1st crypto long-only contest we run).

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