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

[amibroker] Stock pairs



PureBytes Links

Trading Reference Links




Building on the work 
that Dimitris presented this week end it occurred to me that using a Sector 
Index as one side of the "Pair" would make a lot of sense. While many stocks can 
lead a given index many will also trail. By getting signals from the index the 
stock belongs to we can take advantage of those stocks that tend to trail the 
index by a few days. With Addtocomposite it is simple to create a series of 
indexes based on any universe (S&P500, nasdaq, or custom universe). First we 
must build the composites. Scan the universe of your choice to build these 
custom indexes...
 <FONT 
face=Arial>
Buy=1<FONT 
color=#282828>;<FONT 
color=#000000>
isym="~i"+SectorID(1<FONT 
color=#000000>);<FONT 
size=2>
AddToComposite(C,isym,"C"<FONT 
color=#282828>);<FONT 
color=#0000ff><FONT 
color=#000000>
AddToComposite(O,isym,"O"<FONT 
color=#282828>);<FONT 
color=#0000ff><FONT 
color=#000000>
AddToComposite(H,isym,"H"<FONT 
color=#282828>);<FONT 
color=#0000ff><FONT 
color=#000000>
AddToComposite(L,isym,"L"<FONT 
color=#282828>);<FONT 
color=#0000ff><FONT 
color=#000000>
AddToComposite(V<FONT 
face=Arial>/1000,isym,"V"<FONT 
color=#000000>);
 
<SPAN 
class=040455918-17022003>From here you can easily apply the system of your 
choice to the index data while making the actual buy/sell on the other side of 
the Pair. Over the last few days I have experimented with several systems 
ranging from a simple SAR system to RSI systems to moving average 
systems, Running the various systems against the Nasdaq 100 I found 
system after system capable of producing 100% or better (some MUCH 
better)  returns on the top 8 or 10 stocks. Here is a very simple 
example......
<SPAN 
class=040455918-17022003> 
<SPAN 
class=040455918-17022003> <FONT 
color=#000000>
symbol="~i"+SectorID(1<FONT 
color=#000000 face=Arial size=2>);
 
C=Foreign<FONT 
color=#282828>(symbol,"C"<FONT 
color=#282828>);<FONT 
face=Arial>
O=<FONT 
color=#0000ff>Foreign(symbol,<FONT 
color=#ff00ff>"o");<FONT 
color=#000000>
H=Foreign<FONT 
color=#282828>(symbol,"h"<FONT 
color=#282828>);<FONT 
face=Arial>
L=<FONT 
color=#0000ff>Foreign(symbol,<FONT 
color=#ff00ff>"l"<FONT face=Arial 
size=2>);
 <FONT 
color=#000000>
Plot(SAR(),"SAR",IIf(SAR()>C<FONT 
face=Arial>,1,9),styleDots<FONT color=#000000 
face=Arial>);<FONT 
face=Arial>
Plot(C<FONT 
face=Arial>,"",colorWhite<FONT 
face=Arial>,styleCandle<FONT 
color=#000000 face=Arial size=2>);
 
Buy=Cross<FONT 
color=#282828>(C<FONT 
color=#282828>,SAR<FONT 
color=#282828>());<FONT 
size=2>
Sell=<FONT 
color=#0000ff>Cross(<FONT 
color=#0000ff>SAR(),<FONT 
color=#000000>C<FONT color=#282828 face=Arial 
size=2>);
Buy=ExRem<FONT 
color=#282828>(Buy<FONT 
color=#282828>,Sell<FONT 
color=#282828>);<FONT 
size=2>
Sell=<FONT 
color=#0000ff>ExRem(<FONT 
color=#000000>Sell<FONT 
color=#282828>,Buy<FONT 
color=#282828>);
 <FONT 
color=#000000>
PlotShapes(IIf(Buy<FONT 
face=Arial>,shapeUpArrow<FONT 
face=Arial>,shapeNone) 
,colorBrightGreen<FONT color=#000000 
face=Arial>);<FONT 
face=Arial>
PlotShapes(IIf(Sell<FONT 
face=Arial>,shapeDownArrow<FONT 
face=Arial>,shapeNone),9<FONT 
color=#000000>);
 
<SPAN 
class=040455918-17022003>This is Very simplistic system with very few parameters 
yet when run on the Nasdaq 100 it returned some impressive initial 
results...
<SPAN 
class=040455918-17022003> 
<SPAN 
class=040455918-17022003><IMG align=baseline alt="" border=0 hspace=0 
src="gif00039.gif">
<SPAN 
class=040455918-17022003> 
<SPAN 
class=040455918-17022003>The Universe I use to build the Indexes consists 
of  a little over 700 stocks and is based on fundamental as well as price 
and volume data. While there are certainly questions left to be answered It 
would seem this process holds promise.........
<SPAN 
class=040455918-17022003> 
<SPAN 
class=040455918-17022003>Have fun with 
it!
<SPAN 
class=040455918-17022003> <FONT color=#0000ff 
face=Arial size=2>Jayson 
 






Yahoo! Groups Sponsor


  ADVERTISEMENT









Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


Attachment: Description: ""