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

[amibroker] Re: Expectancy - and related



PureBytes Links

Trading Reference Links

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, "brian_z111" <brian_z111@xxx> 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, 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, 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/