|
3 registered members (AndrewAMD, juanex, Grant),
1,018
guests, and 8
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Crash when training DTREE
#431279
10/12/13 20:06
10/12/13 20:06
|
Joined: Sep 2013
Posts: 504 California
GPEngine
OP
User
|
OP
User
Joined: Sep 2013
Posts: 504
California
|
The following strategy causes Zorro to crash. The crash happens between the 1st and 2nd cycle. There is nothing interesting in the diag file. There are no errors except for the crash.
function run() {
NumYears = 2;
LookBack = 471;
BarPeriod = 15;
Stop = 6 * ATR(100);
TakeProfit = 2 * ATR(100);
set(RULES);
Hedge = 2;
NumWFOCycles = 5;
MAMA(series(day(2)), 0.24, 0.023);
var v1 = NumRiseFall(series(rFAMA), 95);
var v2 = HighPass1(series(Mom(series((var)CDLSpinningTop()), 95)), 64);
var v3 = HighPass1(series(AO(series(AroonOsc(36)))), 106);
MACDFix(series(HighPass1(series((var)CDLSpinningTop()), 64)), 104);
var v4 = rMACDSignal;
BBands(series(FractalHigh(series(AroonOsc(67)), 102)), 60, 2.5, 2.4, MAType_EMA);
var v5 = rRealMiddleBand;
MACDFix(series(priceHigh(3)), 104);
var v6 = NumRiseFall(series(rMACDSignal), 72);
StochF(35, 67, MAType_T3);
var v7 = LinearRegIntercept(series(FractalHigh(series(rFastD), 58)), 111);
MACDFix(series(LinearRegIntercept(series(day(0)), 111)), 67);
var v8 = rMACDSignal;
var input1 = v1 * -0.00110547
+ v2 * 0.00222760
+ v3 * 0.04020708
+ v4 * 0.01128430
+ v5 * 0.06875866
+ v6 * -0.16419055
+ v7 * -0.05423703
+ v8 * -0.01516895;
var input2 = v1 * 0.02346427
+ v2 * -0.00026231
+ v3 * -0.12346860
+ v4 * -0.00459414
+ v5 * 0.01890352
+ v6 * -0.04114520
+ v7 * 0.00925573
+ v8 * 0.01288936;
var input3 = v1 * -0.02614581
+ v2 * -0.00536007
+ v3 * 0.16492536
+ v4 * -0.00286681
+ v5 * 0.11514686
+ v6 * 0.06602972
+ v7 * -0.09581744
+ v8 * 0.03452591;
var input4 = v1 * 0.04176300
+ v2 * 0.01472879
+ v3 * 0.09870978
+ v4 * 0.04768938
+ v5 * -0.04415341
+ v6 * -0.07404330
+ v7 * 0.06831789
+ v8 * -0.01451993;
var input5 = v1 * -0.01390801
+ v2 * 0.04040977
+ v3 * 0.08363368
+ v4 * -0.01162885
+ v5 * -0.00704222
+ v6 * -0.00270083
+ v7 * 0.06368790
+ v8 * -0.00778374;
var input6 = v1 * 0.05484640
+ v2 * -0.05112688
+ v3 * 0.14928488;
var input7 = v1 * -0.01981788
+ v2 * 0.10429744
+ v3 * -0.01295508;
var input8 = v1 * 0.09492292
+ v2 * 0.15706923
+ v3 * -0.03908688;
var input9 = v1 * -0.34940018
+ v2 * -0.00191789
+ v3 * 0.02051273;
var input10 = v1 * 0.14940054
+ v2 * -0.04275530
+ v3 * 0.03295050;
if(adviseLong(DTREE, 0, input1, input2, input3,
input4, input5, input6, input7,
input8, input9, input10) > 0) {
enterLong();
}
}
Log has
Rules: bug3 2012..2013
Prediction accuracy: 34%
Rules stored in bug3_EURUSD_1.c
Last few lines of diag file look like they are from Cycle1.
Trade 2821179
Removed
Trade 2821280
Removed
Trade 2821381
Removed
Trade 2821482
Removed
Trade 2821583
Removed
run 28216
return
Exit Loop TA-Lib Series
|
|
|
Re: Crash when training DTREE
[Re: jcl]
#431348
10/14/13 15:45
10/14/13 15:45
|
Joined: Sep 2013
Posts: 504 California
GPEngine
OP
User
|
OP
User
Joined: Sep 2013
Posts: 504
California
|
Thank you so much for looking into it! I'm glad you were able to spot the fault.
Not to whine too much, but it took me many hours on my side to be able to isolate this into a simple example. Of course I realize that the example I provided has no merits as a strategy. I am just providing a test case for you. I cannot look at Zorro internals, so I must work backwards and infer and isolate the problem. This one was especially hard because the crash can be made to go away by removing, not adding inputs. Try it -- remove v06 from the advise method. No crash, right? Replace any of the indicators with constant series(0). No crash, right? This was a tough one on my side.
I need Zorro to survive nonsense inputs since I am automatically generating candidate strategies.
As far as I can tell, this crash was not present in 1.14. Please add tests which send nonsense signals to the advise methods. Please add these to your release qualification steps. Thank you.
Last edited by GPEngine; 10/14/13 15:46. Reason: said 1.16, meant 1.14
|
|
|
Re: Crash when training DTREE
[Re: GPEngine]
#431349
10/14/13 16:08
10/14/13 16:08
|
Joined: Sep 2013
Posts: 504 California
GPEngine
OP
User
|
OP
User
Joined: Sep 2013
Posts: 504
California
|
Here's a shorter and somewhat more realistic example which reproduces the crash.
function run() {
StartDate = 20130101;
EndDate = 20131001;
AssetList = "AssetsUS.dta";
LookBack = 900;
BarPeriod = 4;
ExitTime = 240;
Stop = 3.24 * ATR(100);
TakeProfit = 2.94 * ATR(100);
set(RULES+TESTNOW);
NumWFOCycles = 5;
TradesPerBar = 2;
var v00 = FIR6(series(Normalize(series(CCI(70)), 140)));
var v01 = WMA(series(LinearRegAngle(series(PlusDM(79)), 78)), 68);
var v02 = MidPrice(33);
if(adviseLong(DTREE, 0, v00, v01, v02) > 0) {
enterLong();
}
if(adviseShort() > 0) {
enterShort();
}
}
Crash during Train. Wait for the 4th cycle.
|
|
|
|