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

RE: [amibroker] Equity curve .V. buy and hold



PureBytes Links

Trading Reference Links

Hi Ken,

Flattering always works :-) (just kidding). TN counts all Buy and Sell
signals (I use a reversal system). I want the Equity and the Open price to
be normalized with respect to the entry price at time of the first trade
(long or short). When TN == 1 the first trade has been entered, either a
Long or a Short, and we must sample the value of the Equity and the Open at
that time so that we can normalize subsequent values.

I have no idea why you would have to set TN to a higher number. You want to
reference the very first entryprice... if you set TN == 20, it would
normalize all values with respect to the entry price of the 20th trade.

If you wanted to start at bar#100 you could use:
TN = cum(1) == 100;
If you wanted to start 100 bars back from today you could use:
TN = cum(1) ==(Lastvalue(Cum(1))-100);
The problem with the above is that you may start normalization in the middle
of a trade.

Perhaps someone else has an idea why this wouldn't work? I also has some
trouble with the AB equity() but I assumed it was in my settings and didn't
do any more checking.

Best regards,
Herman.

> -----Original Message-----
> From: Ken Close [mailto:closeks@x...]
> Sent: Friday, April 26, 2002 8:30 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Equity curve .V. buy and hold
>
>
> Herman: modification to my previous msg. The TN==11 applied to only one
> stock. It changes with each stock (sort of obvious now, perhaps). Now I
> really need a way to adjust the starting point in time so I can compare my
> system for different stocks, all of which were backtested from 3/1/01
> onward.
>
> Can you help?
>
> Ken
>
> -----Original Message-----
> From: Herman van den Bergen [mailto:psytek@x...]
> Sent: Friday, April 26, 2002 5:39 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Equity curve .V. buy and hold
>
>
> Hi Don,
>
> This is indeed a very nice idea, it is great to place this indicator and
> then step through your stocks in the stock tree - you can see at a glance
> how many times you system exceed the B&H. Here is some code that you can
> use:
>
> TN = Cum( Buy OR Sell); // Trade Number
> nOpen = Open/ValueWhen(TN == 1,Open); // Normalized Open price
> Eq = Equity();
> nEquity = Eq/ValueWhen(TN == 1,Eq); // Normalized Equity
> Plot(nOpen,"nOpen",1,1);
> Plot(nEquity,"nEquity",4,1);
> Plot(nEquity/nOpen,"Ratio",6,1);
> Title = "Normalized Charts: nEquity= RED,
> nOpen = BLK, Ratio = BLU =" + WriteVal(nEquity/nOpen);
> GraphXSpace = 5;
>
> For some reason using the AB Equity function I only could display the last
> two years, something wrong with my settings perhaps but it works fine with
> another Equity() DLL I am using. See attached chart, use log scales else
> your open price will look like a straight line when your equity
> is going up.
>
> Thanks for the idea and good luck.
> Herman.
>
> > -----Original Message-----
> > From: Don EDWARDS [mailto:doed@x...]
> > Sent: Friday, April 26, 2002 1:06 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Equity curve .V. buy and hold
> >
> >
> > Hi,
> > Im just getting into equity curves - what a great concept!.
> > Many thanks all who have contributed. Unfortunately my coding skills
> > are not good enough for me to contribute - I wish!
> >
> > When looking at a curve I not only ask how good (bad!) is my system but
> > how does it compare with say buy and hold, or investing in bonds at a
> > fixed %. After all its not much point buying and selling like crazy if
> > it doesn't beat the average.
> >
> > Does anyone think it would be useful to superimpose such a line over
> > the equity curve?
> >
> > I suppose this could be done by starting with initial equity and
> > growing it in line with the all ordinaries index to show relative
> > performance. Another way would be to use initial equity and compound at
> > a chosen % again comparing with the equity curve.
> >
> > Needless to say I don't know how to do this. If ive got the wrong idea
> > about the curves I would also appreciate guidance.
> >
> >
> >
> >
> > ___________________________________________________
> >
> > The Department of Industry and Technology's Legal Notice
> >
> > The contents of this email or its attachments may be private and
> > confidential and may be privileged or otherwise protected from
> > disclosure in the public interest. If you are not the intended
> > recipient of this email please notify the sender, delete the
> > email and attachments from your system and destroy any copies you
> > have taken of the email and attachments.
> >
> > Before you take any action based upon advice and/or information
> > contained in this email you should carefully consider the advice
> > and information and consider obtaining relevant independent advice.
> >
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>