Posted By: aliswee
Issue with Multi-Core WFO Training - 03/24/24 20:20
Hi there,
Wonder if anyone has come across this issue and knows a potential solution?
I have a Zorro S subscription and have followed the Black Book strategy for the introduction of WFO. However, whenever I train with the test is cut short after the first cycle with the Error 062, see example below:
I can get around this by removing the NumWFOCores line, and letting Zorro train on a single core, however, when training my own strategy, this is unhelpful as I'm using a lot of assets/strategies together.
My full script for what I'm training is below, but note I also get this issue with the sample Alice Script from the BB.
Thanks in advance for any help given
Wonder if anyone has come across this issue and knows a potential solution?
I have a Zorro S subscription and have followed the Black Book strategy for the introduction of WFO. However, whenever I train with
Code
NumWFOCores = -2
Code
Factors stored in StochRSI_O.fac Run StochRSI_O.. Read StochRSI_O_1.par WFA Test: StochRSI_O 2010..2018 (10 cores) Assets AssetsCur.csv Read StochRSI_O.fac Error 062: Can't open StochRSI_O_2.par (rt:2) Error 044: Data\StochRSI_O_2.par not trained Loss -1.62$ MI -0.0245$ DD 20.73$ Capital 41.29$ Trades 25 Win 60.0% Avg -0.7p Bars 16 AR -1% PF 0.96 SR -0.03 UI 100% R2 0.00 Time 00:01:18
I can get around this by removing the NumWFOCores line, and letting Zorro train on a single core, however, when training my own strategy, this is unhelpful as I'm using a lot of assets/strategies together.
My full script for what I'm training is below, but note I also get this issue with the sample Alice Script from the BB.
Thanks in advance for any help given
Code
function tradeMeanReversion() { int startHour = optimize(8, 0, 23, 1); int openingWindow = optimize(8, 1, 23, 1); // max 24 hours vars Prices = series((priceH()+priceL())/2); // Series of **average** price data vars Cycles = series(StochRSI(Prices, 14, 10, 5, MAType_SMA)); // StochRSI cycles vars Ratios = series(ER(Prices, 20)); var RatioThreshold = optimize(0.4, 0.2, 0.8, 0.1); var Threshold = optimize(15, 5, 25, 5); // threshold for entry var Exit_Threshold = 50; // threshold for exit Trail = Stop = optimize(10, 4, 20, 2)*ATR(100); LifeTime = 150; // set max lifetime just incase MaxLong = MaxShort = -1; // one open trade at a time Spread = marketVal(); Slippage = 1; //RollLong = RollShort = 0; Commission = 0.35; // Set costs to FX Prop firm highest rate for testing // close all position at 16:15 local time //if(at(1759)) { // exitLong("**"); // exitShort("**"); //} // move the starting hour to 0, any time before the starting hour needs to have 24h added to it before, var hour24 = hour(); if(hour24 < startHour) hour24 += 24; // Time of day opening filter if((hour24 >= startHour) && (hour24 <= startHour + openingWindow)) { // noise filter if(Ratios[0] > RatioThreshold) { // SHORT Condition if(crossOver(Cycles, 100-Threshold)){ enterShort(); } // LONG Condition if(crossUnder(Cycles, Threshold)){ enterLong(); } } } if(crossUnder(Cycles, Threshold)){ exitShort(); } if(crossOver(Cycles, 100-Threshold)){ exitLong(); } plot("Cycles", Cycles, LINE+NEW, RED); plot("Threshold+", 100-Threshold, 0, GREY); plot("Threshold-", Threshold, 0, GREY); plot("Exit Threshold", Exit_Threshold, 0, GREY); plot("Efficiency Ratio", Ratios, NEW, RED); plot("Threshold Ratio", RatioThreshold, 0, GREY); } function run() { NumCores = -2; set(LOGFILE+PLOTNOW+PARAMETERS+FACTORS+TESTNOW+ALLCYCLES); // Add factors to the list to generate a FACTORS file // setf(TrainMode, BRUTE); BarPeriod = 60; LookBack = 150; // set lookback explicitly so all optimised strategies start at the same time assetList("AssetsCur.csv"); if(Train) Detrend = TRADES; // equalise long and short profit for training StartDate = 2010; EndDate = 2018; NumSampleCycles = 4; // oversample the price curve NumWFOCycles = 10; NumCores = -2; ReTrainDays = 147; if(ReTrain) { // true when training started during live trading UpdateDays = -1; // Always download price data from broker SelectWFO = -1; // only retrain the last cycle } while(asset(loop("EUR/USD", "GBP/USD"))) { tradeMeanReversion(); } }