Pages

Saturday, 14 April 2012

Bayesian Classifier Sanity Check, Part 2

Here are the results of the sliced_charts script when applied to the "down with no retracement" market mode, and again it is pleasing to see such high percentages.
octave:1> sliced_charts
Enter matrix e.g. gcmatrix: clmatrix
points_of_interest =  132
dwr_to_dnr =  118
dwr_to_dnr_percent =  0.89394
cyc_to_dnr =  13
cyc_to_dnr_percent =  0.098485
octave:2> sliced_charts
Enter matrix e.g. gcmatrix: homatrix
points_of_interest =  124
dwr_to_dnr =  100
dwr_to_dnr_percent =  0.80645
cyc_to_dnr =  20
cyc_to_dnr_percent =  0.16129
octave:3> sliced_charts
Enter matrix e.g. gcmatrix: ngmatrix
points_of_interest =  150
dwr_to_dnr =  127
dwr_to_dnr_percent =  0.84667
cyc_to_dnr =  21
cyc_to_dnr_percent =  0.14000
octave:4> sliced_charts
Enter matrix e.g. gcmatrix: rbmatrix
points_of_interest =  121
dwr_to_dnr =  104
dwr_to_dnr_percent =  0.85950
cyc_to_dnr =  13
cyc_to_dnr_percent =  0.10744
octave:5> sliced_charts
Enter matrix e.g. gcmatrix: ccmatrix
points_of_interest =  153
dwr_to_dnr =  132
dwr_to_dnr_percent =  0.86275
cyc_to_dnr =  19
cyc_to_dnr_percent =  0.12418
octave:6> sliced_charts
Enter matrix e.g. gcmatrix: kcmatrix
points_of_interest =  148
dwr_to_dnr =  123
dwr_to_dnr_percent =  0.83108
cyc_to_dnr =  23
cyc_to_dnr_percent =  0.15541
octave:7> sliced_charts
Enter matrix e.g. gcmatrix: ojmatrix
points_of_interest =  147
dwr_to_dnr =  120
dwr_to_dnr_percent =  0.81633
cyc_to_dnr =  21
cyc_to_dnr_percent =  0.14286
octave:8> sliced_charts
Enter matrix e.g. gcmatrix: sbmatrix
points_of_interest =  109
dwr_to_dnr =  94
dwr_to_dnr_percent =  0.86239
cyc_to_dnr =  12
cyc_to_dnr_percent =  0.11009
octave:9> sliced_charts
Enter matrix e.g. gcmatrix: ctmatrix
points_of_interest =  143
dwr_to_dnr =  122
dwr_to_dnr_percent =  0.85315
cyc_to_dnr =  14
cyc_to_dnr_percent =  0.097902
octave:10> sliced_charts
Enter matrix e.g. gcmatrix: lbmatrix
points_of_interest =  142
dwr_to_dnr =  120
dwr_to_dnr_percent =  0.84507
cyc_to_dnr =  20
cyc_to_dnr_percent =  0.14085
octave:11> sliced_charts
Enter matrix e.g. gcmatrix: hgmatrix
points_of_interest =  119
dwr_to_dnr =  101
dwr_to_dnr_percent =  0.84874
cyc_to_dnr =  10
cyc_to_dnr_percent =  0.084034
octave:12> sliced_charts
Enter matrix e.g. gcmatrix: smatrix
points_of_interest =  117
dwr_to_dnr =  107
dwr_to_dnr_percent =  0.91453
cyc_to_dnr =  8
cyc_to_dnr_percent =  0.068376
octave:13> sliced_charts
Enter matrix e.g. gcmatrix: smmatrix
points_of_interest =  123
dwr_to_dnr =  105
dwr_to_dnr_percent =  0.85366
cyc_to_dnr =  17
cyc_to_dnr_percent =  0.13821
octave:14> sliced_charts
Enter matrix e.g. gcmatrix: bomatrix
points_of_interest =  136
dwr_to_dnr =  121
dwr_to_dnr_percent =  0.88971
cyc_to_dnr =  11
cyc_to_dnr_percent =  0.080882
octave:15> sliced_charts
Enter matrix e.g. gcmatrix: cmatrix
points_of_interest =  137
dwr_to_dnr =  111
dwr_to_dnr_percent =  0.81022
cyc_to_dnr =  24
cyc_to_dnr_percent =  0.17518
octave:16> sliced_charts
Enter matrix e.g. gcmatrix: omatrix
points_of_interest =  138
dwr_to_dnr =  108
dwr_to_dnr_percent =  0.78261
cyc_to_dnr =  24
cyc_to_dnr_percent =  0.17391
octave:17> sliced_charts
Enter matrix e.g. gcmatrix: wmatrix
points_of_interest =  145
dwr_to_dnr =  122
dwr_to_dnr_percent =  0.84138
cyc_to_dnr =  21
cyc_to_dnr_percent =  0.14483
octave:18> sliced_charts
Enter matrix e.g. gcmatrix: lcmatrix
points_of_interest =  136
dwr_to_dnr =  113
dwr_to_dnr_percent =  0.83088
cyc_to_dnr =  22
cyc_to_dnr_percent =  0.16176
octave:19> sliced_charts
Enter matrix e.g. gcmatrix: fcmatrix
points_of_interest =  123
dwr_to_dnr =  105
dwr_to_dnr_percent =  0.85366
cyc_to_dnr =  15
cyc_to_dnr_percent =  0.12195
octave:20> sliced_charts
Enter matrix e.g. gcmatrix: lhmatrix
points_of_interest =  147
dwr_to_dnr =  122
dwr_to_dnr_percent =  0.82993
cyc_to_dnr =  21
cyc_to_dnr_percent =  0.14286
octave:21> sliced_charts
Enter matrix e.g. gcmatrix: gcmatrix
points_of_interest =  132
dwr_to_dnr =  115
dwr_to_dnr_percent =  0.87121
cyc_to_dnr =  16
cyc_to_dnr_percent =  0.12121
octave:22> sliced_charts
Enter matrix e.g. gcmatrix: simatrix
points_of_interest =  127
dwr_to_dnr =  105
dwr_to_dnr_percent =  0.82677
cyc_to_dnr =  16
cyc_to_dnr_percent =  0.12598
octave:23> sliced_charts
Enter matrix e.g. gcmatrix: plmatrix
points_of_interest =  128
dwr_to_dnr =  112
dwr_to_dnr_percent =  0.87500
cyc_to_dnr =  14
cyc_to_dnr_percent =  0.10938
octave:24> sliced_charts
Enter matrix e.g. gcmatrix: pamatrix
points_of_interest =  120
dwr_to_dnr =  96
dwr_to_dnr_percent =  0.80000
cyc_to_dnr =  18
cyc_to_dnr_percent =  0.15000
octave:25> sliced_charts
Enter matrix e.g. gcmatrix: usmatrix
points_of_interest =  94
dwr_to_dnr =  78
dwr_to_dnr_percent =  0.82979
cyc_to_dnr =  14
cyc_to_dnr_percent =  0.14894
octave:26> sliced_charts
Enter matrix e.g. gcmatrix: tymatrix
points_of_interest =  104
dwr_to_dnr =  99
dwr_to_dnr_percent =  0.95192
cyc_to_dnr =  2
cyc_to_dnr_percent =  0.019231
octave:27> sliced_charts
Enter matrix e.g. gcmatrix: edmatrix
points_of_interest =  108
dwr_to_dnr =  96
dwr_to_dnr_percent =  0.88889
cyc_to_dnr =  10
cyc_to_dnr_percent =  0.092593
octave:28> sliced_charts
Enter matrix e.g. gcmatrix: dxmatrix
points_of_interest =  116
dwr_to_dnr =  94
dwr_to_dnr_percent =  0.81034
cyc_to_dnr =  20
cyc_to_dnr_percent =  0.17241
octave:29> sliced_charts
Enter matrix e.g. gcmatrix: spmatrix
points_of_interest =  106
dwr_to_dnr =  85
dwr_to_dnr_percent =  0.80189
cyc_to_dnr =  19
cyc_to_dnr_percent =  0.17925
octave:30> sliced_charts
Enter matrix e.g. gcmatrix: esmatrix
points_of_interest =  109
dwr_to_dnr =  86
dwr_to_dnr_percent =  0.78899
cyc_to_dnr =  20
cyc_to_dnr_percent =  0.18349
octave:31> sliced_charts
Enter matrix e.g. gcmatrix: ndmatrix
points_of_interest =  107
dwr_to_dnr =  83
dwr_to_dnr_percent =  0.77570
cyc_to_dnr =  18
cyc_to_dnr_percent =  0.16822
octave:32> sliced_charts
Enter matrix e.g. gcmatrix: eurusdmatrix
points_of_interest =  72
dwr_to_dnr =  60
dwr_to_dnr_percent =  0.83333
cyc_to_dnr =  11
cyc_to_dnr_percent =  0.15278
octave:33> sliced_charts
Enter matrix e.g. gcmatrix: gbpusdmatrix
points_of_interest =  85
dwr_to_dnr =  72
dwr_to_dnr_percent =  0.84706
cyc_to_dnr =  11
cyc_to_dnr_percent =  0.12941
octave:34> sliced_charts
Enter matrix e.g. gcmatrix: usdchfmatrix
points_of_interest =  86
dwr_to_dnr =  69
dwr_to_dnr_percent =  0.80233
cyc_to_dnr =  14
cyc_to_dnr_percent =  0.16279
octave:35> sliced_charts
Enter matrix e.g. gcmatrix: usdyenmatrix
points_of_interest =  100
dwr_to_dnr =  80
dwr_to_dnr_percent =  0.80000
cyc_to_dnr =  16
cyc_to_dnr_percent =  0.16000
octave:36> sliced_charts
Enter matrix e.g. gcmatrix: eurchfmatrix
points_of_interest =  100
dwr_to_dnr =  83
dwr_to_dnr_percent =  0.83000
cyc_to_dnr =  15
cyc_to_dnr_percent =  0.15000
octave:37> sliced_charts
Enter matrix e.g. gcmatrix: eurgbpmatrix
points_of_interest =  91
dwr_to_dnr =  79
dwr_to_dnr_percent =  0.86813
cyc_to_dnr =  12
cyc_to_dnr_percent =  0.13187
octave:38> sliced_charts
Enter matrix e.g. gcmatrix: euryenmatrix
points_of_interest =  94
dwr_to_dnr =  75
dwr_to_dnr_percent =  0.79787
cyc_to_dnr =  15
cyc_to_dnr_percent =  0.15957
octave:39> sliced_charts
Enter matrix e.g. gcmatrix: eurausmatrix
points_of_interest =  99
dwr_to_dnr =  81
dwr_to_dnr_percent =  0.81818
cyc_to_dnr =  18
cyc_to_dnr_percent =  0.18182
octave:40> sliced_charts
Enter matrix e.g. gcmatrix: eurcadmatrix
points_of_interest =  92
dwr_to_dnr =  81
dwr_to_dnr_percent =  0.88043
cyc_to_dnr =  9
cyc_to_dnr_percent =  0.097826
octave:41> sliced_charts
Enter matrix e.g. gcmatrix: usdcadmatrix
points_of_interest =  97
dwr_to_dnr =  86
dwr_to_dnr_percent =  0.88660
cyc_to_dnr =  7
cyc_to_dnr_percent =  0.072165
octave:42> sliced_charts
Enter matrix e.g. gcmatrix: gbpchfmatrix
points_of_interest =  87
dwr_to_dnr =  70
dwr_to_dnr_percent =  0.80460
cyc_to_dnr =  14
cyc_to_dnr_percent =  0.16092
octave:43> sliced_charts
Enter matrix e.g. gcmatrix: gbpyenmatrix
points_of_interest =  85
dwr_to_dnr =  74
dwr_to_dnr_percent =  0.87059
cyc_to_dnr =  9
cyc_to_dnr_percent =  0.10588
octave:44> sliced_charts
Enter matrix e.g. gcmatrix: auscadmatrix
points_of_interest =  72
dwr_to_dnr =  59
dwr_to_dnr_percent =  0.81944
cyc_to_dnr =  13
cyc_to_dnr_percent =  0.18056
octave:45> sliced_charts
Enter matrix e.g. gcmatrix: aususdmatrix
points_of_interest =  74
dwr_to_dnr =  59
dwr_to_dnr_percent =  0.79730
cyc_to_dnr =  9
cyc_to_dnr_percent =  0.12162
octave:46> sliced_charts
Enter matrix e.g. gcmatrix: ausyenmatrix
points_of_interest =  65
dwr_to_dnr =  49
dwr_to_dnr_percent =  0.75385
cyc_to_dnr =  13
cyc_to_dnr_percent =  0.20000
But what does this all mean? For the purposes of simplicity I shall discuss "up with no retracement" only, but everything will apply equally to the "down with retracement," but of course in reverse.

My original concern was that the market classifications might have been erratically switching directly from "dnr" to "unr" with resultant lurches from short to long market positions and along the way incurring whipsaw losses from false signals. However, the high percentages from these simple tests show that this is not actually the case. Based on this, one can assume that
  • when the market classification changes to "unr" a long position will already be held because either
  1. a cyclic long position is held, having been initiated at the most recent low cyclic turn, or
  2. a "uwr" long position is held, having been initiated at the most recent rebound from a resistance/retracement level
  • which means that this market classification change is not necessarily a new entry signal, but rather a signal to change to a trend following exit criteria
Therefore, my next test(s) will be to assume that such a long position is held when the market classification changes to "unr" and will continued to be held until a trend following exit occurs, coupled with a "re-entry" signal if appropriate. My intent at the moment is simply to plot equity curves of these long positions, in the supposition that these equity curves will be "additions" or "extensions" to the equity curves generated by signals when in other market modes. More details in a coming post.

No comments:

Post a Comment