PureBytes Links
Trading Reference Links
|
Hi,
Nice discussion over there :-))))
Goeff is right, the only thing I want to say
that there is a built-in function for calculating
percentage change
percent_chg = ROC( array, periods );
one-day percentage change of close is:
percent_chg = ROC( close, 1 );
Best regards,
Tomasz Janeczko
----- Original Message -----
From: <u7351a@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, March 08, 2001 04:32
Subject: RE: RE: [amibroker] Percent - Math 101?
>
> The start value must be the denominator. Whether its larger or smaller just affects the sign of the outcome (numerator). You have
to accept that the result can be negative ie a decrease, as well as positive. If you only want the magnitude square the no. and take
the sqrt.
>
> If a is the start value 5 and b is the end value 7 then the % increase is
> 40%.
>
> % = (7-5)/5 = 2/5 = 0.4 = 40% increase.
>
> If a was 7 (ie start at 7) and b = 5 (ie the end value)
>
> % = (5-7)/7 = -2/7 = - 0.286 = 28.6 % decrease.
>
>
>
>
> Original Message:
> -----------------
> From: Tom Presley tpresley@xxxx
> Date: Wed, 07 Mar 2001 18:30:40 -0500
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Percent - Math 101?
>
>
> <html><body>
> <tt>
> This still assumes you know which value is larger. In this case, the below <BR>
> formula does not work:<BR>
> <BR>
> a=5<BR>
> b=7<BR>
> <BR>
> (7-5) / 5 = .4 (incorrect)<BR>
> <BR>
> <BR>
> >If a is the start value and b is the end value then you could use<BR>
> ><BR>
> >Percent Change = (b-a) / a<BR>
> ><BR>
> >If the change is a decrease the answer is negative. If the change is an <BR>
> >increase the answer is positive.<BR>
> <BR>
>
> <BR>
> _________________________________________________________
> <BR>
> Do You Yahoo!?
> <BR>
> Get your free @yahoo.com address at http://mail.yahoo.com
> <BR>
>
> <BR>
> </tt>
>
> <br>
>
> <!-- |**|begin egp html banner|**| -->
>
> <table border=0 cellspacing=0 cellpadding=2>
> <tr bgcolor=#FFFFCC>
> <td align=center><font size="-1" color=#003399><b>Yahoo! Groups Sponsor</b></font></td>
> </tr>
> <tr bgcolor=#FFFFFF>
> <td width=470><a
href="http://rd.yahoo.com/M=162801.1342103.2934627/D=egroupmail/S=1700007389:N/A=599089/*http://www.knowledgestorm.com/jump_white.ht
ml?c=Yahoo&n=eLert_ComputersInternet_Software_WhiteGridOptions&t=ad" target="_top"><img width=468 height=60
src="http://us.a1.yimg.com/us.yimg.com/a/kn/knowledge_storm/elerts_n_whitegridoptions.gif" alt="Click Here to Find Software Faster"
border=0><br>Click Here to Find Software Faster</a></td>
> </tr>
> <tr><td><img alt="" width=1 height=1
src="http://us.adserver.yahoo.com/l?M=162801.1342103.2934627/D=egroupmail/S=1700007389:N/A=599089/rand=141951119"></td></tr>
> </table>
>
> <!-- |**|end egp html banner|**| -->
>
>
>
> <br>
> <tt>Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service</tt>
> </br>
>
> </body></html>
>
> --------------------------------------------------------------------
> Mail2Web - Check your email from the web at
> http://www.mail2web.com/ .
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
|