[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Expectancy - and related



PureBytes Links

Trading Reference Links

An extension to my post (since it is such an important topic I better 
clarify the grey areas).

I am (sort of) writing my (bits and pieces) book via the UKB, and 
this forum, (which are both live sites) so it is an interactive 'work 
in progress'.

(our concepts of publishing, ownership and payback are morphing in 
the new [IT] age?).

I understand that the forums are 'public domain' so anyone can use my 
original ideas anyway they like - I can't even stop people on-selling 
them - the only antidote for that is that I have already given them 
away for free.

At this stage PowerFactor has no exceptionally useful maths 
antecedents and is confined to being a useful mnemonic for the 
geometric mean (of a compounded trading account) and 
BinomialSimulation inputs.

It could eventually sporn a formula along the lines of:

POF(offshoot) == (W/L +- variance) (operators)(PayOffRatio as%  
+_variance) == equity curve variance;

Possibly it will end up in a maths culdesac.

(Yes, if I did settle on (1+%/100)^N as the final form of POF then it 
would be exactly the same as mean TWR and that would serve no 
purpose - other than to get rid of RalphVinces crappy, 
and 'unintuitive' name).

However there are already unexpected (unequivocal) offshoots e.g.

W/L variance == sample error.

Here is another, possibly useful, metric that's come out of that 
stable:

- it is an inline/upfront R/R 'equity curve related' metric (haven't 
tried it myself yet)

>From RalphVince (using the trade series as % and expressed as 
GrowthFactor (HPR):

 estimatedGeometricMean(estimatedPOF) == (arithmeticMean^2 - StDevP^2)
^(1/2)

then the ratio arithmetic mean/estGeometricMean is a measure of 
growth, conbined with variance, based on the trade series as%.

aM/gM will tend towards 1 (the optimum) when the standard deviation 
of the population of trades (as% GrowthFactor) tends towards zero?

If it stands up to future testing, and has long-term value, I might 
call it the ArithmeticGeometricMean ratio:

AGMR = aM/gM;//subject to future revison

Hope you find something of interest in my thoughts.

BTW - I started off using ProfitFactor, and I was rather fond of it.
I think that provides a good example of how 'we' have to move away 
from old favourites and towards the things that objective analysis 
points out to us.

Regards,

brian_z


--- In amibroker@xxxxxxxxxxxxxxx, "brian_z111" <brian_z111@xxx> wrote:
>
> Good morning Howard,
> 
> Thanks for your comments.
> 
> Indeed, I am not proposing that the various growth metrics are 
> suitable to use as Objective Functions, at this stage (I wouldn't 
do 
> that without some attendant controls on variance).
> 
> What I am doing is:
> 
> a) pointing out the relationship between expectancy($), as 
> popularised by Van Tharp, and ProfitFactor.
> b)  showing why, IMO, Profit Factor has limited uses (once again it 
> is quite a popular metric).
> c) making some unequivocal objections to ProfitFactor and expectancy
> (as $) (I have read commentators who say they don't, or won't, use 
> ProfitFactor but who then fail to give any valid reasons, which I 
> find very annoying - so I am doing my bit to set the record 
straight).
> d) objecting to the use of expectancy(as %) since expectancy(as 
> $)/ProfitFactor are derived from summed P&L's whereas an equity 
curve 
> is the product of the % trades (expectancy as % also breaks the 
> mathematical relationships inherent in ProfitFactor) - in fact it 
> doesn't work at all (it is a mathematical dead end) and 
ProfitFactor 
> breaks down entirely if ave%W/ave%L is used.
> 
> (I take that to mean that expectancy($)/ProfitFactor are metrics 
that 
> apply to fixed contract trading whereas PowerFactor is the 
expectancy 
> of reinvesting (compounding)
> 
> e) doing my bit to get rid of ProfitFactor - I used the term 
> PowerFactor to delineate it from ProfitFactor which really needs to 
> be put to bed as far as a metric for compounded equity curves goes.
> 
> f) flagging the difficult issues that traders face when dealing 
with 
> back adjusted data (using relative measures overcomes some problems 
> but also invalidates some well known trading equations).
> 
> g) repeating my claim that focusing on equity curves is rather like 
> putting the cart before the horse.
> 
> What I am definitely saying is that PowerFactor (the geometric 
mean) 
> is the real expectancy (as %) that traders should use if they want 
to 
> establish that they have a valid system - it is a lot easier to 
> subtract commissions too.
> 
> I have some reservations about the equity curve metrics and in the 
> longer term I am looking to make some statements about effective 
> metrics that we can apply at the trade end i.e. using W/L and the 
> PayOff ratio as the key metrics, along with variance, to predict 
> equity curve smoothness.
> 
> One example of the problem with some of the equity curve metrics:
> 
>  - if by RRR you mean Risk Reward Ratio == slope/standard error 
then 
> as standard error tends towards zero RRR tends towards infinity, 
> irrespective of what the slope is doing so RRR is a metric that 
> rewards smoothness in preference to growth (any metric that has 
> variance on the bottom line will do that won't it?).
> 
> Another potential problem, as I see it, is that the equity curve 
> comes after money management, so MM could be contributing to eq 
> smoothness, or lack of it (wouldn't it be better to measure 
> the 'systems' smoothness before position sizing is applied to the 
> trade series?).
> 
> I am not measuring the 'rightness' or 'wrongness' of what you are 
> saying - I am just letting you know that I am happy to share my 
> alternative thoughts on the subject with you and the forum.
> 
> brian_z
> 
>  
>  
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Howard B" <howardbandy@> wrote:
> >
> > Greetings all --
> > 
> > It is possible to use a metric such as Power Factor, or the 
closely 
> related
> > Terminal Relative Wealth, or Net Profit, as the objective 
function 
> when
> > optimizing and choosing among alternatives.
> > 
> > But beware.
> > 
> > Optimizing to maximize any of these will very often reward a 
system 
> that has
> > not only a high return, but also a high drawdown.  I recommend 
> using one of
> > the metrics that automatically rewards both high equity growth 
and 
> equity
> > smoothness.  The equity smoothness part minimizes drawdowns.
> > 
> > Try RRR, KRatio, Ulcer Performance Index, CAR/MDD, or RAR/MDD.
> > 
> > Thanks,
> > Howard
> > 
> > 
> > 
> > 
> > On Sat, Apr 5, 2008 at 6:49 PM, brian_z111 <brian_z111@> wrote:
> > 
> > >   The mathematical expression(s) OR antecedents of PowerFactor 
> are:
> > >
> > > where
> > >
> > >
> > > Wins == 55
> > > Losses == 45
> > > ave%Won == 3
> > > ave%Lost == 2
> > > PowerFactor (notational format) is 3^55/2^45
> > > InitialEquity == 1
> > >
> > > then
> > >
> > > finalequity == 1 * 1.03^55 * 0.98 *45 == 2.047485;//PowerFactor
> > > equation
> > > POF (geometric mean) == (2.04785/1)^(1/100) == 1.00719 etc;
> > >
> > > There is a temporary post at the UKB with the POF equation
> > > demonstrated in a spreadsheet.
> > >
> > > Note: it is not recommended to use GM as an ObjectiveFunction 
> without
> > > a full understanding of the caveats (stated and implied) by
> > > RalphVince's work on optimalF.
> > >
> > > Also my take on it, including BinomialSimulation, won't be 
> debugged,
> > > at the very least, until after I post on the subject at the UKB 
> (if
> > > at all).
> > >
> > > brian_z
> > >
> > > http://www.amibroker.org/userkb/
> > >
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx <amibroker%40yahoogroups.com>,
> > > "brian_z111" <brian_z111@> wrote:
> > > >
> > > > PowerFactor is part of, what is for me, a rather ambitious 
> project.
> > > >
> > > > I can't do it justice in an off the cuff post (that would be 
> prone
> > > to
> > > > confusing both of us) - so you don't go away empty handed 
> (everyone
> > > > gets a prize).
> > > >
> > > > RalphVince's work is based on estimating the optimal fraction 
of
> > > our
> > > > captial to invest in any trade and the measure of success is 
the
> > > > maximum geometric mean.
> > > >
> > > > GM = (final equity/initial equity)^ (1/number trades)
> > > >
> > > > It can be standardised to annual return by plugging in the 
ave 
> time
> > > > per trade + turn around time.
> > > >
> > > > He gives a method whereby we can estimate the GM from the 
trade
> > > > returns (average $value or ave%) and the SD of the trade 
series.
> > > >
> > > > One of the criticisms of OptimalF is that it relies on the 
trade
> > > > series largest loss, as the critical factor, but the largest 
> loss
> > > > might not be the largest that we can experience in the 
future, 
> so
> > > in
> > > > this regard it is an agressive money management technique.
> > > >
> > > >
> > > > That is where I am making an effort to clarify his work for 
my 
> own
> > > > use.
> > > >
> > > > I am using BinomialSimulation as a type of 'visual maths' to
> > > > crosscheck my 'equations' against his and other accepted maths
> > > tools.
> > > >
> > > > I am attempting to get a more accurate estimate of the 'worst 
> case'
> > > > scenario, in a way that has meaning to me.
> > > >
> > > >
> > > > This is where ProfitFactor and PowerFactor come in 
(PowerFactor 
> is
> > > > really just the geoemtric mean in notation form - the notation
> > > > reminds me of the important part the W/L ratio and the PayOff 
> ratio
> > > > play in the final trading outcomes (equity curve profiles 
> derived
> > > > from them).
> > > >
> > > > Outside of that it doesn't have any importance.
> > > >
> > > > As far as the valule of the geometric mean goes it would be 
far
> > > > better to reference RV's work.
> > > >
> > > > From RV "The Mathematics of Money Management" - "The real 
growth
> > > > function in trading (or any event where the PeriodReturn is 
not
> > > > constant) is the multiplicative product of the PeriodReturns.
> > > >
> > > > So PowerFactor is just the notational form of that, say:
> > > >
> > > > Wins = 55
> > > > Losses = 45
> > > > ave%Won = 3
> > > > ave%Lost = 2
> > > > PowerFactor = 3^55/2^45
> > > >
> > > > As I said, it is just a notation to remind me of the 
importance 
> of
> > > > the PayOff ratio (3/2) and the fact that I can control that, 
at 
> the
> > > > design stage, via my stops - compared to W/L where the 
variance 
> is
> > > a
> > > > function of sample error.
> > > >
> > > > Where I am heading in future posts is:
> > > >
> > > > a) to show the relationship between fixed amount (contracts or
> > > number
> > > > of shares) trading and reinvestment trading (compounded equity
> > > > curves) and how that the difference is summarized by
> > > > ProfitFactor/PowerFactor OR geometric mean
> > > >
> > > > b) to find a simpler way (equation) to calculate the worst 
case
> > > risk
> > > > (drawdown?), relative to time, using only the basic inputs 
from 
> the
> > > > trade series i.e. win, loss and amount won/lost as % (no 
> MonteCarlo
> > > > etc required).
> > > >
> > > > The pathway there is to include variance in the PF type 
> equations.
> > > >
> > > > Hope I haven't made that too complicated - I am building to a 
> more
> > > > measured and understandable presentation at the UKB (look for
> > > > upcoming posts on expectancy, blackswans, random generators 
> etc).
> > > >
> > > > Where did I settle in Australia?
> > > >
> > > > I am in regional NorthQueensland 'amongst the plum trees with 
> lots
> > > of
> > > > gum leaves' etc.
> > > > NFA actually appeals to me more but my partner has other 
ideas.
> > > >
> > > > brian_z
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --- In amibroker@xxxxxxxxxxxxxxx <amibroker%
40yahoogroups.com>, 
> Grant
> > > Noble <gruntus@> wrote:
> > > > >
> > > > > > Hope that gives you something stimulating to think about.
> > > > >
> > > > > Dude, I'm totally overstimulated! Do you have a formula for
> > > > PowerFactor?
> > > > > BTW where did you end up settling in Australia?
> > > > > GRANT
> > > > >
> > > > > brian_z111 wrote:
> > > > > > Grant,
> > > > > >
> > > > > > Apologies for late comments (I've been to the beach but
> > > mentally
> > > > > > flagged your question before I left).
> > > > > >
> > > > > > You might be interested in my generic opinion.
> > > > > >
> > > > > > My trumpeting on expectancy, ProfitFactor and PowerFactor 
> are
> > > > based
> > > > > > on my efforts to identify and understand the root causes 
of
> > > > equity
> > > > > > curve growth and variance (underneath it all is there 
> anything
> > > > else
> > > > > > that really concerns us).
> > > > > >
> > > > > > It is rather like the difference between the average 
driver 
> and
> > > a
> > > > > > professional driver. Average drivers, on their annual 
> holidays,
> > > > are
> > > > > > typically concerned about MPH, hours to arrival and fuel 
> costs
> > > > > > whereas a professional driver (F1 racer) is a 'power user;
> > > > concerned
> > > > > > about performance drivers e.g. engine power (HP or 
watts), 
> oil
> > > > > > pressure, fuel efficiency, road conditions etc, oil 
> temperature.
> > > > > >
> > > > > > My personal approach is to focus my enquiry on the 'power'
> > > > factors of
> > > > > > trading performance.
> > > > > >
> > > > > > Hence the topic of my discussion with Gerry, who made some
> > > > > > interesting observations on PowerFactor and the key 
metrics
> > > that
> > > > are
> > > > > > associated with it.
> > > > > >
> > > > > > In Excel simulations of no win (breakeven) fair coin 
tosses,
> > > that
> > > > I
> > > > > > have performed in the past, I was astounded at the range 
of
> > > > possible
> > > > > > equity outcomes (no two equity curves are the same and 
they
> > > form
> > > > a
> > > > > > cone that fans out on either side of the breakeven line 
and
> > > that
> > > > > > continues to expand with time OR N tosses of the coin).
> > > > > >
> > > > > > This is what Ralph Vince was referring to when he 
> said "that is
> > > > just
> > > > > > how perverse the equity curve of a fair coin is".
> > > > > >
> > > > > > He also gives the 1st and 2nd arcsine laws that predict 
the
> > > > amount of
> > > > > > time we can expect the equity curve to stay on one side 
of 
> the
> > > > b/e
> > > > > > line and the max/min of the equity curve.
> > > > > >
> > > > > > Ralp Vince "The Mathematics of Money Management".
> > > > > >
> > > > > > The equity curve outcomes that I achieved in my 'push the 
> excel
> > > > buton
> > > > > > and see' trials were very similar to the simulated equity
> > > curves
> > > > in
> > > > > > Howards QTS book - page 309.
> > > > > >
> > > > > > My argument is:
> > > > > >
> > > > > > - we can only trade successfully with an edge
> > > > > > - the edge is based on the 'predictable behaviour' of a 
> market
> > > > event
> > > > > > e.g. chart pattern'
> > > > > > - a predicatable pattern will exhibit the properties of a 
> coin
> > > > toss
> > > > > > (albeit a biased coin)
> > > > > > - the equity outcomes of a biased coin toss are varied
> > > > > >
> > > > > > therefore any evaluation method that doesn't reference 
> variance
> > > > is
> > > > > > unlikely to be useful to me.
> > > > > >
> > > > > > That is why I have an interest in Binomial Simulation and
> > > metrics
> > > > > > like ProfitFactor and PowerFactor (they are close to the 
> inputs
> > > > of a
> > > > > > Binomial Simulator - which is alternative approach to MCS 
> and
> > > it
> > > > > > doesn't rely on a rescrambling of the sample set.
> > > > > >
> > > > > > So, based on my chosen approach I see no point in 
> considering
> > > the
> > > > > > metrics of one equity curve - if you go OOS OR toss the 
coin
> > > > again
> > > > > > you will get an entirely different equity outcome.
> > > > > >
> > > > > > That is why I am more interested in what causes equity 
> lines to
> > > > grow
> > > > > > (increases the geometric mean) and controls equity curve
> > > drawdown
> > > > (so
> > > > > > I can put the setting where I want it).
> > > > > >
> > > > > > K-ration is a measure of equity curve smoothness whereas
> > > > > > RiskRewardRatio is a 'root cause' metric.
> > > > > >
> > > > > > There are a lot of different opinions about what 
constitutes
> > > > reward
> > > > > > and risk but if you are talking about RR as defined in
> > > > Markowitz's
> > > > > > Modern Portfolio Theory then it is something I don't have 
a
> > > great
> > > > > > deal of understanding on but I definitely regard drawdown
> > > as 'the
> > > > > > risk', probability as teh drive and variance as a 
quantity 
> not
> > > to
> > > > be
> > > > > > ignored.
> > > > > >
> > > > > > BTW my efforts with BS are complementary to Ralph Vinces 
> work
> > > > > > (possibly it will make a little corner of his work more
> > > > accessable to
> > > > > > the maths layperson). IMO RV's work is brilliant. He is 
the
> > > > analyst
> > > > > > who 'blew me out of the water'.
> > > > > >
> > > > > > Hope that gives you something stimulating to think about.
> > > > > >
> > > > > > brian_z
> > > > > >
> > > > > > --- In amibroker@xxxxxxxxxxxxxxx <amibroker%
> 40yahoogroups.com>,
> > > Grant Noble <gruntus@> wrote:
> > > > > >>> The K-ratio isn't worth the space it takes up: RRR is 
> simpler.
> > > > > >> care to elaborate?
> > > > > >>
> > > > > >> gerryjoz wrote:
> > > > > >>> In an earlier post, expectancy was associated with 
profit
> > > > factor.
> > > > > >>> It is more closely related to payoff ratio.
> > > > > >>> In Van Tharp's book, 2nd edition, "Trade your way...", 
> page
> > > 204
> > > > et
> > > > > >>> seq, he calculates
> > > > > >>> Expectancy = average profit/ # trades
> > > > > >>> divided by average loss.
> > > > > >>> Payoff ratio is average profit/average loss,
> > > > > >>> so
> > > > > >>> Expectancy = payoff ratio/# trades.
> > > > > >>> --which can give very low numbers, and makes the concept
> > > rather
> > > > > >>> dubious if you are using it as an absolute value for
> > > comparing
> > > > > > systems
> > > > > >>> with different numbers of trades. It might be better to 
> use
> > > > > > trades per
> > > > > >>> annum.
> > > > > >>> To be fair Van Tharp only gives that way of calculating
> > > > > > expectancy as
> > > > > >>> a default if the risk of a trade isn't able to be 
> calculated
> > > > > > taking
> > > > > >>> into account a pre-determined proportion of equity. For 
> that,
> > > > you
> > > > > > need
> > > > > >>> to read the whole chapter.
> > > > > >>> Personally i find CAR/MDD, RRR more relevant, along 
with 
> the
> > > raw
> > > > > >>> Payoff ratio.
> > > > > >>>
> > > > > >>> The K-ratio isn't worth the space it takes up: RRR is 
> simpler.
> > > > > >>>
> > > > > >>> regards
> > > > > >>> Gerry
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>> ------------------------------------
> > > > > >>>
> > > > > >>> 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
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> > >  
> > >
> >
>



------------------------------------

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/