⚠️ Disclaimer
- This strategy is under development. It is not recommended running it live at this moment.
- Always test this strategy before using it!
- I am in no way responsible for your live results! This strategy is still experimental and under heavy development!
- MoniGoMani should always be re-optimized after doing manual changes!
- You need to optimize your own copy of MoniGoMani while thinking logically, don't follow your computer blindly!
Table of Contents
- Table of Contents
- MoniGoMani HyperOptLoss Functions
- MGM_WinRatioAndProfitRatioHyperOptLoss
- MGM_SortinoHyperOptLoss
- MGM_WeightedMultiParameterHyperOptLoss
MoniGoMani HyperOptLoss Functions
MoniGoMani Ships with 3 Custom HyperOptLoss Objective Functions which can be found under user_data/hyperopts/
:
HyperOptLoss Name | Application |
---|---|
MGM_WinRatioAndProfitRatioHyperOptLoss | Initial & refinement HyperOpt runs |
MGM_SortinoHyperOptLoss | Initial & refinement HyperOpt runs |
MGM_WeightedMultiParameterHyperOptLoss | Only refinement HyperOpt Runs |
These contain configurable parameters. All of their settings can be tweaked from within your mgm-config under the monigomani_hyperoptloss_settings
section to make up for a more robust strategy.
MGM_WinRatioAndProfitRatioHyperOptLoss
MGM_WinRatioAndProfitRatioHyperOptLoss HyperOpt Objective function. Returns smaller number for better results. (More negative = better)
This function optimizes for both best profit
& stability. On stability, the final score has an incentive, through win_ratio
, to make more winning deals out of all deals done.
total_trades_threshold_low
It will also punish the HyperOpt if the trades found in an epoch are below the configured total_trades_threshold_low
as a way to prevent over-fitting on too low trades with too high average duration.
(Setting can be found under the total_trades
section in the monigomani_hyperoptloss_settings
section inside mgm-config)
MGM_SortinoHyperOptLoss
MGM_SortinoHyperOptLoss HyperOpt Objective function. Returns smaller number for better results. (More negative = better)
This function calculates the Sortino ratio, a variation of the Sharpe ratio that differentiates harmful volatility from total overall volatility by using standard deviation of negative results downside deviation, instead of the total standard deviation of results. The Sortino ratio takes a result and subtracts the risk-free rate, and then divides that amount by the downside deviation.
total_trades_threshold_low
It has been customized to also punish the HyperOpt if the trades found in an epoch are below the configured total_trades_threshold_low
as a way to prevent over-fitting on too low trades with too high average duration.
(Setting can be found under the total_trades
section in the monigomani_hyperoptloss_settings
section inside mgm-config)
MGM_WeightedMultiParameterHyperOptLoss
MGM_WeightedMultiParameterHyperOptLoss Customizable HyperOpt Objective function. Returns smaller number for better results. (More negative = better)
This HyperOptLoss Function is a final refinement HyperOptLoss Function utilized by MoniGoMani. It allows the user to choose possible Parameter Weight Objective Configurations, which represent the columns from the HyperOpt output table, Each of these influence the outcome of the final Objective.
All settings for the MGM_WeightedMultiParameterHyperOptLoss
function can be found in your mgm-config under the MGM_WeightedMultiParameterHyperOptLoss
section of the monigomani_hyperoptloss_settings
section.
Following parameter sections can be configured to fine-tune your MoniGoMani Configuration further for more desired results:
Parameter section | Optimize direction |
---|---|
total_trades | lower |
win_ratio | higher |
average_profit | higher |
total_profit | higher |
average_duration | lower |
max_drawdown | lower |
Each parameter section contains following parameter settings to control the punish/reward system for them:
Parameter name | Description |
---|---|
parameter_weight | Defines the amount of influence weight that this parameter section has on the HyperOpt Results in percentages. With 100% being the base influence weight (aka x1), adjusting to 200% would make this section x2 as important as the other parameter sections with the default weight. |
expected_parameter | Parameter value that is expected to be found. |
parameter_threshold_high | Highest parameter value that should be allowed to be found. |
parameter_threshold_low | Lowest parameter value that should be allowed to be found. |
HyperOpt is punished if the found parameter value is not in between the defined high/low threshold values, the farther off the expected value, the harder the punishment.
HyperOpt is rewarded if the found parameter value is between the defined high/low threshold values, giving more rewards regarding the desired optimize direction (higher
or lower
)
Usage notes
- Set the
expected_parameter
&threshold
values to something that makes sense! (There's no point settingexpected_profit
to 9000% thinking that it'll magically make you a lambo owner...) - A good way of using the
expected_profit
value is if you have an optimized MoniGoMani configuration and you know it can makeX
profit, but you want to see if you can push it that extra bit more, so maybe set theexpected_profit
toX + 25%
- Or if your optimized MoniGoMani configuration leaves you with a drawdown of
150%
. You can try setting theexpected_drawdown
to90%
, to see if HyperOpt can narrow down your signals to reach a better drawdown.
Disable Weights
If any of the parameter_weight
settings don't matter to you, then just set it's corresponding parameter_weight
value to 0 and it will be disabled.
Longer & More Trades
This function makes the assumption that you want shorter and less trades, if you for example want it to HyperOpt towards longer and more trades, then adjust the optimize_direction
parameters inside the MGM_WeightedMultiParameterHyperOptLoss.py
file to higher
or lower
accordingly. (This has not been tested yet!)
Logging
If use_mgm_logging
& mgm_log_levels
's info
both are set to true
, then the found parameters (and their found weights) will be printed out to the console. This can be very helpful for working out expected parameters, or to see why HyperOpt thinks an epoch that looks good to you isn't actually that great! Recommended to use with --print-all
.