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

[amibroker] To AB guru - help please



PureBytes Links

Trading Reference Links

The following program is a partial program to determine stock 
valuation of stocks of the Dow and market value. The exploration 
runs fine, but no value is reported in the value column I have 
created "AddColumn(AA5,"Value",1.2);".  The exploration is a run 
against a watchlist which contains the stocks of the DOW listed 
below. No syntax error occurs, however the "Value" column displays 
blank values.  AA5 corresponds to the stock valuation of the ticker 
symbol AA.  Evnentually I will try to program my exploration to post 
the stock valuation for each stock next to its corresponding Ticker 
symbol.  If anyone could help determine why no values are occuring I 
would aprreciate it. 

Thank You
Mike



//Determin Market Value of DOW 

//Stocks of the DOW
//AA AXP BA Citi CAT DD DIS EK GE GM HD HON HPQ IBM INTC IP JPM JNJ 
KO MMM MO MSFT MCD //PG SBC T UTX WMT XOM

//Earnins Per Share in $/Share designated by #1 after Ticker symbol
AA1= 0.45;
AXP1=2.01;
BA1=2.87;
Citi1=2.95;
CAT1=-2.30;
DD1= 1.84;
DIS1= 0.60;
EK1=2.64;
GE1=1.51;
GM1= 3.35;
HD1=1.56;
HON1=-0.27;
HPQ1= -0.37;
IBM1= 2.06;
INTC1= 0.46;
IP1= 0.61;
JPM1= 0.08;
JNJ1= 2.16;
KO1= 1.60;
MMM1=4.99;
MO1= 5.21;
MSFT1= 0.71;
MCD1= 0.77;
PG1= 3.09;
SBC1=2.23;
T1=-16.38;
UTX1=4.42;
WMT1= 1.81;
XOM1=1.68;

//Return on Total Capital (ROTC) designated by #2 after Ticker
AA2= 3.9;
AXP2=19.1;
BA2=30.1;
CITI2=18;
CAT2=14.6;
DD2=20.9;
DIS2=4.5;
EK2=27.7;
GE2=23.8;
GM2=25.5;
HD2=18.2;
HON2=0;
HPQ2=0;
IBM2=15.7;
INTC2=8.8;
IP2=4;
JPM2=4;
JNJ2=29.1;
KO2=9.6;
MMM2=32.9;
MO2=21.1;
MSFT2=17.1;
MCD2=9.6;
PG2=37.1;
SBC2=22.5;
T2=0;
UTX2=26.8;
WMT2=21.1;
XOM2=15.3;

//AA Corp. Bond Rate in percent
I= 1.99;

//Probibility Factor equals the following; R = I*sqrt(ROTC/I) 
designated by #3 after Ticker symbol
AA3= I*sqrt(AA2)/I;
AXP3=I*sqrt(AXP2)/I;
BA3=I*sqrt(BA2)/I;
CITI3=I*sqrt(CITI2)/I;
CAT3=I*sqrt(CAT2)/I;
DD3=I*sqrt(DD2)/I;
DIS3=I*sqrt(DIS2)/I;
EK3=I*sqrt(EK2)/I;
GE3=I*sqrt(GE2)/I;
GM3=I*sqrt(GM2)/I;
HD3=I*sqrt(HD2)/I;
HON3=I*sqrt(HON2)/I;
HPQ3=I*sqrt(HPQ2)/I;
IBM3=I*sqrt(IBM2)/I;
INTC3=I*sqrt(INTC2)/I;
IP3=I*sqrt(IP2)/I;
JPM3=I*sqrt(JPM2)/I;
JNJ3=I*sqrt(JNJ2)/I;
KO3=I*sqrt(KO2)/I;
MMM3=I*sqrt(MMM2)/I;
MO3=I*sqrt(MO2)/I;
MSFT3=I*sqrt(MSFT2)/I;
MCD3=I*sqrt(MCD2)/I;
PG3=I*sqrt(PG2)/I;
SBC3=I*sqrt(SBC2)/I;
T3=-I*sqrt(T2)/I;
UTX3=I*sqrt(UTX2)/I;
WMT3=I*sqrt(WMT2)/I;
XOM3=I*sqrt(XOM2)/I;

