The Walk Forward Input Paramter Explorer (WFINP) is a stand alone exe program that can be executed directly from your desktop icon or from the Windows Start Program menu.
Eliminating The Curve Fit Performance Results.
One thing we know about optimization is that the input parameters found that produce the best performance results will produce the best curve fit of the signal and the noise. In real time the noise will not repeat in the exact same manner and the "best" input parameters will create losses in real time from what looked like the holy grail in the optimization output. Thus if we eliminate the in-sample optimization cases with the very best performance results we are sure to eliminate many of the data mining system input parameters that fitted the past spurious and random price movements. The Profit Factor is the perfect performance variable for eliminating the curve fit input parameters because the best performance has the highest Profit Factors. If we eliminate all cases that have a Profit Factor above a certain number we can eliminate many of the curve fitted in-sample input parameter cases.. In addition, since in real time it is tough to sustain more than a large number of losses in a row and still keep trading, we will eliminate all those in-sample section input parameter cases that have more than some user selected losses in a row. The WFINP eliminates the curve fitted results by filtering out of the PWFO file's in-sample sections those input parameters that have Profit Factors(PF) greater than some user chosen value and/or that have losers in a row(LR) of greater than a user chosen value . This type of input filter means one would not be trading a given set of inputs every out-of-sample week until the in-sample section before it has a PF and/or LR below our criteria. The in-sample PF, LR criteria ranges are user selectable generating many filter searches in one run. The WFINP determines which strategy filtered inputs generate the statistically best average out-of-sample returns. The PF and LR are user selectable so you can choose which PF and LR values suit you. This input/pf/lr filter summary is sorted by total out-of-sample net profits after costs for all the various filters and written to a comma delimited file by the WFINP. When The WFINP run is done just click on the WFR Excel Icon and the WFINP output file will appear in Excel as shown below. The WFINP is a standalone exe program that is super fast. In addition the WFINP uses a bootstrap technique to determine the probability that the out-of-sample performance found is due to chance.
WFINP Program Input Definitions
WFINP WFR(Walk Forward Results) File Output Definitions
- WF Files Input
- Directory where the PWFO Files are Located
- Output Directory
- Directory where the WFINP output file is to be written
- Green folder Icons
- A click on these icons allow you to browse for the directory you wish to use
- The Stub in the file name that PWFO created
- Run ID
- A unique ID for this WFINP run
- Start File Date
- The date, in TS Format (1110506 =05/06/2011), that the run is to start with. If you put a zero(0) in that box then the program will use the earliest dated PWFO file in the input directory
- End File Date
- The date, in TS Format, that the run is to end with. * = last dated PWFO file in the input directory
- PF with Text Box [ < or > ]
- The in-sample Profit Factor (PF) filter range you want to examine. For the text box case [<] as shown above, the WFINP examines filters that satisfy each of these criteria: in-sample PF ≤ 1,2,3,4,5, + all. That is if the in-sample PF is greater than the filter number for a given set of inputs then the following out-of-sample section for those inputs is not traded. If the PF Text Box was set to [>] , then the WFINP would examine filters that satisfy each of these criteria: PF ≥ 1,2,3,4,5, all. All means there is a run added where all in-sample PF's are considered for comparison in the final printout. The PF range and step box inputs can be changed by the user. If you did not wish to use the PF filter then you would set the "By" box to zero(0) or blank
- The in-sample losing trades in-a-row (LR) filter range you want to examine. In this case you want to examine filters that satisfy each of these criteria: in-sample losing trades in-a-row LR≤ 5,7,9, all. That is, if the in-sample LR > the filter number for a given set of inputs then the following oos section for those inputs is not traded. Note there is a run added where all LR's are considered for comparison in the final printout. The LR range and step box inputs can be changed by the user. If you did not wish to use the LR filter then you would set the "By" box to zero(0) or blank.
- Min # Trds
- The minimum number of trades (NT) in the in-sample section for each filter. In the example above the WFINP does not filter for the minimum number of trades in the in-sample section. If you only wanted to filter for one NT, say NT≥10 then you would set the NT box to 10. That is, if the in-sample NT < the filter number for a given set of inputs then the following oos section for those inputs is not traded. The Min# Trds NT box input can be changed by the user. If you did not wish to use the NT filter then you would set the By box to zero(0) or blank.
- Max # Trds
- The maximum number of trades (NT) in the in-sample section for each filter. In the example above the WFINP will does not filter for the maximum number of trades in the in-sample section. If you only wanted to filter for one NT, say NT≤ 50 then you would set the NT box to 50. That is, if the in-sample NT > the filter number for a given set of inputs then the following oos section for those inputs is not traded. The NT range and step box inputs can be changed by the user. If you did not wish to use the NT filter then you would set the By box to zero(0) or blank.
- Tnp > 0
- If this box is set to y then all cases that satisfy the filters above but do not have the in-sample total net profits (tnp) in the in-sample section greater than zero are eliminate. If this box is set to n then all cases that satisfy the filters above including the cases where tnp is negative in the in-sample section, are included.
- Big File
- If yes, y, a very large file is generated that lists each period oos profits and number of trades for each filter. This file is needed for the Meyers Analytics Excel Equity Chart Add-In macro described below
- This is the round trip slippage and commissions you wish to subtract from each trade.
- WFR File
- This is the WF Results output file shown in the WFINP write up below
- WFRFile Excel Icon
- When this Icon is clicked the WFINP WF Results output is immediately displayed in Excel
- BigFile Excel Icon
- When this Icon is clicked the Big File output is immediately displayed in Excel
- WF Execution File
- During run time this displays the PWFO file number and file name that the WFINP program is running
- Execution Statistics
- The run time execution status. In this example 85 out of 170 PWFO files have been processed. The elapsed time is 2min 15 seconds and the estimated time left to finish is 2min 15sec seconds
This summary is sorted by total net out-of-sample profits(tOosP) for one contract of the various strategy input parameters and printed out to in a comma delimited file by the WFINP. When the WFINP run is done just click on the WFR File Excel Icon and the WFINP output will appear in Excel as shown below
Below is a snippet of the output from a WFINP WFR File run sorted by total out-of-sample net profits(tOnp). This example shows the partial WFR File output from a WFINP run on the PWFO files generated by the Repeated Median Strategy that was run on the Russell 2000 1 minute bars for the 170 weeks of 5/6/11 to 8/1/14.
The WFINP WFR File Output Columns are defined as follows
- Row 1 Columns A=PWFO Stub, B=PWFO File Start Date, C=PWFO File End Date, D=Number of OOS weeks between Start and End Dates, E,F,and G are the PF, LR and tnp screen input
- Column A Row 2 = The Strategy Inputs names
- Column A Rows 3 to LastRow = The Strategy Input/pf.lr values. Example Row 3,Col A: 40|5|8|30|1510|2|x is: the inputs 40|5|8|30|1510| for all in-sample files that have PF≤2 with Losing trades in a row(LR) ≤x. Here x means any LR in the in-sample sections. That is an x means LR is ignored.
- Columns B through w, Rows 3 to LastRow
- tOosP = Total out-of-sample(oos) profit for these 170 weeks.
- aOosP = Average oss profit for the 170 weeks
- aOTrd = Average oos profit per trade
- aO#T = Average number of oos trades per week
- B0 = The 170 week trend of the out-of-sample weekly profits
- %P = The percentage of oos weeks that were profitable
- t = The student t statistic for the 170 weekly oos profits. The higher the t statistic the higher the probability that this result was not due to pure chance
- std = The standard deviation of the 170 weekly oos profits
- LLp = The largest losing oos period
- eqDD = The oos equity drawdown
- wpr = The largest number of winner oos periods in a row
- lpr = The largest number of losing oos periods in a row
- # = The number of weeks this set of strategy inputs traded. Note for some weeks there can be no cases that satisfy a given criteria.
- eqTrn = The straight line trend of the oos equity curve in $/week.
- eqV^2 = The second order polynomial velocity at the end of the oos equity curve.
- eqR2 = The R squared of the straight line equity fit.
- Dev^2 = A measure of equity curve smoothness. The square root of the average (equity curve minus a straight line)^2).
- Blw = The maximum number of weeks it took for the oos equity curve to make a new high
- BE = Break even weeks. Assuming the average and standard deviation are from a normal distribution, this is the number of weeks you would have to trade to have a 99% probability that your oos equity is above zero.
- Eff = Efficency. The average daily out-of-sample profit divided by the average daily in-sample profit.
- tOosNP = Total out-of-sample profit(tOosP) minus the total trade cost. tOosNP=tOosP - #*aO#T*Cost.
- Prob = The probability that the filter's tOosNP was due to pure chance. For example, for row 3 where tOosNP=50235 there is a 1 in 47619 chance that the tOssNP obtained by this filter was due to chance.
- Notice: Past performance is no guarantee of future results
How To generate an Equity Chart plus a Table with the Equity and Strategy Inputs from the WFR File
Shown below again is a snippet of the WFR 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 Input Explorer v6.
Equity Plot Generated By The Meyers Analytics Excel Add-In Macro Shown Above
Red line plot = Net Equity, Equity minus trade costs. New equity highs are shown as green dots.
Blue line plot = Equity without costs. New equity highs are shown as green dots.
Excel Table Generated By The Meyers Analytics Excel Add-In Macro Shown Above
The Excel Table Columns are defined as follows
- Row 1 is the Date, Filter-Metric, Osnp, Ont and Strategy Inputs found in the in-sample section by the Filter..
- Column AThe Input | PF|LR Filter. Example 40|5|8|30|1510|2x
- Column B The PWFO File dates
- Column C = The out-of-sample(oos) net profit for each date for these in-sample strategy inputs.
- Column D = The out-of-sample(oos) number of trades for each date for these in-sample strategy inputs.
- Column E = The out-of-sample(oos) The oos Equity running total.
- Column F = The out-of-sample(oos) The net oos = oos minus trades*cost
- Columns G = The out-of-sample(oos) Net Equity (equity minus costs) running total
The Walk Forward Input Parameter Explorer comes with a detailed manual explaining:
- How to setup and install the Walk Forward Input Parameter Explorer. The Walk Forward Input Explorer is a stand alone exe program that can be executed directly from your desktop icon or from the Windows Start Program menu.
- How to use the WFINP with your PWFO files.
- An explanation of each of the performance statistics columns.
How To Order
To order online click
. If you would like to talk to me about the product, please call me at (312) 280-1687
M-F 12pm to 5pm CST. All E-mail queries can be sent to email@example.com.
Thank you for your Interest....Dennis Meyers