devbootstrap / optimize-trading-strategy-using-freqtrade

Optimize Trading Strategies Using Freqtrade
156 stars 66 forks source link

Hyperopt migration? #2

Closed fgrosswig closed 3 years ago

fgrosswig commented 3 years ago

Hi, do you have any ideas how to solve this? i havent found any useful insights at freqtrade.io - Thx 👍

docker-compose run --rm freqtrade new-hyperopt --hyperopt BBRSIHyperopt

usage: freqtrade [-h] [-V]
                 {trade,create-userdir,new-config,new-strategy,download-data,convert-data,convert-trade-data,trades-to-ohlcv,list-data,backtesting,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-markets,list-pairs,list-strategies,list-timeframes,show-trades,test-pairlist,install-ui,plot-dataframe,plot-profit,webserver}
                 ...
freqtrade: error: argument command: invalid choice: 'new-hyperopt' (choose from 'trade', 'create-userdir', 'new-config', 'new-strategy', 'download-data', 'convert-data', 'convert-trade-data', 'trades-to-ohlcv', 'list-data', 'backtesting', 'edge', 'hyperopt', 'hyperopt-list', 'hyperopt-show', 'list-exchanges', 'list-markets', 'list-pairs', 'list-strategies', 'list-timeframes', 'show-trades', 'test-pairlist', 'install-ui', 'plot-dataframe', 'plot-profit', 'webserver')

docker-compose run --rm freqtrade hyperopt --hyperopt BBRSIHyperopt --hyperopt-loss SharpeHyperOptLoss --strategy BBRSIOptimizedStrategy -i 15m

results into

freqtrade - ERROR - Using separate Hyperopt files has been removed in 2021.9. Please convert your existing Hyperopt file to the new Hyperoptable strategy interface https://github.com/devbootstrap/optimize-trading-strategy-using-freqtrade/blob/0380de1708b923957cfa1b2050e6008c8f602096/ft_userdata/user_data/hyperopts/BBRSIHyperopt.py#L12

CooldownCD commented 3 years ago

Hi @fgrosswig, not sure if you still need a solution, but after some trial and error, and consulting the docs, basically how I went around it is I by entering: docker-compose run freqtrade hyperopt --enable-protections --strategy [your strategy name] --hyperopt-loss SharpeHyperOptLoss -i 5m -e 500 You can interchange the loss parameter as well as i - interval of time and e - epoch number or in other words, the number of random attempts it's gonna make. I'm just a beginner so my explanations might lack detail but I hope my solution helps you!

CooldownCD commented 3 years ago

Also, about the inability to use new-hyperopt. I had the same issue and what I did is I just went into the folder via VS Code and created a new file named BBRSIHyperopt.py and then worked with it from there.

fgrosswig commented 3 years ago

I solved it by creating from sample file and so right now it's working

Thx fir your reply

askb commented 2 years ago

Also, about the inability to use new-hyperopt. I had the same issue and what I did is I just went into the folder via VS Code and created a new file named BBRSIHyperopt.py and then worked with it from there.

any specifics on how this was resolved. Stuck in this step trying to sort this out. TIA