//Annual Growth Rate in %yr designated by #4 after Ticker symbol
AA4=-13.09;
AXP4=1.90;
BA4=0;
CITI4=21.61;
CAT4=-12.79;
DD4= -4.81;
DIS4= -18.95;
EK4=74.86;
GE4=13.63;
GM4= -19.67;
HD4=23.48;
HON4=0;
HPQ4= 0;
IBM4= -2.78;
INTC4= -20.30;
IP4= 0;
JPM4= -25.33;
JNJ4= 13.79;
KO4= 0.36;
MMM4=1.60;
MO4= 16.60;
MSFT4= 12.79;
MCD4= -4.48;
PG4= 3.68;
SBC4=16.81;
T4=0;
UTX4=15.71;
WMT4= 17.16;
XOM4=6.68;

//CPI inflation rate in %yr forcasted by month by month (April,2003)
F = 181.9;

// Stock Valuation of each stock designated by #5 after Ticker 
symbol 
AA5= 100*(AA1/I)*sqrt((AA3+AA4)/(I+F));
AXP5= 100*(AXP1/I)*sqrt((AXP3+AXP4)/(I+F));
BA= 100*(BA1/I)*sqrt((BA3+BA4)/(I+F));
CITI5 = 100*(CITI1/I)*sqrt((CITI3+CITI4)/(I+F));
CAT5 = 100*(CAT1/I)*sqrt((CAT3+CAT4)/(I+F));
DD5 = 100*(DD1/I)*sqrt((DD3+DD4)/(I+F));
DIS5 = 100*(DIS1/I)*sqrt((DIS3+DIS4)/(I+F));
EK5 = 100*(EK1/I)*sqrt((EK3+EK4)/(I+F));
GE = 100*(GE1/I)*sqrt((GE3+GE4)/(I+F));
GM5 = 100*(GM1/I)*sqrt((GM3+GM4)/(I+F));
HD5 = 100*(HD1/I)*sqrt((HD3+HD4)/(I+F));
HON5 = 100*(HON1/I)*sqrt((HON3+HON4)/(I+F));
HPQ5 = 100*(HPQ1/I)*sqrt(HPQ3+HPQ4)/(I+F);
IBM5 = 100*(IBM1/I)*sqrt((IBM3+IBM4)/(I+F));
INTC5 = 100*(INTC1/I)*sqrt((INTC3+INTC4)/(I+F));
IP5 = 100*(IP1/I)*sqrt((IP3+IP4)/(I+F));
JPM5 = 100*(JPM1/I)*sqrt((JPM3+JPM4)/(I+F));
JNJ5 = 100*(JNJ1/I)*sqrt((JNJ3+JNJ4)/(I+F));
KO5 = 100*(KO1/I)*sqrt((KO3+KO4)/(I+F));
MMM5 = 100*(MMM1/I)*sqrt((MMM3+MMM4)/(I+F));
MO5 = 100*(MO1/I)*sqrt((MO3+MO4)/(I+F));
MSFT5 = 100*(MSFT1/I)*sqrt((MSFT3+MSFT4)/(I+F));
MCD5 = 100*(MCD1/I)*sqrt((MCD3+MCD4)/(I+F));
PG5 = 100*(PG1/I)*sqrt((PG3+PG4)/(I+F));
SBC5 = 100*(SBC1/I)*sqrt((SBC3+SBC4)/(I+F));
T5 = 100*(T1/I)*sqrt((T3+T4)/(I+F));
UTX5 = 100*(UTX1/I)*sqrt((UTX3+UTX4)/(I+F));
WMT5 = 100*(WMT1/I)*sqrt((WMT3+WMT4)/(I+F));
XOM5 = 100*(XOM1/I)*sqrt((XOM3+XOM4)/(I+F));

Buy = C>0;
Filter = Buy;

AddColumn(C,"Close",1.2);
AddColumn(AA5,"Value",1.2);


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Your own Online Store Selling our Overstock.
http://us.click.yahoo.com/rZll0B/4ftFAA/46VHAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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 http://docs.yahoo.com/info/terms/