A clarification on Profit Calculations

12 views
Skip to first unread message

Ashish Dave

unread,
Aug 10, 2010, 10:23:31 PM8/10/10
to Leverage Space Trading
Hello Ralph,
I have a doubt. In the GHPR formula-4.02 and the example in the
chapter 4(THE MULTIPLE COMPONENT CASE) the profit or loss outcome that
is being used is the Price difference.

My question is should we use return instead? The reason I have doubt
is that high price stock will have a large price change as compared to
low price stock. This will then tend to allocate more weight to a
high price stocks even if the returns as compared to low price stocks
is less.

I think I am missing something here

Thanks
Ashish

RVince

unread,
Aug 11, 2010, 7:35:53 PM8/11/10
to Leverage Space Trading
Dave,

Look at Equation 4.01, the equation for the HPRs from which the GHPR
in 4.02 is created.

Note in 4.01 that we divide the PL variable (the difference, the
profit loss outcome) by the negative of most negative of these
values, multiply this by f (so now we actually HAVE our return) and
add it back to 1. This has the effect of scaling to the largest loss,
such that, if -PL==BL, and our f value is 1.0, our HPR would be,
properly, 0.
-Ralph VInce

RVince

unread,
Aug 11, 2010, 8:49:52 PM8/11/10
to Leverage Space Trading
So, in effect, it IS a return -- on an f$ investment. -Ralph Vince

Ashish Dave

unread,
Aug 11, 2010, 11:01:41 PM8/11/10
to leverage-sp...@googlegroups.com
Hello Ralph,
thanks for explaining this important concept.

I was confused because of the paragraph in chapter 2 page 25

 "The most important thing about defining a worst case scenario is to not
get hung up on it. It is required solely to bind the f value between 0 and 1" 

So based upon the above and also because my downside risk is contained I was thinking that I dont want to deal with
Max drawdown and decided to make Max drawdown as 1. This will probably work in single coin situation but in multiple Mkt systems we do
need to provide the Max Drawdown for each market system so that (profit/loss) becomes a return and hence the f value calculated
by the optimization process will then be based on this return values.

Is this line of thought right? If so then its actually very important to provide the correct Max drawdown for each market system.



Thanks
Ashish 

RVince

unread,
Aug 12, 2010, 7:11:28 AM8/12/10
to Leverage Space Trading
No Dave, there is no need to -- it is calculated. It is very important
to provided worst-case scenario. That's what the f calucluation is
based on (and, so too the Kelly Criterion, but with the latter, worst
case is impled as the price of the underlying).

-Ralph Vince

On Aug 11, 11:01 pm, Ashish Dave <ashishda...@gmail.com> wrote:
> Hello Ralph,
> thanks for explaining this important concept.
>
> I was confused because of the paragraph in chapter 2 page 25
>
>  "The most important thing about defining a worst case scenario is to not
> get hung up on it. It is required solely to bind the f value between 0 and
> 1"
>
> So based upon the above and also because my downside risk is contained I was
> thinking that I dont want to deal with
> Max drawdown and decided to make Max drawdown as 1. This will probably work
> in single coin situation but in multiple Mkt systems we do
> need to provide the Max Drawdown for each market system so that
> (profit/loss) becomes a return and hence the f value calculated
> by the optimization process will then be based on this return values.
>
> Is this line of thought right? If so then its actually very important to
> provide the correct Max drawdown for each market system.
>
> Thanks
> Ashish
>

Ashish Dave

unread,
Aug 12, 2010, 8:28:34 AM8/12/10
to leverage-sp...@googlegroups.com
So we do need to provide worst case scenarios. But this is my problem.
Since my strategy is tick by tick the worst case scenarios come to the order
of .01 or so. Then when we calculate units to trade the value that will come out will be large

units to trade=   total capital/f$ => (100/.01) * optimalf

The point of Max drawdown is to limit the capital invested based on DD, but in this case it will increase.
This is because the drawdown is in fraction.

What do we do here?

Thanks
Ashish

