Calculating PP is made a little more interesting if we define 'top' as the bar high and 'bottom' as the bar low, for every pivot point. However, for simplicity we can assume we are only talking about the close (line chart and not a bar chart). PP is definitely not available from zigzag - forget it - it may well be useful info but we can't call it PP (Howards uses it in his book - he uses it in a slightly different way which is valid but it is not PP as defined by Pardo and others).
Note: How you calculate PP depends on your definition of a Pivot. IMO PP is a rather complicated way to go about it. I am not certain that it is even the best method (where best == the method that returns a consistent and effective measure of the relative value of a system compared to other systems and compared to buy&hold). In fact I think it is a metric that encourages overfitting since ME could be very high if you optimise until you sync with the pivot cycles (unless of course you believe that the cycle lengths will persist, in which case you have found your ElDorado). Also another personal opinion - Pardo's explanation of DOF doesn't hold any value for traders (I haven't found one that does). The discussions, in this forum, on sensitivity analysis, and other evaluation discussions involving Fred and Howard, were much more topical and have much more relevance to real life trading. Another approach you might like to think about: a) for benchmarking against the buy&hold (note that for a freelance trader this is a different cup of tea compared to institutional benchmarking) - since we believe our entry offers us an advantage over the dumbluck B&H and our exits (stops) are fixed by the system rules i.e. they are the same for every trade - we can compare effectiveness of the entries by setting the buy = every bar (use the same price as the system buy price). Reason == to test our entries we need to compare their effectiveness against a random entry. If we make enough random entries then the law of averages means eventually we will end up entering on every bar an equal number of times.. Note: we need to use the same exit rules as per the system. Model efficiency == system metric/every bar entry metric. b) to rank a system against other systems: compare your evaluation metric against the same metric for other systems USING THE SAME DATA/PERIODS (allow for sample error). Note: the metric you use is up to you i.e. personal choice OR as Fred would say "whatever floats your boat". brian_z --- In [email protected], Thomas Ludwig <[EMAIL PROTECTED]> wrote: > > Hi all, > > Rober Pardo suggests in his book "The Evaluation and Optimization of > Trading Strategies" the calculation of "Perfect Profit" (PP) which "is > the sum total of all of the potential profit that could be realized by > buying every bottom and selling every top". By comparing Net Profit of > your trading system with PP you can calculate the "Model Efficiency" > (ME). > > I think PP can be easily calculated as a stand-alone code by applying a, > say, 1% Zigzag. But how can it be done if I want to add ME as an > additional metric in the Custom Backtester? The Equity() function is > used for your trading system and cannot be used for the Zigzag system > at the same time in order to compare both, IMHO. So the only solution I > can think of is to loop through all Zigzag signals and calculate the > profit programmatically. Or am I overlooking something? > > Pardo also suggests to calculate the Remaining Percentage of Degrees of > Freedom (through Used Dgrees of Freedom and Original Degrees of > Freedom). Any idea if and how they can be counted in AFL? > > Regards, > > Thomas >
