Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyperopt for AverageStrategy.py #58

Merged
merged 2 commits into from Apr 16, 2020
Merged

hyperopt for AverageStrategy.py #58

merged 2 commits into from Apr 16, 2020

Conversation

xmatthias
Copy link
Member

Summary

since #53 is not mergable (completely messed up history - not sure how this can happen) i've extracted the hyperopt file and commited it again.

I've tried to set the author correctly - hope that's in your mind.

I've also taken the liberty to slightly reformat some of the strings to fstrings, which makes them a lot easier to understand, as the whole str() stuff goes away.

replaces #53

@Lu05
Copy link

Lu05 commented Mar 31, 2020

Hi,

I have a problem executing the hyperopt.
I tried the following command
freqtrade hyperopt --hyperopt AverageHyperopt --strategy AverageStrategy --config config_test.json -e 1000
but get an error here

2020-03-31 05:49:22,218 - freqtrade.optimize.hyperopt - INFO - Effective number of parallel workers used: 4
............................2020-03-31 05:49:54,163 - freqtrade - ERROR - Fatal exception!
Traceback (most recent call last):
  File "/home/user/freqtrade/freqtrade/freqtrade/main.py", line 36, in main
    return_code = args['func'](args)
  File "/home/user/freqtrade/freqtrade/freqtrade/commands/optimize_commands.py", line 81, in start_hyperopt
    hyperopt.start()
  File "/home/user/freqtrade/freqtrade/freqtrade/optimize/hyperopt.py", line 671, in start
    asked = self.opt.ask(n_points=current_jobs)
  File "/home/user/freqtrade/freqtrade/.env/lib/python3.7/site-packages/skopt/optimizer/optimizer.py", line 382, in ask
    opt._tell(x, y_lie)
  File "/home/user/freqtrade/freqtrade/.env/lib/python3.7/site-packages/skopt/optimizer/optimizer.py", line 553, in _tell
    transformed_bounds[:, 1])
  File "<__array_function__ internals>", line 6, in clip
  File "/home/user/freqtrade/freqtrade/.env/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2084, in clip
    return _wrapfunc(a, 'clip', a_min, a_max, out=out, **kwargs)
  File "/home/user/freqtrade/freqtrade/.env/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 61, in _wrapfunc
    return bound(*args, **kwds)
  File "/home/user/freqtrade/freqtrade/.env/lib/python3.7/site-packages/numpy/core/_methods.py", line 132, in _clip
    um.clip, a, min, max, out=out, casting=casting, **kwargs)
  File "/home/user/freqtrade/freqtrade/.env/lib/python3.7/site-packages/numpy/core/_methods.py", line 85, in _clip_dep_invoke_with_casting
    return ufunc(*args, out=out, **kwargs)
ValueError: operands could not be broadcast together with shapes (3037,) (6007,) (6007,) 

Does anyone have an idea for a solution?

@hroff-1902
Copy link
Member

what are your limits for short and medium ma?

@Lu05
Copy link

Lu05 commented Mar 31, 2020

what are your limits for short and medium ma?

I'm using the default values for strategy and hyperopt. I didn't change anything. Stake currency is BTC and pair list is volume based top 50.

@hroff-1902
Copy link
Member

hroff-1902 commented Mar 31, 2020

which is your version of skopt used (pip list|grep scikit-optimize in venv)?

@Lu05
Copy link

Lu05 commented Mar 31, 2020

which is your version of skopt used (pip list|grep scikit-optimize in venv)?

scikit-optimize 0.7.4

@hroff-1902
Copy link
Member

which is your version of skopt used (pip list|grep scikit-optimize in venv)?

scikit-optimize 0.7.4

The line numbers in the backtrace above ^^:

  File "/home/user/freqtrade/freqtrade/.env/lib/python3.7/site-packages/skopt/optimizer/optimizer.py", line 382, in ask
    opt._tell(x, y_lie)
  File "/home/user/freqtrade/freqtrade/.env/lib/python3.7/site-packages/skopt/optimizer/optimizer.py", line 553, in _tell
    transformed_bounds[:, 1])

say it's of skopt v. 0.7.3

Try to find the reason why you are thinking it's 0.7.4 while 0.7.3 is used and update it to the latest skopt.

@Lu05
Copy link

Lu05 commented Apr 3, 2020

@hroff-1902 thanks for the tip but I didn't find the reason why it is not working. I think it uses 0.7.4 because the command "pip list|grep scikit-optimize" tells me this.
I'm not really fimiliar with python packages. I Also tried a new checkout and install with the install script into a new folder but here are the same problems. Normal hyperopt eg the empty hyperopt example is working without problems. I think it is not a problem related to freqtrade. More a problem with my installation. If you have any ideas for that I would appreciate it. Otherwise I will continue to find the problem on my machine.

Copy link
Member

@hroff-1902 hroff-1902 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@hroff-1902 hroff-1902 merged commit ab9cba8 into master Apr 16, 2020
@xmatthias xmatthias deleted the AverageHyperopt branch April 16, 2020 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants