PureBytes Links
Trading Reference Links
|
Hi Stephane
If you run a back test on tj's simple pyramid it does not seem to
work this way.
Using your example
> if you want to pyramid , I suppose you want ( it is an example)
> july1= buy1 with positionsize1 at entryprice1
> july15=buy2 with positionsize2 at entryprice2
>
> with ( simple case ) positionsize1=positionsize2;
>
> july30=sell ( all the position size)
A correct implementation of TJ's pyramid will have the JULY 1 buy
liquidated on JULY 15, not JULY 30. Then double the positionsize and
buy on July 15 and Sell on July30.
backtest tj's example on any stock - you will see
monday long (wed out)
wed long (friday out)
Maybe I have missed something?
Steve
--- In amibroker@xxxx, "nenapacwanfr" <nenapacwanfr@xxxx> wrote:
>
>
>
>
> if you want to pyramid , I suppose you want ( it is an example)
> july1= buy1 with positionsize1 at entryprice1
> july15=buy2 with positionsize2 at entryprice2
>
> with ( simple case ) positionsize1=positionsize2;
>
> july30=sell ( all the position size)
>
> what does the backtester: It takes the first entry( july1) and sell
> on july30
> for buy1 the gain will be (Exitprice/entryprice1 - 1)*positionsize
> for buy2 the gain will be (Exitprice/entryprice2 - 1)*positionsize
>
> if we want to simulate adding position, we must compute the
> newpositionsize at buy1 with this equation
> Xp=exitprice;
> Ep1=entryprice at buy1;
> Ep2=entryprice at buy2;
> P=positionsize( assume it is fixed)
> N=new computed positionsize
>
> (Xp/Ep1)*P + (Xp/Ep2)*P = ( Xp/Ep1)*N ;
>
> N = P * ( Xp/Ep1 + Xp/Ep2 ) * (Ep1/Xp);
> N = P * (Ep1/Ep2) ;
>
>
> > I read you post a few times, but I am not sure I understand the
> > problem.
> >
> > Let's say I pyramid once only, with double the position size, I
> > assumed that the first buy is set with postionsize, then
> liquidated
> > via a Sell statement at some future date (according to some
> cond1),
> > resulting a accurate LONG profit. You then adjust postionsize and
> buy
> > again on the same day, liquidating again later according to some
> > cond2, with an accuate LONG profit again.
> >
> >
> > can you clarify for me what the issue is?
> >
> >
> > Steve
> > --- In amibroker@xxxx, "nenapacwanfr" <nenapacwanfr@xxxx> wrote:
> > > It seems the backtester takes one entry and one exit
> > > and the profit is calculated for LONG with
> > > ((ExitPr/EntryPr1)-1)*Positionsize
> > >
> > > if you take adding position
> > > that means
> > > you'll have multiples
> > > ((ExitPr/EntryPr2)-1)*Positionsize
> > > ((ExitPr/EntryPr3)-1)*Positionsize
> > >
> > > if you want to be right that means you must solve an equation
to
> > > know what would be the right position size at entryPr1 if all
> the
> > > adding position have been taken.
> > >
> > > Hmmm!
> > >
> > > stephane
|