Congratulations to all the winners!
And perseverance for those who haven't been so lucky this time.
Best posts made by captain.nidoran
-
RE: The Winners of the Q15 Futures and BTC Contests
-
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. -
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!
-
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:
...and from a json config:
recovering values like this:
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:
When I obtain this error:ΒΏAny ideas?
-
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.
Latest posts made by 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
-
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":
And It shows the same notification you mentioned:
Thanks in advance for any help
-
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):
and it manages well the code as you can see, but let me point out a couple of things that I find strange
-
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:
or much better, set the parameter as the "tail" of the data:
-
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:
So let me suggest to drop the min_date (wich is set to None by default), like this:
...notice that the function now will load exactly what you indicates in the parameter (in my example i am loading 10 years of data) -
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. -
-
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:
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 @supportRegards!
-
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. -
RE: Local Development Error "could not convert string to float:'NAS:...'"
Hi @support !
Any updates about this?
Thanks in advance -
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 -
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.
-
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.