Joshua Ulrich

unread,
Aug 12, 2010, 9:20:09 AM8/12/10
to leverage-sp...@googlegroups.com
Ashish,

Just a quick point of clarification: you seem to be using maximum loss
(worst case scenario) and maximum drawdown interchangeably. Maximum
loss is based on one period, while maximum drawdown is based on
multiple periods.

Your use of the two phrases could become confusing if you were talking
about a portfolio that included a drawdown constraint.

Best,
--
Joshua Ulrich
FOSS Trading: www.fosstrading.com

Ashish Dave

unread,
Aug 12, 2010, 9:44:32 AM8/12/10
to leverage-sp...@googlegroups.com
Hello Joshua,
thanks for pointing that out. 

so  f$ definition is  Biggest loss per period/optimal f.    (1) or
                           Maximum Drawdown/ optimal f        (2)

I think its (1) as per the book ? With the first definition if Biggest loss is in fraction then I am at a loss as how to
allocate capital as per my previous posting

Thanks
Ashish

Joshua Ulrich

unread,
Aug 12, 2010, 9:46:51 AM8/12/10
to leverage-sp...@googlegroups.com
Yes, the definition is (1). Sorry that I cannot help with your actual question.

--
Joshua Ulrich
FOSS Trading: www.fosstrading.com

RVince

unread,
Aug 12, 2010, 10:59:55 AM8/12/10
to Leverage Space Trading
Dave,

If your biggest loss is on the order of a couple of ticks, yes, your
growth optimal allocation will be large (so too will your resultant
drawdowns then!). In fact, as we discussed in Tampa, as the size of
the largest loss --> 0, the optimal f value --> the sum of the
probabilitites of the winning scenarios (recall we discussed the arc
sine laws with respect to this even). -Ralph Vince

On Aug 12, 9:46 am, Joshua Ulrich <josh.m.ulr...@gmail.com> wrote:
> Yes, the definition is (1).  Sorry that I cannot help with your actual question.
> --
> Joshua Ulrich
> FOSS Trading:www.fosstrading.com
>
> On Thu, Aug 12, 2010 at 8:44 AM, Ashish Dave <ashishda...@gmail.com> wrote:
> > Hello Joshua,
> > thanks for pointing that out.
> > so  f$ definition is  Biggest loss per period/optimal f.    (1) or
> >                            Maximum Drawdown/ optimal f        (2)
> > I think its (1) as per the book ? With the first definition if Biggest loss
> > is in fraction then I am at a loss as how to
> > allocate capital as per my previous posting
> > Thanks
> > Ashish
>
> > On Thu, Aug 12, 2010 at 9:20 AM, Joshua Ulrich <josh.m.ulr...@gmail.com>
> > wrote:
>
> >> Ashish,
>
> >> Just a quick point of clarification: you seem to be using maximum loss
> >> (worst case scenario) and maximum drawdown interchangeably.  Maximum
> >> loss is based on one period, while maximum drawdown is based on
> >> multiple periods.
>
> >> Your use of the two phrases could become confusing if you were talking
> >> about a portfolio that included a drawdown constraint.
>
> >> Best,
> >> --
> >> Joshua Ulrich
> >> FOSS Trading:www.fosstrading.com
>
> >> On Thu, Aug 12, 2010 at 7:28 AM, Ashish Dave <ashishda...@gmail.com>
> >> wrote:
> >> > So we do need to provide worst case scenarios. But this is my problem.
> >> > Since my strategy is tick by tick the worst case scenarios come to the
> >> > order
> >> > of .01 or so. Then when we calculate units to trade the value that will
> >> > come
> >> > out will be large
> >> > units to trade=   total capital/f$ => (100/.01) * optimalf
> >> > The point of Max drawdown is to limit the capital invested based on DD,
> >> > but
> >> > in this case it will increase.
> >> > This is because the drawdown is in fraction.
> >> > What do we do here?
> >> > Thanks
> >> > Ashish

Ashish Dave

