-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 loss going wrong way ? #10192
Comments
Well the calculation is not really ideal - that's also been reported in #9563 and #9819. The sign is however not "really" the problem (at least not the only one) - it's the overall combination in the formula - as well as the (at least in part, ignorance of the range of values a value can reach. While the variable says "max_drawdown_abs" - it's really a relative value that's retrieved. So if your strategy does great, your "high" value may be 100% profit (from 1000$ to 2000$) - but then it's in a bad run and loses 1200$ (your net-loss is 200$). for your particular result - if you simply invert the sign - you'd get In reality / summary - i think the way this loss function combines the values is not ideal - and I'm more than happy to get a PR that sees it improved. The (simple, from a user perspective) alternative is to pick a different loss function - which there's plenty of - and all try to search for different "improvements". |
Well, thanks for the comprehensive answer. I guess I'll stick with OnlyProfitHyperOptLoss and manually discard frightening drawdowns for now. |
Hi. I tested 2024.5-dev-ea27a1ec implementing new formula proposed by #10221. Now objective is positive so freqtrade actually tries to improve the worst winning strategy. Appears to me a simple minus sign or min/max swap is needed. Example: +--------+---------+----------+--------------------------+--------------+---------------------------+----------------+---------------+---------------------------+ PS: I dunno if commenting on this post was the correct procedure ? |
It's interesting insofar as my experience was different - and results DID improve quite significantly, preferring better results. |
Are you sure that you're using the correct loss function ( I'm asking this because your objective's do not align with that calculation. DRAWDOWN_MULT = 0.075
total_profit = 19556
rel_drawdown = 22.17 / 100
-1 * (total_profit - (rel_drawdown * DRAWDOWN_MULT * total_profit)) and results in an objective of -19230.83261. Your objective on the other hand is |
hi, FIRST RUNI did a new test, since previous is lost. COMMAND: FREQTRADE: OUTPUT:
CALCULATION: SECOND RUNafter a pull FREQTRADE: OUTPUT:
same positive Objective values with this build. |
in: PS: coherent with 480477d |
You're right, the one i used in my calculations was not the very last try. |
Describe your environment
Note: All issues other than enhancement requests will be closed without further comment if the above template is deleted or not filled out.
Describe the problem:
Hi. It seems loss function score is broken somehow (maybe smthg to do with its sign).
Example below (as on 2024-05-07) says #5 is best while obviously it should be #10.
Regards.
Steps to reproduce:
docker-compose run --rm freqtrade hyperopt --disable-param-export --config ./user_data/config_binanceWEB.json --strategy TAZ_15m_binance000 --timerange=20230901-20240501 --spaces buy --hyperopt-loss ProfitDrawDownHyperOptLoss --epoch 1000 --timeframe 15m --timeframe-detail 1m --j 1
Observed Results:
The text was updated successfully, but these errors were encountered: