Navigation

    Quantiacs Community

    • Register
    • Login
    • Search
    • Categories
    • News
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. captain.nidoran
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 18
    • Best 5
    • Groups 0
    • Blog

    captain.nidoran

    @captain.nidoran

    6
    Reputation
    17
    Profile views
    18
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    captain.nidoran Follow

    Best posts made by captain.nidoran

    • RE: The Winners of the Q15 Futures and BTC Contests

      Congratulations to all the winners!
      And perseverance for those who haven't been so lucky this time.
      πŸ™‚

      posted in News and Feature Releases
      C
      captain.nidoran
    • RE: Data for Futures

      @news-quantiacs so is this going to be the final full list of futures availables for Q15?
      Or do you have any other change in mind which could affect to the submissions in the next days?
      Thanks in advance πŸ™‚
      Luis.

      posted in News and Feature Releases
      C
      captain.nidoran
    • RE: Different Sharpe ratios in backtest and competition filter

      Hi mates!

      I have a question about the sharpe ratio shown in the global leaderboard...
      If we take the value indicated in the main interface for the out of sample, and then try to replicate it by accessing a specific system and filtering its OOS period, the value obtained differs from the one shown In the main interface of the global leaderboard.

      Why is this discrepancy generated? And which of the two sharpe ratio values ​​is correct?

      Thanks in advance!

      posted in Support
      C
      captain.nidoran
    • Local Development Error "could not convert string to float:'NAS:...'"

      Hello everyone,
      I'm getting familiar with the Q18 contests and I'm encountering some problems when trying to reproduce systems similar to those already presented in previous editions, specifically I can't pass different parameters for each asset as I did in other contests.
      I have tried it in 2 ways, directly through a dictionary:
      fca61b24-6c9e-4037-99cd-d357bf3b7b8b-image.png
      ...and from a json config:
      7b0f8312-85ec-4cc7-b602-ea33291d8b1a-image.png
      recovering values like this:
      e3eb4c6b-c881-4a89-be1c-bb3782f14dd5-image.png
      I can call this method and then check the stats calling qnstats.calc_stat(), everything is perfect until i try to call de backtest method:
      cbcd3a92-a359-4be6-a41b-86d0b79ca4d2-image.png
      When I obtain this error:

      ae7cc1ce-5d88-4e9a-bac3-eecf381689b4-image.png

      ΒΏAny ideas?

      posted in Support
      C
      captain.nidoran
    • RE: Local Development Error "could not convert string to float:'NAS:...'"

      Yes, I did It just before write this post to be sure.I think that you could easy replicate the error adapting a lil bit the "Trading System Optimization by Asset" example template.

      posted in Support
      C
      captain.nidoran

    Latest posts made by captain.nidoran

    • RE: Q22 contest

      Any new about Q22? πŸ˜•

      posted in News and Feature Releases
      C
      captain.nidoran
    • RE: Checking of strategies for Q20 takes two weeks

      I have the same question... but with more than 20 strategies in checking state πŸ˜…

      posted in Strategy help
      C
      captain.nidoran
    • RE: Jupyter/Jupyter Lab are not working for code editing/running

      Hi,

      I am having the same error since some days ago, when I try to clone strategies it remains permantly in state "cloning":

      d96fd03e-92c6-4791-b28e-d757193a1bd7-image.png

      And It shows the same notification you mentioned:
      2279a692-5826-40ba-9291-53fd72c2664e-image.png

      Thanks in advance for any help πŸ™‚

      posted in Support
      C
      captain.nidoran
    • RE: Cant load data locally

      First of all, welcome back bro! with you over here Q20 is going to be even more challenging πŸ˜‰

      I have tried your code locally (in Spyder from Anaconda):
      c3a455f7-1970-4e7c-9c55-fbd38cb012ab-image.png

      and it manages well the code as you can see, but let me point out a couple of things that I find strange πŸ˜•

      1. When you defined the function "load_data" you established a parameter called "period" but after that you are not doing nothing with it inside de definition. So you can supress it obtaining same result:
        4cc8687c-3b9b-4740-b9be-bed67c1cf214-image.png
        or much better, set the parameter as the "tail" of the data:
        e6fd370e-eb3f-41aa-a3e8-6e973d981497-image.png

      2. The second strange thing, is that you are trying to set de parameter "min_date" and "tail" at the same time, and once you set the "min_date" let say that the "tail" doesnt do anything, taking a look inside the function that loads data inside stocks.py you can check it:
        30c661cb-b525-45ca-902d-7695e752e050-image.png
        So let me suggest to drop the min_date (wich is set to None by default), like this:
        c113fad6-f379-44de-adad-e7bd52d72408-image.png
        ...notice that the function now will load exactly what you indicates in the parameter πŸ™‚ (in my example i am loading 10 years of data)

      3. And the last thing is just warn you, that you are loading the "dims" as time/field/asset wich is different from the default order (field/time/asset), this can affect if you for example try to use this data with some of the provided templates by quantiacs, so be careful πŸ˜•

      I hope I've helped πŸ™‚
      Regards.

      posted in Support
      C
      captain.nidoran
    • ImportError - Sklearn

      Hello Everyone!

      I am having problems to import "sklearn" when I submit my systems that results in the following error in the HTML log, and end filtered cause of it:
      ed579eb0-cbe8-42a9-abe4-c929ad87ab46-image.png

      It's important to say that when I debug the code in the jupyter notebook (and in local too) it works perfectly. And also consider that a few days ago I was uploading systems that also uses this library and were processed without any problem.

      I am thinking about any recents changes taken place in the environment or the OS that can affect.
      Any help would be apreciatted @support πŸ™‚

      Regards!

      posted in Support
      C
      captain.nidoran
    • RE: Optimizer not working locally

      Thanks @dark-yellowjacket for post your solution for the optimizer, it works fine for me but could you please go deeper explaining how do you implement the optimized obtained parameter values in the final strategy. I have tried several methods (even in several computers) , obtaining always errors.
      For example using this template provided by Quantiacs (where i call to "Strategy" I use the same previouslly optimized, and the config.json is the output asset by asset obtained after optimization):

      
      import json
      import xarray as xr
      import qnt.backtester as qnbk
      from Strategy import *
      
      def optmized_strategy(data, config):
          results = []
          for c in config:
              results.append(strategy_long(data, **c))
          # align and join results
          results = xr.align(*results, join='outer')
          results = [r.fillna(0) for r in results]
          output = sum(results) / len(results)
          return output
      
      
      config = json.load(open('config.json', 'r'))
      
      # multi-pass
      # It may look slow, but it is ok. The evaluator will run only one iteration per day.
      qnbk.backtest(
          competition_type='stocks_nasdaq100',
          lookback_period=365,
          strategy=lambda d: optmized_strategy(d, config),
       # strategy=strategy_long, # you can check the base strategy too
          start_date='2006-01-01')
      

      It rises the following error:

      Reloaded modules: Estrategia
      fetched chunk 1/5 0s
      fetched chunk 2/5 0s
      fetched chunk 3/5 0s
      fetched chunk 4/5 0s
      fetched chunk 5/5 0s
      Data loaded 1s
      Run last pass...
      Load data...
      fetched chunk 1/1 0s
      Data loaded 0s
      Run strategy...
      Traceback (most recent call last):
      
        File "C:\Users\LuisPC\.conda\envs\qntdev\lib\site-packages\spyder_kernels\py3compat.py", line 356, in compat_exec
          exec(code, globals, locals)
      
        File "c:\users\luispc\desktop\quantiacs\q18\prueba.py", line 39, in <module>
          start_date='2006-01-01')
      
        File "C:\Users\LuisPC\.conda\envs\qntdev\lib\site-packages\qnt\backtester.py", line 291, in backtest
          result = strategy_wrap(data, state)
      
        File "C:\Users\LuisPC\.conda\envs\qntdev\lib\site-packages\qnt\backtester.py", line 270, in <lambda>
          strategy_wrap = (lambda d, s: strategy(d)) if args_count < 2 else strategy
      
        File "c:\users\luispc\desktop\quantiacs\q18\prueba.py", line 37, in <lambda>
          strategy=lambda d: optmized_strategy(d, config),
      
        File "c:\users\luispc\desktop\quantiacs\q18\prueba.py", line 22, in optmized_strategy
          results.append(strategy_long(data, **c))
      
        File "C:\Users\LuisPC\Desktop\quantiacs\Q18\Estrategia.py", line 16, in strategy_long
          data = data.sel(asset=[asset])
      
        File "C:\Users\LuisPC\.conda\envs\qntdev\lib\site-packages\xarray\core\dataarray.py", line 1337, in sel
          **indexers_kwargs,
      
        File "C:\Users\LuisPC\.conda\envs\qntdev\lib\site-packages\xarray\core\dataset.py", line 2505, in sel
          self, indexers=indexers, method=method, tolerance=tolerance
      
        File "C:\Users\LuisPC\.conda\envs\qntdev\lib\site-packages\xarray\core\coordinates.py", line 422, in remap_label_indexers
          obj, v_indexers, method=method, tolerance=tolerance
      
        File "C:\Users\LuisPC\.conda\envs\qntdev\lib\site-packages\xarray\core\indexing.py", line 120, in remap_label_indexers
          idxr, new_idx = index.query(labels, method=method, tolerance=tolerance)
      
        File "C:\Users\LuisPC\.conda\envs\qntdev\lib\site-packages\xarray\core\indexes.py", line 242, in query
          raise KeyError(f"not all values found in index {coord_name!r}")
      
      KeyError: "not all values found in index 'asset'"
      

      I tried to explain this problem about the implementation in the Backtester in another forum thread time ago, without getting a valid answer, therefore I would appreciate any idea you can give me on this matter.
      ...Otherwise I am afraid that I will not present algorithms for this contest (Sadly 😒 )
      Regards.
      Luis G.

      posted in Support
      C
      captain.nidoran
    • RE: Local Development Error "could not convert string to float:'NAS:...'"

      Hi @support ! πŸ™‚
      Any updates about this?
      Thanks in advance

      posted in Support
      C
      captain.nidoran
    • RE: Local Development Error "could not convert string to float:'NAS:...'"

      Thank you very much @support
      Let me know if you upgrade the template please πŸ™‚

      posted in Support
      C
      captain.nidoran
    • RE: Local Development Error "could not convert string to float:'NAS:...'"

      Hello @support ,

      Sorry for the delay in my answer.

      Just to be sure...When you took the example provided in the templates for futures, and modified it for stocks, did you also tried the final code for the strategy with multi-pass backtester? Because is in there where i get error.

      I have tried it, even in jupyter notebook, obtaining error as result... I will keep trying and let you know if anything change.

      posted in Support
      C
      captain.nidoran
    • RE: Local Development Error "could not convert string to float:'NAS:...'"

      Yes, I did It just before write this post to be sure.I think that you could easy replicate the error adapting a lil bit the "Trading System Optimization by Asset" example template.

      posted in Support
      C
      captain.nidoran
    • Documentation
    • About
    • Career
    • My account
    • Privacy policy
    • Terms and Conditions
    • Cookies policy
    Home
    Copyright Β© 2014 - 2021 Quantiacs LLC.
    Powered by NodeBB | Contributors