unread,
Aug 12, 2010, 1:43:44 PM8/12/10
to leverage-sp...@googlegroups.com
So if this is the case(that is, optimal allocation will be large for tick size profits/loss) then in formula (4.02a) of GHPR 
I can replace −PLk,i / BLi with  Rtn/1 (Rtn:Return for this period)

By doing so I will still get some f values which will be optimal among the mkt systems.
Then to calculate the capital to allocate for a given Mkt system I can do the following

( f1/(f1+f2+f3) ) * Total Capital

where(f1,f2,f3 are for different Mkt systems). I am doing this so that all them sum to 1

This may not be called optimalf but it should still give me some curve which is optimal in some sense (
though not in the sense of Kelly or Optimalf) for this kind of scenario (for tick returns).

I dont want to take huge sizes and also I want those weights to come from some formula and not be through subjective winsorization.
Do you think above will work? If not why? 

Thanks
Ashish

RVince

unread,
Aug 12, 2010, 3:08:31 PM8/12/10
to Leverage Space Trading
WHy are you using 1 for BL ? Yes you will get a curve but I am not so
sure what it reprsents -Ralph Vince

On Aug 12, 1:43 pm, Ashish Dave <ashishda...@gmail.com> wrote:
> So if this is the case(that is, optimal allocation will be large for tick
> size profits/loss) then in formula (4.02a) of GHPR
> I can replace -PLk,i / BLi with  Rtn/1 (Rtn:Return for this period)
>
> By doing so I will still get some f values which will be optimal among the
> mkt systems.
> Then to calculate the capital to allocate for a given Mkt system I can do
> the following
>
> ( f1/(f1+f2+f3) ) * Total Capital
>
> where(f1,f2,f3 are for different Mkt systems). I am doing this so that all
> them sum to 1
>
> This may not be called optimalf but it should still give me some curve which
> is optimal in some sense (
> though not in the sense of Kelly or Optimalf) for this kind of scenario (for
> tick returns).
>
> I dont want to take huge sizes and also I want those weights to come from
> some formula and not be through subjective winsorization.
> Do you think above will work? If not why?
>
> Thanks
> Ashish
>

Ashish Dave

unread,
Aug 12, 2010, 3:50:15 PM8/12/10
to leverage-sp...@googlegroups.com
Or I think I can do the following to stay in the spirit of optimalf
Use formala 4.01 as is. Then I calculate asset allocation  as the following  example 


Total cap:100
f1=.4 ,BL1=.01
f2=.6, BL2=.02

Asset1 wt=100 * (0.4/.01)= 4000
Asset2 wt= 100* (0.6/.02)= 3000

Since my capital is only 100 i do the following
Final Asset1 wt=(4000/7000) * 100 = 57.14286
Final Asset2 wt=(3000/7000) * 100 =  42.85714

Will this work?


Thanks
Ashish

RVince

unread,
Aug 13, 2010, 7:24:08 AM8/13/10
to Leverage Space Trading
Dave,

Eq 1.09 is f$ =|BL| / f

So:


> Total cap:100
> f1=.4 ,BL1=.01
> f2=.6, BL2=.02

.01 / .4 = .025
.02 / .6 = .0333
Those are your f$ values respectively. With 100 units in your account,
you divide 100 by .025 for how many units of assut 1 to trade, and
divide 100 by .0333 for how many inits of asset 2 to trade, to be at
the poitn that WAS growth optimal when you determined these values.
But there is no one saying you must be growth optimal if this is too
aggressive. -Ralph

Ashish Dave

unread,
Aug 13, 2010, 8:12:01 AM8/13/10
to leverage-sp...@googlegroups.com
Hello Ralph,
thanks for confirming. Your calculations and my earlier posting calculations match
4000 for the first asset and 3000 for the second asset. 

Now to your point if we dont want to be growth optimal then we need a quantitative criteria
which matches between less risk and max growth.

