Skip to content

Instantly share code, notes, and snippets.

View Cybergrany's full-sized avatar
🔭
looking for opportunity

Cybergrany

🔭
looking for opportunity
View GitHub Profile
@Cybergrany
Cybergrany / WeightedMultiParameterHyperOptLoss.py
Last active April 9, 2022 22:45
WeightedMultiparameterHyperOptLoss.py V 0.3
"""
WeightedMultiparameterHyperOptLoss.py V 0.3
-by Cybergrany
A loss function for Freqtrade's hyperopt feature, which allowes the user
to choose weights, which influence how much each parameter affects the objective.
For example, if I want quick trades and don't care too much about risk, I would
give more weight to trades and less to the sortino.
Most of the code here is based on existing freqtrade code, namely the sortino
function and max drawdown calculations. I've just added a way to incorporate