PureBytes Links
Trading Reference Links
|
As long as you get where you want to go.
A fourth opinion FWIW:
PP is a specific term used by Pardo.
He doesn't define it precisely, or give a method (he just says buy
the bottom and sell the top).
I have used the sum of the absolute value of the daily ROC to
calculate PerfectEquity (PP) for daily bars, on the close (I have
used it to calculate a Straight Line Ratio or SLR which is a measure
of absolute PP for EOD traders).
ZigZag will give you a smoothed variant of PP (if we allow ourselves
free rein with Pardo's idea).
Howard uses ZZ, in his book, specifically for stock selection based
on cycle analysis.
He does say that "issues with regular price patterns lend themselves
to profitable quantitative analysis" but he leaves the trading
solutions up to us.
If you use ZZ in model efficiency analysis you are measuring your
systems efficiency in synchronizing to the cycle/patterns for that
dataset and that test period (if it wasn't synchronized then it
wouldn't return a good ME - 100% ME would be a set of rules that
perfectly models the ZZ cycles).
Same for all ME's irrespective of the definition of the PP.
It could be an interesting approach - I don't know I haven't tried it
so far. To me it is a 'pursuit of the Holy Grail' approach.
My bias is to be a street fighter and just take whatever I can get
until something better comes along (I have the trading loyalty of an
alleycat!).
Howard's method/code can be adapted to give you one answer (if you
were always in the trade, with a reversal signal, then eq will give
you the abs sum of the zigs and the zags).
Otherwise you have to calc by defining the PivotPoint (as Howard
does) and then summing the absolute difference between the value
(when) of the current and previous pivot (at least that is one way I
have done it in the past).
If you just want to trade one way e.g. bullish, Howard's example
contains your answer.
brian_z
--- In amibroker@xxxxxxxxxxxxxxx, Thomas Ludwig <Thomas.Ludwig@xxx>
wrote:
>
> Brian,
>
> thanks for your answer.
>
> > 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).
>
> I'm not sure why you think that PP is not available from zigzag.
While
> there might be more complicated methods to calculate PP (depending
on
> your definition), zigzag is a good approximation in my opinion. And
I
> need a handy formula since I want to add it as one additional
metric to
> my WF IS and OOS equity curves.
>
> Regards,
>
> Thomas
> >
> > 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 amibroker@xxxxxxxxxxxxxxx, Thomas Ludwig <Thomas.Ludwig@>
> >
> > 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
> >
> > ------------------------------------
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> > Yahoo! Groups Links
> >
> >
> >
>
------------------------------------
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|