One of it may be the margin calculations Joshua has posted in his blog using your formula.
I think to take optimalf to the next level this is one of the most important area to research.?
We need to do figure out all those kinds of curve and then let user decides which one to choose.
This is what the Rmetrics group is doing with their efficient frontier/convex hull etc.


Thanks
Ashish

RVince

unread,
Aug 13, 2010, 9:35:24 AM8/13/10
to Leverage Space Trading
Dave,

I couldnt agree more. As for other points that satisfy some criteria
other than growth optimality:
1. I have not found any points that are "stationary. For example, the
points of inflectoin move towards optimal f as the number of holding
periods increase. Even the optimal f value itself migrates -- what we
are taking about as optimal is optimal only asymptotically, as the
number of holding periods approach inifintity. (I would like to
conscript Josh to amend the code for the optimal points at a given
horizon, to be consistent with all other calculations necessary in
this discipline, i.e. drawdown at a horizon, and the notion of
selectoin criteria {i.e. media} at a horizon, etc.).
2. I have concluded, particularly in light of 1, above, and the fact
that we are all inadvertently migrating about leverage space, that
what we need/want is not so much stationary points in leverage space,
but equations for paths through it to satisfy the criteria we seek. -
Ralph

On Aug 13, 8:12 am, Ashish Dave <ashishda...@gmail.com> wrote:
> Hello Ralph,
> thanks for confirming. Your calculations and my earlier posting calculations
> match
> 4000 for the first asset and 3000 for the second asset.
>
> Now to your point if we dont want to be growth optimal then we need a
> quantitative criteria
> which matches between less risk and max growth.
>
> One of it may be the margin calculations Joshua has posted in his blog using
> your formula.
> I think to take optimalf to the next level this is one of the most important
> area to research.?
> We need to do figure out all those kinds of curve and then let user decides
> which one to choose.
> This is what the Rmetrics group is doing with their efficient
> frontier/convex hull etc.
>
> Thanks
> Ashish
>

Joshua Ulrich

unread,
Aug 14, 2010, 10:57:40 AM8/14/10
to leverage-sp...@googlegroups.com
On Fri, Aug 13, 2010 at 8:35 AM, RVince <rvin...@hotmail.com> wrote:
> Dave,
>
> I couldnt agree more. As for other points that satisfy some criteria
> other than growth optimality:
> 1. I have not found any points that are "stationary. For example, the
> points of inflectoin move towards optimal f as the number of holding
> periods increase. Even the optimal f value itself migrates -- what we
> are taking about as optimal is optimal only asymptotically, as the
> number of holding periods approach inifintity. (I would like to
> conscript Josh to amend the code for the optimal points at a given
> horizon, to be consistent with all other calculations necessary in
> this discipline, i.e. drawdown at a horizon, and the notion of
> selectoin criteria {i.e. media} at a horizon, etc.).

I'd be happy to work on implementing this, but I would need a bit more
direction regarding how to do so.

> 2. I have concluded, particularly in light of 1, above, and the fact
> that we are all inadvertently migrating about leverage space, that
> what we need/want is not so much stationary points in leverage space,
> but equations for paths through it to satisfy the criteria we seek. -
> Ralph
>
> On Aug 13, 8:12 am, Ashish Dave <ashishda...@gmail.com> wrote:
>> Hello Ralph,
>> thanks for confirming. Your calculations and my earlier posting calculations
>> match
>> 4000 for the first asset and 3000 for the second asset.
>>
>> Now to your point if we dont want to be growth optimal then we need a
>> quantitative criteria
>> which matches between less risk and max growth.
>>
>> One of it may be the margin calculations Joshua has posted in his blog using
>> your formula.

Yes, this is exactly why I implemented the margin constraints.

>> I think to take optimalf to the next level this is one of the most important
>> area to research.?
>> We need to do figure out all those kinds of curve and then let user decides
>> which one to choose.
>> This is what the Rmetrics group is doing with their efficient
>> frontier/convex hull etc.
>>
>> Thanks
>> Ashish
>>

Best,

Reply all
Reply to author
Forward
0 new messages