Saving strategy WFM results in .sqx
3件の返信
After executing Optimizer (or Task Optimize Strategies in workflow), and trying to save the result, I get not only the WFM result, but also System Parameter Permutation and Optimization profile are executed and saved. I want to save only the best WFM result. How can i do that?
0
I wrote a code but the symbol and timeframe are null. When I try to use the result on portfolio master, I get an error.
`package SQ.CustomAnalysis;
import com.strategyquant.lib.*;
import java.util.ArrayList;
import java.util.List;
import com.strategyquant.datalib.*;
import com.strategyquant.tradinglib.*;
public class SaveBestWalkForwardMatrixResult extends CustomAnalysisMethod {
//————————————————————————
//————————————————————————
//————————————————————————
/**
* set the type of CA snippet here – it is either used as:
* – strategy filter – it will call filterStrategy() method for one strategy
* – databank processor – it will call processDatabank() for all strategies in databank
*
* Uncomment the one you want to use.
*/
public SaveBestWalkForwardMatrixResult() {
super(“SaveBestWalkForwardMatrixResult”, TYPE_PROCESS_DATABANK);
}
@Override
public ArrayList processDatabank(String project, String task, String databankName, ArrayList databankRG) throws Exception {
for (ResultsGroup result : databankRG) {
try {
// Removes optimization profile
result.setOptimizationProfile(null);
// Get keys to work on
List keysSnapshot = new ArrayList<>(result.getResultKeys());
String bestWFMResultKey = result.getBestWFResultKey();
String mainResultsKey = result.getMainResultKey();
// Gets best WFM subresult and settings
Result bestWFMResult = result.subResult(bestWFMResultKey);
SettingsMap bestWFMSettingsMap = bestWFMResult.getSettings();
// Removes all wfm simulations results
for (String currentKey : keysSnapshot) {
if (!currentKey.equals(bestWFMResultKey) && !currentKey.equals(mainResultsKey)) {
result.removeSubresult(currentKey, true);
}
}
// Removes original WFM separetaly to avoid duplication
String originalWFResult = result.getOriginalWFResultKey();
result.removeSubresult(originalWFResult, true);
// Removes main result in order to maintain only best WF
result.removeSubresult(mainResultsKey, true);
} catch (Exception e) {
throw e;
}
}
return databankRG;
}
}
0
こんにちは,
we plan to release a tutorial on how to work with WF results through Custom analysis soon
0
I noticed you can run WFM from Retester as part of the Cross Checks (Robutness) or from Optimizer. I have run the same strategies using both and results are totally different, 3D chart, etc…even with some of the strategies are contradictory, passing in Retester and not in Optimizer or viceversa. I would like to know, which of the two is correct to run WFM…….if there is any difference in the output or should the results be identical….and if Retester and Optimizer are delivering different results after performing WFM, which are the differences and what is ehich one is most correct to use for WFM test….thanks in advance for your replies
0
3件の返信を表示中 - 1 - 3件目 (全3件中)