Rank and Select Strategies by Strategy Metric
This custom analysis sorts and selects x strategies according to the Strategy Metric.
To use it, you need to unpack commons-math3-3.6.1 from the jar file and import it into the strategyquant/user/libs folder.
The snippet is easily modifiable and can be rewritten to rank strategies by IS/OS, Direction, and Sample Types:
String stratMetric = “MAFEProfitFactor”; int numStrats = 10; for(ResultsGroup strategyRG : databankRG) { /// Single or Portfolio? Result mainResult = strategyRG.subResult( strategyRG.getMainResultKey() ); //single results //Result mainResult = strategyRG.portfolio(); // portfolio result
16/03/2023 -> Code is updated for ranking by fitness and Monte Carlo Ratios.
Excellent ! Thank you Clonex !!!
Thanks to your example, I was able to build my code and make my article on how to select better building blocks !!!
Thanks clonex for very helpful custom analysis.
How is string for “NetProfit (MC retest, Conf. level 95%)”
You can help. please.
Hello Ivan. When I tried to compile it the message (package org.apache.commons.math3.stat.descriptive.rank does not exist) is displayed in Code Editor Log. Related to Line 14 of PercRankStrats.java file (import org.apache.commons.math3.stat.descriptive.rank.Percentile;)
Could you guide me to debug this problem ?
Regards,
To use it, you need to unpack commons-math3-3.6.1 from the jar file and import it into the strategyquant/user/libs folder
There are three errors in compiling on version 138. Can you debug it?
I have added instructions to solve this problem.
To use it, you need to unpack commons-math3-3.6.1 from the jar file and import it into the strategyquant/user/libs folder.
Thank you very much.