PureBytes Links
Trading Reference Links
|
please have a look at the attached code. This is a result of joined effort of Dr. S. Nathan Berger and myself. It is exploration which displays 5, 10,22 day, 9, 13, and 26 week rates of change (as well as the weighted combinations of them) which allow you to pick the strongest securities.
Regards,
Dima.
----- Original Message -----
From: jmp23834@xxxx
To: amibroker@xxxxxxxxxxxxxxx
Sent: Monday, September 17, 2001 4:54 PM
Subject: [amibroker] Relative Sttrength
I have a group of 5 mutual funds and I want to rotate into the
strongest fund base on relative strength. When I use the "relstrength
("^spx")" in exploration I get results that seem to be a direct
correlation to the ticker close price. I expected a positive number
in MRS if I was outperforming the index and a negitave one for under
performance. The largest MRS should be the fund that is out
performing the S&P by the largest margin. Can someone explain how AB
calculates RS? I think I need to add some more code to get where I
want but I need to understand the relstrength calculation first.
Thanks
John Pyle
Here is the code:
//**********Calculations
Periods = 28;
RS=relstrength("^spc");
MRS=EMA(RS,14);
RSChange=MRS-ref(MRS,-Periods);
Filter = Close >0;
NumColumns = 3;
Column0 = Close; Column0Name = "Close"; Column0Format=1.2;
Column1 = MRS; Column1Name = "MRS"; Column1Format=1.2;
Column2 = RSChange; Column2Name = "RSChange"; Column2Format=1.2;
Scan/Exploration Results:
Ticker, Date, Close, MRS, RSChange
FSPHX, 9/10/01, 126.02, 1629.87, 113.15,
FSVLX, 9/10/01, 47.83, 643.15, 8.23,
FSELX, 9/10/01, 43.19, 598.78, -12.14,
FDCPX, 9/10/01, 33.61, 462.52, -24.58,
FSESX, 9/10/01, 25.58, 332.23, -19.03,
Yahoo! Groups Sponsor
ADVERTISEMENT
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
------=_NextPart_001_00E1_01C1409B.28B2CE80
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear John,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>please have a look at the attached code. This is a
result of joined effort of Dr. S. Nathan Berger and myself. It is exploration
which displays 5, 10, 22 day, 9, 13, and 26 week rates of change (as well as the
weighted combinations of them) which allow you to pick the strongest
securities.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Dima.</FONT></DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
jmp23834@xxxxxxxx
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=amibroker@xxxxxxxxxx
href="mailto:amibroker@xxxxxxxxxxxxxxx">amibroker@xxxxxxxxxxxxxxx</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, September 17, 2001 4:54
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [amibroker] Relative
Sttrength</DIV>
<DIV><BR></DIV><TT>I have a group of 5 mutual funds and I want to rotate into
the <BR>strongest fund base on relative strength. When I use the
"relstrength<BR>("^spx")" in exploration I get results that seem to be a
direct <BR>correlation to the ticker close price. I expected a positive number
<BR>in MRS if I was outperforming the index and a negitave one for
under<BR>performance. The largest MRS should be the fund that is out
<BR>performing the S&P by the largest margin. Can someone explain howAB
<BR>calculates RS? I think I need to add some more code to get where I
<BR>want but I need to understand the relstrength calculation
first.<BR><BR>Thanks<BR>John Pyle<BR><BR>Here is the
code:<BR><BR>//**********Calculations<BR>Periods =
28;<BR><BR>RS=relstrength("^spc");<BR>MRS=EMA(RS,14);<BR>RSChange=MRS-ref(MRS,-Periods);<BR><BR>Filter
= Close >0;<BR>NumColumns = 3;<BR>Column0 = Close; Column0Name =
"Close"; Column0Format=1.2;<BR>Column1 = MRS; Column1Name=
"MRS"; Column1Format=1.2;<BR>Column2 = RSChange; Column2Name =
"RSChange"; Column2Format=1.2;<BR><BR>Scan/Exploration
Results:<BR>Ticker,
Date,
Close, MRS,
RSChange<BR>FSPHX, 9/10/01,
126.02, 1629.87,
113.15,<BR>FSVLX, 9/10/01,
47.83, 643.15,
8.23, <BR>FSELX,
9/10/01, 43.19,
598.78,
-12.14,<BR>FDCPX, 9/10/01,
33.61, 462.52,
-24.58, <BR>FSESX,
9/10/01, 25.58,
332.23, -19.03,
<BR><BR><BR><BR></TT><BR><BR><TT>Your
use of Yahoo! Groups is subject to the <A
href="http://docs.yahoo.com/info/terms/">Yahoo! Terms of Service</A>.</TT>
<BR></BLOCKQUOTE></BODY></HTML>
------=_NextPart_001_00E1_01C1409B.28B2CE80--
Attachment:
Attachment:
Description: "Description: Binary data"
|