The Walk Forward Metric Explorer (WFME) v8 is a standalone 64bit exe program that is super-fast and automatically displays its extensive statistical results in Excel. The WFME reads all files generated by the PWFO and searches each PWFO file for the best combination of in-sample performance metrics, also called filters that generate the statistically best average out-of-sample performance. A filter summary is generated and sorted by total out-of-sample net profits after costs for all metric combination filters examined and written to a comma delimited Excel file by the WFME. In addition, using modern "Bootstrap" techniques, the WFME calculates the probability of whether each filter's out-of-sample results were due to chance. When the WFME run is done just click on the Excel Icon next to the Run button and the WFME output file will appear in Excel or your spreadsheet.
To see an example and description of the WFME run output file click here
Data mining or curve fitting a price series will always produce the best performance results. If you look hard enough using optimization you will always find patterns in the price data by mistaking chance fluctuations for genuine effects. But they are not real. Why use the PWFO walk forward technique? Why not just perform a TradeStation optimization on the whole price series and choose the input parameters that give the best total net profits or profit factor? Whenever you run a optimization (combinatorial search} over many different combinations of input parameters on noisy data on a fixed number of prices, no matter how many, the best performance parameters found are guaranteed to be due to "curve fitting" the noise and signal. When we run, say, 5000 different input parameter combinations , the best performance parameters will be from those system input variables that are able to produce profits from the price pattern and the random spurious price movements While the price patterns, if there, will repeat, the same spurious price movements will not. If the spurious movements that were captured by a certain set of input parameters were a large part of the total net profits, then choosing these input parameters will produce losses when traded on future data. These losses occur because the spurious movements will not be repeated in the same way. This is why system combinatorial searches with no out-of-sample in-sampling cause loses when traded in real time from something that looked great in the in-sample section.
In order to gain confidence that our system input parameter selection procedure on in-sample data will produce profits "on average" in the future we must perform the walk forward out-of-sample analysis many times. Why not just do the analysis once or three times? Well just as in poker, where there is considerable vagaries in hand to hand luck, walk forward out-of-sample analysis give considerable vagaries in week to week out-of-sample profit "luck". That is, by pure chance we may have chosen some input parameters that did well in the in-sample section data and the three out-of-sample section runs. In order to minimize this type of "luck", statistically, we must repeat the walk forward out-of-sample (oos) analysis over many in-sample/oos sections and take the average of our weekly results over all out-of-sample sections (we need at least 50 oos sections for statistically significant results). This average gives us an expected weekly return and a standard deviation of weekly returns which allows us to statistically estimate the expected equity and it's range for N weeks in the future.
Below are examples of the many filters the WFME can generate in a run and the logic behind the metric filters described.
The PWFO generates a number of performance metrics in the in-sample(IS) section. (Please see http://meyersanalytics.com/Walk-Forward-Optimization.html for a listing of these performance metrics). The question we are attempting to answer statistically, is which performance metric or combination of performance metrics (which we will call a filter) in the in-sample section will produce strategy inputs that produce statistically valid profits in the out-of-sample section. In other words we wish to find a metric filter that we can apply to the in-sample section that can give us strategy inputs that will produce, on average, good trading results in the out-of-sample sections. The PWFO produces a total of 32 different performance metrics in the in-sample section. If we have 5000 different input combinations then the in-sample section consists of 32 columns of PWFO performance metrics for each of the 5000 different strategy inputs or rows.
An example of a simple filter would be to choose the row in the in-sample section that had the highest net profit or perhaps a row that had one the best performance metric from one of the other 32 PWFO metrics. Unfortunately it was found that this type of simple filter very rarely produces good out-of-sample results. More complicated metric filters can produce good out-of-sample results minimizing spurious price movement biases in the selection of strategy inputs.
The WFME metric filters are composed of two screens. The first screen consists of eliminating those rows in the in-sample section that do not meet the Metric1, Metric2 and/or Metric3 conditions. For instance we know that high profit factors(PF) in the in-sample section usually mean that the signal and the noise have been curve fitted. By eliminating all rows in the IS section that have a PF>4, we eliminate many of those curve fitted IS strategy inputs. The PWFO metric R2 is defined as the in-sample trade equity regression trend line coefficient of correlation r^2. r^2 is a measure of how well a straight line fits the equity curve generated by a set of in-sample strategy inputs. High R2 values in the IS section usually mean poor performance in the out-of-sample section because of curve fitting the signal and noise in the IS section. By eliminating all rows in the IS section that have a R2>90, we eliminate many of those curve fitted IS strategy inputs. With the two metric filter PF<4|R2<90, we have eliminated many rows in the IS section that curve fitted the noise and the signal. We can stop at this PF<4|R2<90 screen and choose from the rows left in the IS section, the row that has the highest value of one of the other 32 PWFO metrics. Suppose we chose the row after the PF<4|R2<90 row elimination that has the highest PWFO metric mTrd. mTrd is the medium rather than average of all the trades in the IS section for a given set of strategy inputs. The final filter would then be PF<4|R2<90-mTrd. This filter applied to the each IS section would produce strategy inputs to be used in each out-of-sample section. The WFME can search for many combinations of PF, R2 and PWFO Metrics in one run by simply putting in the ranges as shown in the WFME form above. In addition, the user is free to choose which PWFO metrics he wishes to use to eliminate curve fitted rows in the IS section. I chose PF and R2 in this example because that's what I use most often.
If we wanted to stop at just a first screen run we would set the WFME form inputs Metric Top N boxes to blank. If we did this using the values shown in the form example above but with the Metric Top N boxes set to blank, we would generate the following WFME Ave output. The WFME columns are described below Below. Shown is the first screen WFME computer run along with a small sample of other filter combinations that are constructed in a similar manner. Notice that the out-of-sample results from a first screen metric filter are not as good as the two screen metric filter described below.
We could stop at this first of screen or go to a second screen which usually results in better out-of-sample performance. Below describes a second screen run.
Here is a two screen combination filter from a WFME run shown in the WFME form above that was used in my paper( http://meyersanalytics.com/publications2/EC1FixmVnXOXT2.pdf ) with good out-of-sample results. High profit factors (PF) in the in-sample section usually mean poor performance in the out-of-sample-section. This is a kind of reversion to the mean. So in the in-sample section we eliminate all strategy input rows that have a PF>4. R2 is defined as the in-sample trade equity regression trend line coefficient of correlation r2. r2 is a measure of how well a straight line fits the equity curve generated by a set of in-sample strategy inputs. High r2 values in the in-sample section usually mean poor performance in the out-of-sample-section. This is a kind of reversion to the mean as well and a measure of how well the price noise is being fitted in the in-sample section. So, in the in-sample section we eliminate all strategy input rows that have a r2>90. After using the pf-r2 filter, as described, there can still be 100ís of rows left in the in-sample section. Few traders can stay with a strategy that has many losing trades in a row (lr). For this filter we will limit the number losing trades in a row in the 30 day in-sample period to 5 or less lr<5. The PWFO generates the metric tLb. This metric is the Total Losing Bars in the losing trades in the in-sample section. Let us choose the 20 rows in the in-sample section that contain the lowest(bottom) number of tLb from the rows that are left after the PF-R2-LR elimination. This particular filter will now leave 20 cases or rows in the in-sample section that satisfy the above filter conditions. Suppose for this filter, within the 20 in-sample rows that are left, we want the row that has the minimum metric eq2V in the in-sample section. eq2V is the Velocity of a 2nd Order Polynomial Line fit to the equity curve evaluated at the end of the equity curve. Combining all above, this would produce a filter named b20tLb|pf<4|lr<5|r2<:90-eq2V. This in-sample filter leaves only one row in the PWFO in-sample section with its associated strategy inputs and out-of-sample net profit in the out-of-sample section. This particular b20tLb|pf<4|lr<5|r2<90-eq2V filter finds the strategy inputs parameters in each of the 304 in-sample sections and applies these inputs to each of the 304 out-of-sample sections. Using the filter's in-sample strategy inputs on the 304 out-of-sample sections, the average out-of-sample performance is calculated. In addition many other important out-of-sample performance statistics for this filter are calculated and summarized. Below we show such a filter computer run along with a small sample of other filter combinations that are constructed in a similar manner. Row 3 of the sample output shown below shows the results of the filter discussed above. A total of 43200 different metric filters were examined. We chose Row 3 because it had a lower BE, BLW and Dev^2 and a higher KTau and eqR2 along with better statistics than the rows below it. More on this below and on how that number of filters combinations effect the probability that the filter chosen was or was not due to chance
Bootstrap Probability of Filter Results: Using modern "Bootstrap" techniques, we can calculate the probability of obtaining each filter's total out-of-sample net profits by chance. By net we mean subtracting the cost and slippage of all round trip trades from the total out-of-sample profits. Here is how the bootstrap technique is applied. Suppose as an example, we calculate the total out-of-sample net profits(toNP) over all out-of-sample weeks for a given filter like above. A mirror filter is created. However, instead of picking an out-of-sample net profit(OSNP) from a row that the filter picks, the mirror filter picks a random row's OSNP in each of the 304 PWFO files. Suppose we repeat this random row section 5000 times. Each of the 5000 mirror filters will choose a random row's OSNP of their own in each of the 304 PWFO files. At the end, each of the 5000 mirror filters will have 304 random OSNP's picked from the rows of the 304 PWFO files. The sum of the 304 random OSNP picks for each of the 5000 mirror filters will generate a random total out-of-sample net profit(toNP). The average and standard deviation of the 5000 mirror different random toNPs will allow us to calculate the chance probability for each of our filter's toNP. Thus, given the mirror filter's bootstrap random toNP average and standard deviation, we can calculate the probability of obtaining our filter's toNP by pure chance alone. Figure 3 lists the 5000 mirror filterís bootstrap average for our 304 out-of-sample files of ($113.3) with a bootstrap standard deviation of $65.9. (Side Note. The average is the average per out-of-sample period(weekly). So, the average for the random selection would be the random (Average Random toNP/304) and the average net weekly for the filter would be the filter toNP/ (# of OOS) periods traded or 37089/158=234.7. The probability of obtaining our filters average weekly net profit of 234.7 is 6.32x10-8 which is 5.28 standard deviations from the bootstrap average. For our filter, in row 3 in Figure 3, the expected number of cases that we could obtain by pure chance that would match or exceed $234.7 is [1-(1- 6.32x10-8)43200 ~ 43200x 6.32x10-8 = 0.0027 where 43200 is the total number of different filters we looked at in this run. This number is much less than one so it is improbable that our result was due to pure chance.
After the WFME has completed it's run click in the Excel icon above Ave File on the WFME form and the Ave File automatically loads into Excel. Below is a snippet of the Ave File output from a WFME run sorted by the total out-of-sample net profit statistic (toNP). This example shows the partial output file from a WFMEx64v8 run on the PWFOv5t files generated with the Nth Order Fixed Memory Polynomial Strategy that was run on 1 contract of the Euro(EC) 1 minute bar futures for the 304 weeks from 8/5/2011 to 5/26/2017. The in-sample(IS) period is 30 calendar days and the out-of-sample(OOS) period is 7 calendar days or one week. Sundays were automatically skipped because this strategy only traded between 7am to 1500 CST
The WFME Columns are defined as follows
Shown below again is a snippet of the WFME Ave File discussed above. To generate an Equity plot of any given Filter we would select the Filter from Column A as shown in the snippet and then click on the Excel Add-Ins and then click on the black circled Meyers Analytics Macro Icon shown in the snippet. The Excel Equity plot and Table would then immediately appear in Excel as shown below. Note the equity plot shows the equity with costs (brown line, new equity highs are shown as green dots) and without costs(blue line, new equity highs are shown as red dots).Any number of Filters could be selected, one at a time by highlighting the column A filter and clicking on the Add-In macro shown , and an Equity chart plus Table would be produced. This Meyers Analytics Excel Equity Chart Add-In macro is supplied with the Walk Forward Metric Explorer v8 and all the other explorers.
The Excel Table Columns are defined as follows
Please see video for a visual explanation.
Click Here For Video: How To Use The Walk Forward PWFO Metric Explorer>
The WFME Input Finder Excel Add-In
Supplied with the WFME is an Excel Add-In Filter. For the Excel Add-In, as shown below, you just click on a special Add-In icon on the Excel Toolbar and a pop up window displays. Fill in the WFME parameters and click on the Run button. The Excel Add-In macro will filter any number of PWFO files loaded in Excel, and will display the PWFO Excel file row that satisfies the typed in criteria.
The The Walk Forward PWFO Metric Explorer package consisting of Manual, WFME EXE file, and WFME Excel Add-Ins is being offered, for $395. Please note that the WFME will only read files generated by the PWFO product. The WFME has a "Key Licence" that only allows it to be installed on three computers.