From 83b41368bbc072bead2b6311c7a019b40164bba4 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Tue, 18 Oct 2011 02:40:30 -0400 Subject: Tons of fixes have downloaded a complete history of the sp500 since 01/01/2000 --- bandit.R | 9 +- bloomberg-data.R | 62 +++--- getBloombergData.R | 90 --------- patch-adjRatios.R | 8 +- sp500 add.csv | 231 +++++++++++----------- sp500 tickers 10-04.csv | 501 ------------------------------------------------ sp500 tickers 10-17.csv | 501 ++++++++++++++++++++++++++++++++++++++++++++++++ utils.R | 123 ++++++++++++ 8 files changed, 772 insertions(+), 753 deletions(-) delete mode 100644 getBloombergData.R delete mode 100644 sp500 tickers 10-04.csv create mode 100644 sp500 tickers 10-17.csv create mode 100644 utils.R diff --git a/bandit.R b/bandit.R index 1a8dd1b..8e2fe70 100644 --- a/bandit.R +++ b/bandit.R @@ -1,10 +1,4 @@ -#fix bug in adjRatios -source("patch-adjRatios.R") -assignInNamespace("adjRatios",adjRatios,ns="TTR") -library(TTR) -rm(adjRatios) - -sp500<- read.table("sp500 tickers 10-04.csv",sep="\t",header=T,quote="",colClasses="character",strip.white=T) +sp500<- read.table("sp500 tickers 10-17.csv",sep="\t",header=T,quote="",colClasses="character",strip.white=T) colnames(sp500) <- c("name","ticker") #replace / by - sp500$ticker <- sub('/', '-', sp500$ticker) @@ -14,6 +8,7 @@ tickerlist <- list() for(i in 1:length(sp500$ticker)){ ticker <- sp500[i,"ticker"] tickerlist[[ticker]] <- getYahooData(ticker,"20000101") + cat("ticker",i,ticker,"\n") } #compute matrix of returns diff --git a/bloomberg-data.R b/bloomberg-data.R index 229254d..2c37c20 100644 --- a/bloomberg-data.R +++ b/bloomberg-data.R @@ -1,51 +1,35 @@ require(RBloomberg) -source("getBloombergData.R") +source("utils.R") conn <- blpConnect(jvm.params = "-Xmx1024m") + +#get current tickers sp500.tickers <- as.character(bds(conn,"SPX Index","INDX_MEMBERS")[,1]) #remove exchange information -for(i in 1:length(sp500.tickers)){ - ticker <- sp500.tickers[i] - sp500.tickers[i] <- strsplit(ticker," ")[[1]][1] +sp500.tickers <- gsub(" [A-Z]*","", sp500.tickers) + +add <- read.table("sp500 add.csv", sep=",", fill=T, header=T, + colClasses="character", quote="") +add$date <- as.Date(add$date,format="%m/%d/%Y") +sp500.extended <- union(sp500.tickers,add$ticker.del) +sp500.extended <- sp500.extended[-match(c("","WHO"),sp500.extended)] +extra.tickers <- setdiff(sp500.extended,sp500.tickers) +company.names <- c() +for(ticker in sp500.extended){ + company.names <- c(company.names, + bdp(conn, paste(ticker, "Equity"), "NAME")$NAME) } +sp500.extended <- data.frame(ticker=sp500.extended,name=company.names) +write.table(file="sp500 extended.csv", sp500.extended, col.names=T, + row.names=F, sep=",") +#retrieve data from bloomberg start.date <- as.Date("2000-01-01") -list.sp500 <- list() -for(i in 1:500){ - ticker <- sp500.tickers[i] - #list.sp500.new[[ticker]] <- getBloombergData(conn,ticker,start.date) - list.sp500[[ticker]] <- bdh(conn,paste(ticker,"Equity"),c("PX_OPEN","PX_HIGH","PX_LOW","PX_LAST","VOLUME"),start.date,dates.as.row.names=F) +stock.data <- list() +for(i in 1:NROW(sp500.extended)){ + ticker <- as.character(sp500.extended$ticker[i]) + stock.data[[ticker]] <- getBloombergData(conn,ticker,start.date) cat(paste("ticker", i, ": ",ticker),"\n") } -test <- c() -for(i in 1:158){ - test <- c(test,sum(abs(as.numeric(list.sp500.new[[i]][1,1:5])-as.numeric(list.sp500[[sp500.tickers[i]]][1,2:6])))) -} -add <- read.table("sp500 add.csv",sep=",",fill=T,header=T,colClasses="character",quote="") -add$date <- as.Date(add$date,format="%m/%d/%Y") -memb <- function(index,add,date){ - #return the list of index constituents - toreverse <- add[add$date>=date,] - current.index <- index - for(i in 1:nrow(toreverse)){ - if(toreverse$ticker.add[i]!=""){ - current.index <- current.index[-match(toreverse$ticker.add[i],current.index)] - } - if(toreverse$ticker.del[i]!=""){ - current.index <- sort(c(current.index,toreverse$ticker.del[i])) - } - } - current.index -} - -sp500.extended <- union(sp500.tickers,add$ticker.del) -sp500.extended <- sp500.extended[-match("",sp500.extended)] -extra.tickers <- setdiff(sp500.extended,sp500.tickers) - -list.extra <- list() -for(i in 1:length(extra.tickers)){ - ticker <- extra.tickers[i] - list.extra[[ticker]] <- bdh(conn,paste(ticker,"Equity"),c("PX_OPEN","PX_HIGH","PX_LOW","PX_LAST"),as.Date("2000-01-01"),dates.as.row.names=F) -} diff --git a/getBloombergData.R b/getBloombergData.R deleted file mode 100644 index 2421759..0000000 --- a/getBloombergData.R +++ /dev/null @@ -1,90 +0,0 @@ -getBloombergData <- function(conn,ticker,start.date){ - require(TTR) - ohlc <- bdh(conn,paste(ticker,"Equity"),c("PX_OPEN","PX_HIGH","PX_LOW","PX_LAST","VOLUME"),start.date,dates.as.row.names=F) - colnames(ohlc) <- c("Date","Open","High","Low","Close","Volume") - ohlc <- xts(ohlc[,-1],as.Date(ohlc$Date)) - #split information - spl <- bds(conn,paste(ticker,"Equity"),c("EQY_DVD_ADJUST_FACT")) - # bds returns NULL if there is no data. - #Adjustment Factor Operator Type - # 1 = div - # 2 = mul - # 3 = add - # 4 = sub - #Adjustment Factor Flag - # 1 = prices only - # 2 = volumes only - # 3 = prices and volume - - # can't handle 3 or 4 yet - if(NROW(spl)!=0){ - if (NROW(spl[spl[,"Adjustment Factor Operator Type"] %in% c(3, 4),])>0){ - stop("case not handled") - }else{ - spl[spl[,"Adjustment Factor Operator Type"]==1, "Adjustment Factor"] <- - 1/spl[spl[,"Adjustment Factor Operator Type"]==1, "Adjustment Factor"] - } - spl <- xts(data.frame(spl$"Adjustment Factor", - ifelse(spl$"Adjustment Factor Flag" %in% c(2,3), - spl$"Adjustment Factor",NA)), - order.by = as.Date(spl$"Adjustment Date")) - #aggregate non-unique dates - spl <- as.xts(aggregate(spl, identity, prod, na.rm=T)) - if(any(time(spl)>= start.date & time(spl)<=Sys.Date())){ - spl <- window(spl, start=start.date, end = Sys.Date()) - }else{ - spl <- NULL - } - } - #div information - #we need to override the end date as well cause the Ex-Date might be in the - #future - override_fields <- c("DVD_START_DT", "DVD_END_DT") - override_values <- c(format(start.date,"%Y%m%d"),format(Sys.Date(),"%Y%m%d")) - div <- bds(conn,paste(ticker,"Equity"), c("DVD_HIST"), override_fields, - override_values) - if(NROW(div)!=0){ - div <- xts(div$"Dividend Amount", as.Date(div$"Ex-Date")) - } - if(is.null(div) && is.null(spl)){ - divspl <- NULL - }else if(is.null(div)){ - #need to use merge.xts, otherwise spl is cast to a numeric - divspl <- merge.xts(NA, spl ,all=T) - }else if(is.null(spl)){ - divspl <- merge.xts(div ,NA, NA, all=T) - }else{ - divspl <- merge(div, spl, all=T) - } - if(!is.null(divspl)){ - colnames(divspl) <- c("Adj.Div","Split","Split2") - ohlc <- merge(ohlc, divspl, all = TRUE) - if (all(is.na(ohlc[, "Split2"]))) { - s.ratio2 <- rep(1, NROW(ohlc)) - }else { - s.ratio2 <- adjRatios(split = ohlc[, "Split2"])[, 1] - } - ohlc <- cbind(ohlc, ohlc[, "Adj.Div"] * (1/s.ratio2)) - colnames(ohlc)[NCOL(ohlc)] <- "Div" - adj <- adjRatios(ohlc[, "Split"], ohlc[, "Div"], ohlc[, "Close"]) - s.ratio <- adj[, 1] - d.ratio <- adj[, 2] - cn <- colnames(ohlc) - ohlc <- cbind(ohlc, ohlc[, "Close"]) - colnames(ohlc) <- c(cn, "Unadj.Close") - ohlc[, "Open"] <- ohlc[, "Open"] * d.ratio * s.ratio - ohlc[, "High"] <- ohlc[, "High"] * d.ratio * s.ratio - ohlc[, "Low"] <- ohlc[, "Low"] * d.ratio *s.ratio - ohlc[, "Close"] <- ohlc[, "Close"] * d.ratio * s.ratio - ohlc[, "Volume"] <- ohlc[, "Volume"] * (1/s.ratio2) - ohlc <- ohlc[, c("Open", "High", "Low", "Close", "Volume", - "Unadj.Close", "Div", "Split", "Adj.Div")] - }else{ - cn <- colnames(ohlc) - ohlc <- cbind(ohlc, ohlc[, "Close"]) - colnames(ohlc) <- c(cn, "Unadj.Close") - ohlc <- merge(ohlc,NA,NA,NA,all = TRUE) - colnames(ohlc) <- c(colnames(ohlc)[1:6],"Adj.Div","Split","Div") - } - return( ohlc ) -} diff --git a/patch-adjRatios.R b/patch-adjRatios.R index a96f541..e7beeab 100644 --- a/patch-adjRatios.R +++ b/patch-adjRatios.R @@ -42,8 +42,12 @@ adjRatios <- function (splits, dividends, close) obj <- merge.xts(close, splits, dividends) # for a non NA dividend value, close from the previous day must be non NA #otherwise we can't compute the dividend ratio - if(any(is.na(close[-length(close)][!is.na(dividends)[-1]]))){ - stop("can't compute dividend ratio") + if(any(is.na(obj[-NROW(obj),1][!is.na(obj[,3])[-1]]))){ + for(i in which(!is.na(obj[,3]))){ + if( is.na(obj[i-1,1]) ){ + obj[i-1,1] <- last(na.omit(obj[1:(i-1),1])) + } + } } # if close is NA, then we can't compute the dividend ratio anway #if (!isTRUE(is.na(close))) { diff --git a/sp500 add.csv b/sp500 add.csv index 49507a1..2199b98 100644 --- a/sp500 add.csv +++ b/sp500 add.csv @@ -18,7 +18,7 @@ date,ticker.add,name.add,ticker.del,name.del 12/20/2010,NFX,NEWFIELD EXPLORATION CO,EK,EASTMAN KODAK CO 11/17/2010,IR,INGERSOLL-RAND PLC,PTV,PACTIV CORPORATION 8/27/2010,TYC,TYCO INTL,SII,SMITH INTL INC -7/15/2010,ACE,ACE LIMITED,MIL,MILLIPORE CORP +7/15/2010,ACE,ACE LIMITED,0202445Q,MILLIPORE CORP 7/1/2010,QEP,QEP RESOURCES INC,STR,QUESTAR CORP 6/28/2010,KMX,CARMAX INC,XTO,XTO ENERGY INC 4/30/2010,CERN,CERNER CORP,BJS,BJ SERVICES CO @@ -26,11 +26,12 @@ date,ticker.add,name.add,ticker.del,name.del 3/1/2010,DISCA,DISCOVERY COMMUNICATIONS,PBG,PEPSI BOTTLING GROUP INC 3/1/2010,HP,HELMERICH & PAYNE INC,RX,IMS HEALTH INC 2/16/2010,BRK/B,BERKSHIRE HATHAWAY B,BNI,BURLINGTON NORTHERN SANTE FE -2/8/2010,URBN,URBAN OUTFITTERS,ACS,AFFILIATED COMPUTER SERVICES +2/8/2010,URBN,URBAN OUTFITTERS,8277831Q,AFFILIATED COMPUTER SERVICES 1/29/2010,NRG,NRG ENERGY,JAVA,SUN MICROSYSTEMS INC +1/29/2010,MJN,,MJN-W 12/23/2009,ROP,ROPER INDUSTRIES INC,ESV,ENSCO INTL INC 12/21/2009,CLF,CLIFFS NATURAL RESOURCES,KBH,KB HOME -12/21/2009,MJN,MEAD JOHNSON NUTRITION CO,MBI,MBIA INC +12/21/2009,MJN-W,MEAD JOHNSON NUTRITION CO,MBI,MBIA INC 12/21/2009,ROST,ROSS STORES INC,DYN,DYNEGY INC A 12/21/2009,SAI,SAIC INC,CVG,CONVERGYS CORP 12/21/2009,V,VISA INC,CIEN,CIENA CORP @@ -40,14 +41,14 @@ date,ticker.add,name.add,ticker.del,name.del 9/9/2009,ARG,AIRGAS INC,CBE,COOPER INDUSTRIES LTD 9/1/2009,CFN,CAREFUSION CORP,MTW,MANITOWOC CO INC 8/19/2009,FMC,FMC CORP,CTX,CENTEX CORP -7/25/2009,RHT,RED HAT INC,CIT,CIT GROUP INC +7/25/2009,RHT,RED HAT INC,CITGQ,CIT GROUP INC 7/1/2009,PWR,QUANTA SERVICES INC,IR,INGERSOLL-RAND COMPANY LTD 7/1/2009,WDC,WESTERN DIGITAL CORP.,EQ,EMBARQ CORP. 6/30/2009,PCS,METROPCS COMMUNICATIONS 6/26/2009,,,TEL,TYCO ELECTRONICS LTD 6/9/2009,DV,DEVRY INC 6/5/2009,FTI,FMC TECHNOLOGIES INC.,COV,COVIDIEN LTD. -6/3/2009,,,GM,GENERAL MOTORS CORP +6/3/2009,,,MTLQQ,MOTORS LIQUIDATION CO 4/2/2009,DNR,DENBURY RESOURCES INC,ROH,ROHM & HAAS CO 3/30/2009,TWC,TIME WARNER CABLE INC,DDR,DEVELOPERS DIVERSIFIED REALTY 3/27/2009,ORLY,O'REILLY AUTOMOTIVE,NE,NOBLE CORP @@ -56,7 +57,7 @@ date,ticker.add,name.add,ticker.del,name.del 3/4/2009,VTR,VENTAS INC,JNY,JONES APPAREL GROUP 2/26/2009,DO,DIAMOND OFFSHORE DRILLING,WFT,WEATHERFORD INTERNATIONAL LTD 1/30/2009,HCN,HEALTH CARE REIT INC,SOV,SOVEREIGN BANCORP -1/6/2009,IRM,IRON MOUNTAIN INC,UST,UST INC +1/6/2009,IRM,IRON MOUNTAIN INC,3517233Q,UST INC 1/2/2009,FLIR,FLIR SYSTEMS,NCC,NATIONAL CITY CORP 1/2/2009,OI,OWENS-ILLINOIS,WB,WACHOVIA CORP(NEW) 1/2/2009,SCG,SCANA CORP,MER,MERRILL LYNCH @@ -64,8 +65,8 @@ date,ticker.add,name.add,ticker.del,name.del 12/19/2008,EQT,EQUITABLE RESOURCES,RIG,TRANSOCEAN INC (NEW) 12/5/2008,RSG,REPUBLIC SERVICES,AW,ALLIED WASTE INDUSTRIES 12/2/2008,DNB,DUN & BRADSTREET,LIZ,LIZ CLAIBORNE -11/24/2008,LIFE,LIFE TECHNOLOGIES CORP,ABI,APPLIED BIOSYSTEMS INC -11/19/2008,SRCL,STERICYCLE INC,BUD,ANHEUSER-BUSCH +11/24/2008,LIFE,LIFE TECHNOLOGIES CORP,3286728Q,APPLIED BIOSYSTEMS INC +11/19/2008,SRCL,STERICYCLE INC,3393199Q,ANHEUSER-BUSCH 11/17/2008,CEPH,CEPHALON INC 11/14/2008,WYNN,WYNN RESORTS LTD,ASH,ASHLAND INC 11/14/2008,XRAY,DENTSPLY INTERNATIONAL IN,HPC,HERCULES INC @@ -77,40 +78,40 @@ date,ticker.add,name.add,ticker.del,name.del 10/22/2008,NDAQ,NASDAQ OMX GROUP INC,DDS,DILLARD'S INC 10/7/2008,DPS,DR PEPPER SNAPPLE GROUP I,WWY,WRIGLEY WM JR 10/2/2008,FLS,FLOWSERVE CORPORATION -9/30/2008,APH,AMPHENOL CORP,WEN,WENDY'S INTERNATIONAL -9/30/2008,,,WM,WASHINGTON MUTUAL +9/30/2008,APH,AMPHENOL CORP,3022239Q,WENDY'S INTERNATIONAL +9/30/2008,,,WAMUQ,WASHINGTON MUTUAL 9/24/2008,PXD,PIONEER NATURAL RESOURCES 9/23/2008,,,SAF,SAFECO CORP 9/22/2008,HRS,HARRIS CORP -9/17/2008,,,LEH,LEHMAN BROS +9/17/2008,,,LEHMQ,LEHMAN BROS 9/15/2008,CRM,SALESFORCE.COM 9/15/2008,FAST,FASTENAL CO -9/11/2008,,,FNM,FANNIE MAE -9/11/2008,,,FRE,FEDERAL HOME LOAN MTG -8/27/2008,CF,CF INDUSTRIES HOLDINGS IN,EDS,ELECTRONIC DATA SYSTEMS CORP +9/11/2008,,,FNMA,FANNIE MAE +9/11/2008,,,FMCC,FEDERAL HOME LOAN MTG +8/27/2008,CF,CF INDUSTRIES HOLDINGS IN,3423152Q,ELECTRONIC DATA SYSTEMS CORP 8/21/2008,IVZ,INVESCO LTD,IACI,IAC/INTERACTIVE CORP -7/31/2008,DVA,DAVITA INC,CCU,CLEAR CHANNEL COMMUNICATIONS +7/31/2008,DVA,DAVITA INC,2968900Q,CLEAR CHANNEL COMMUNICATIONS 7/18/2008,MA,MASTERCARD INC,ACE,ACE LIMITED 7/1/2008,AKS,AK STEEL HOLDING CORP,CFC,COUNTRYWIDE FINANCIAL CORP 7/1/2008,SNI,SCRIPPS NETWORK INTERACTI,SSP,SCRIPPS (E.W.) 'A' 6/23/2008,COG,CABOT OIL & GAS,BC,BRUNSWICK CORP 6/23/2008,MEE,MASSEY ENERGY COMPANY,OMX,OFFICEMAX INC -6/11/2008,LO,LORILLARD INC,ABK,AMBAC FINANCIAL GROUP +6/11/2008,LO,LORILLARD INC,ABKFQ,AMBAC FINANCIAL GROUP 6/6/2008,SWN,SOUTHWESTERN ENERGY,TT,TRANE INC -6/2/2008,ISRG,INTUITIVE SURGICAL INC,BSC,BEAR STEARNS COS +6/2/2008,ISRG,INTUITIVE SURGICAL INC,2942331Q,BEAR STEARNS COS 3/31/2008,HCP,HCP INC,CBH,COMMERCE BANCORP -3/31/2008,PM,PHILIP MORRIS INTL,CC,CIRCUIT CITY GROUP +3/31/2008,PM,PHILIP MORRIS INTL,CCTYQ,CIRCUIT CITY GROUP 1/29/2008,CAM,CAMERON INTERNATIONAL COR,HET,HARRAH'S ENTERTAINMENT 1/2/2008,TSS,TOTAL SYSTEM SERVICES,SNV,SYNOVUS FINANCIAL 12/31/2007,WPO,WASHINGTON POST,TIN,TEMPLE-INLAND 12/21/2007,RRC,RANGE RESOURCES CORP,TRB,TRIBUNE CO 12/14/2007,GME,GAMESTOP CORP,DJ,DOW JONES & CO 11/27/2007,RIG,TRANSOCEAN INC (NEW),RIG,TRANSOCEAN (OLD) -11/19/2007,AMT,AMERICAN TOWER CORP,AT,ALLTEL CORP +11/19/2007,AMT,AMERICAN TOWER CORP,3692470Q,ALLTEL CORP 11/16/2007,MTW,MANITOWOC CO,TEK,TEKTRONIX INC 11/9/2007,POM,PEPCO HOLDINGS INC,HCR,MANOR CARE INC 10/29/2007,TIE,TITANIUM METALS,BOL,BAUSCH & LOMB -10/26/2007,JEC,JACOBS ENGINEERING GROUP,AV,AVAYA INC +10/26/2007,JEC,JACOBS ENGINEERING GROUP,3414924Q,AVAYA INC 10/25/2007,NYX,NYSE EURONEXT,HLT,HILTON HOTELS 10/10/2007,EXPD,EXPEDITORS INT'L,TXU,TXU CORP 10/8/2007,NBL,NOBLE ENERGY INC,ASN,ARCHSTONE-SMITH TRUST @@ -119,25 +120,25 @@ date,ticker.add,name.add,ticker.del,name.del 9/27/2007,TSO,TESORO PETROLEUM CO,MXIM,MAXIM INTEGRATED PROD 9/26/2007,ICE,INTERCONTINENTALEXCHANGE 9/25/2007,,,FDC,FIRST DATA CORP -9/7/2007,MCHP,MICROCHIP TECHNOLOGY,CBSS,COMPASS BANCSHARES +9/7/2007,MCHP,MICROCHIP TECHNOLOGY,8206908Q,COMPASS BANCSHARES 8/27/2007,LUK,LEUCADIA NATIONAL CORP,KSE,KEYSPAN ENERGY 7/12/2007,AKAM,AKAMAI TECHNOLOGIES INC,BMET,BIOMET INC -7/9/2007,ACAS,AMERICAN CAPITAL STRATEGI,DG,DOLLAR GENERAL +7/9/2007,ACAS,AMERICAN CAPITAL STRATEGI,3403545Q,DOLLAR GENERAL 7/2/2007,COV,COVIDIEN LTD,SANM,SANMINA-SCI CORP 7/2/2007,DFS,DISCOVER FINANCIAL SERVIC,ADCT,ADC TELECOMMUNICATIONS 7/2/2007,GGP,GENL GROWTH PROPERTIES,MEL,MELLON BANK CORP 7/2/2007,TEL,TYCO ELECTRONICS LTD,PMCS,PMC-SIERRA INC 7/2/2007,TYC,TYCO INTERNATIONAL-W/I(NE,TYC,TYCO INTERNATIONAL (OLD) 6/1/2007,PCP,PRECISION CASTPARTS,MEDI,MEDIMMUNE INC -5/31/2007,WFR,MEMC ELECTRONIC MATERIALS,KMI,KINDER MORGAN INC -4/10/2007,AIZ,ASSURANT INC,H,REALOGY CORPORATION +5/31/2007,WFR,MEMC ELECTRONIC MATERIALS,4621824Q,KINDER MORGAN INC +4/10/2007,AIZ,ASSURANT INC,3362726Q,REALOGY CORPORATION 4/2/2007,KFT,KRAFT FOODS INC - A,TSG,SABRE HOLDING CORP 3/29/2007,ANF,ABERCROMBIE & FITCH CO,UVN,UNIVISION COMMUNICATIONS 3/23/2007,DDR,DEVELOPERS DIVERSIFIED RL,CMX,CAREMARK RX 3/20/2007,HST,HOST HOTELS & RESORTS,PD,PHELPS DODGE 3/2/2007,CHRW,C.H. ROBINSON WORLDWIDE,HMA,HEALTH MANAGEMENT ASSOC 2/22/2007,TEG,INTEGRYS ENERGY GROUP INC,PGL,PEOPLES ENERGY -2/15/2007,HCBK,HUDSON CITY BANCORP,APCC,AMERICAN POWER CONVERSION +2/15/2007,HCBK,HUDSON CITY BANCORP,2307532Q,AMERICAN POWER CONVERSION 2/12/2007,VAR,VARIAN MEDICAL SYSTEMS,EOP,EQUITY OFFICE PROPERTIES 2/2/2007,RL,POLO RALPH LAUREN CORP,CMVT,Converse 1/10/2007,AVB,AVALON BAY COMMUNITIES,2987536Q,SYMBOL TECHNOLOGIES @@ -147,193 +148,195 @@ date,ticker.add,name.add,ticker.del,name.del 12/4/2006,DTV,DIRECTV GROUP INC,FSL/B,FREESCALE SEMICONDUCTOR INC 12/1/2006,IACI,IAC/INTERACTIVE CORP,LU,LUCENT TECHNOLOGIES 12/1/2006,STR,QUESTAR CORP,NFB,NORTH FORK BANCORPORATION -11/20/2006,BTU,PEABODY ENERGY CORP,HCA,HCA INC +11/20/2006,BTU,PEABODY ENERGY CORP,3605818Q,HCA INC 11/17/2006,CTSH,COGNIZANT TECHNOLOGY SOLU,ACV,ALBERTO-CULVER 11/10/2006,CBG,CB RICHARD ELLIS GROUP,FSH,FISHER SCIENTIFIC INTL INC -11/6/2006,CELG,Celgene Corp.,ASO,AmSouth Bancorp +11/10/2006,FIS,FIDELITY NATIONAL INFORMATIO,LPX,LOUISIANA-PACIFIC CORP +11/6/2006,CELG,Celgene Corp.,3133754Q,AmSouth Bancorp 10/2/2006,SII,Smith International,GDW,Golden West Financial 10/2/2006,WU,Western Union Co,ANDW,Andrew Corp 8/11/2006,CME,Chicago Mercantile Exchan,KMG,Kerr-McGee Corp. -8/1/2006,H,Realogy Corp.,GTW,Gateway Inc. -8/1/2006,WYN,Wyndham Worldwide Corp.,CD,Cendant Corp. +8/1/2006,3362726Q,Realogy Corp.,GTW,Gateway Inc. +8/1/2006,WYN,Wyndham Worldwide Corp.,CAR,AVIS BUDGET GROUP INC 7/18/2006,WIN,Windstream Corp.,CTB,Cooper Tire & Rubber Co. 6/28/2006,CNX,CONSOL Energy Inc.,KRI,Knight-Ridder Inc. -6/6/2006,CBH,Commerce Bancorp,EC,Engelhard Corp. +6/6/2006,CBH,Commerce Bancorp,2999130Q,Engelhard Corp. 6/2/2006,JNPR,Juniper Neworks Inc.,ABS,Albertson's Inc. 5/18/2006,EQ,Embarq Corp.,AMCC,Applied Micro Circuits Corp. 4/24/2006,LM,Legg Mason,GDT,Guidant Co. 4/20/2006,SNDK,SanDisk Corp.,CHIR,Chiron Corp. 4/3/2006,BXP,Boston Properties,CIN,Cinergy Corp. -4/3/2006,DF,Dean Foods,MYG,Maytag Corp. -4/3/2006,GOOG,Google Inc.,BR,Burlington Resources Inc. +4/3/2006,DF,Dean Foods,3080867Q,Maytag Corp. +4/3/2006,GOOG,Google Inc.,929530Q,Burlington Resources Inc. 4/3/2006,KIM,Kimco Realty Corp.,JP,Jefferson-PilotCorp. -3/3/2006,CHK,Chesapeake Energy Corp.,DCN,Dana Corp. +3/3/2006,CHK,Chesapeake Energy Corp.,DCNAQ,Dana Corp. 2/27/2006,BRL,Barr Pharmaceuticals Inc.,3026360Q,Scientific-Atlanta 2/1/2006,HAR,Harman Int'l,SEBL,Siebel Systems Inc. 2/1/2006,VRSN,VeriSign Inc.,RBK,Reebok Int'l 1/5/2006,EL,Estee Lauder 1/4/2006,,,MERQ,Mercury Interactive -1/3/2006,VIA/B,Viacom Inc. (New),VC,Visteon Corp. +1/3/2006,VIA/B,Viacom Inc. (New),VSTNQ,Visteon Corp. 1/3/2006,WFM,Whole Foods Market,KRB,MBNA Corp. 12/20/2005,SSP,EW Scripps Co,GP,Georgia-Pacific Group -12/2/2005,GNW,Genworth Financial Inc.,CPN,Calpine Corp. +12/2/2005,GNW,Genworth Financial Inc.,CPNLQ,Calpine Corp. 11/21/2005,AMZN,Amazon.com,653707Q,AT&T Corp. -10/11/2005,PDCO,Patterson Companies Inc.,DPH,Delphi Corp. +10/11/2005,PDCO,Patterson Companies Inc.,DPHIQ,Delphi Corp. 10/4/2005,LEN,Lennar Corp. -10/3/2005,,,G,Gillette Co. +10/3/2005,,,1028411Q,Gillette Co. 10/3/2005,AMP,Ameriprise Financial,PVN,Providian Financial -8/30/2005,CVH,Coventry Health Care Inc.,MAY,May Dept. Stores -8/19/2005,PSA,Public Storage,DAL,Delta Air Lines +8/30/2005,CVH,Coventry Health Care Inc.,987200Q,May Dept. Stores +8/19/2005,PSA,Public Storage,DALRQ,Delta Air Lines 8/15/2005,MUR,Murphy Oil,NXTL,Nextel Communications -8/12/2005,VNO,Vornado Realty Trust,SDS,SunGard Data Systems +8/12/2005,VNO,Vornado Realty Trust,764144Q,SunGard Data Systems 8/11/2005,TSN,Tyson Foods,UCL,Unocal Corp. 7/22/2005,WFT,Weatherford Int'l,TOY,"Toys ""R"" US" -7/5/2005,DHI,D.R. Horton,VRTS,Veritas Software -7/5/2005,STZ,Constellation Brands,GLK,Great Lakes Chemical -3/28/2005,SHLD,Sears Holdings Corp.,S,Sears +7/5/2005,DHI,D.R. Horton,3153670Q,Veritas Software +7/5/2005,STZ,Constellation Brands,723588Q,Great Lakes Chemical +3/28/2005,SHLD,Sears Holdings Corp.,605555Q,Sears 3/15/2005,NOV,National Oilwell Varco,PWER,Power-One -12/29/2004,XTO,XTO Energy,PSFT,PeopleSoft Inc. +12/29/2004,XTO,XTO Energy,3029830Q,PeopleSoft Inc. 12/20/2004,ASN,Archstone-Smith Trust,CR,Crane Co. -12/20/2004,CBSS,Compass Bancshares,WOR,Worthington Industries +12/20/2004,8206908Q,Compass Bancshares,WOR,Worthington Industries 12/20/2004,NWSA,News Corp.,DLX,Deluxe Corp. -12/3/2004,FSL/B,Freescale Semiconductor I,WIN,Winn-Dixie -12/1/2004,LLL,L-3 Communications Holdin,WLP,WellPoint Health Networks -11/1/2004,LH,Laboratory Corp of Americ,SOTR,SouthTrust Corp. -10/27/2004,CIT,CIT Group,AWE,AT&T Wireless -9/1/2004,COH,Coach Inc.,CF,Charter One Financial +12/3/2004,FSL/B,Freescale Semiconductor I,WNDXQ,Winn-Dixie +12/1/2004,LLL,L-3 Communications Holdin,502466Q,WellPoint Health Networks +11/1/2004,LH,Laboratory Corp of Americ,2676187Q,SouthTrust Corp. +10/27/2004,CITGQ,CIT Group,AWE,AT&T Wireless +9/1/2004,COH,Coach Inc.,605018Q,Charter One Financial 8/3/2004,FSH,Fisher Scientific,TNB,Thomas & Betts -7/1/2004,GILD,Gilead Sciences,ONE,Bank One Corp. -7/1/2004,RF,Regions Financial Corp. (,RF,Regions Financial Corporation +7/1/2004,GILD,Gilead Sciences,3621240Q,Bank One Corp. +7/1/2004,RF,Regions Financial Corp. (,355488Q,Regions Financial Corporation 7/1/2004,SOV,Sovereign Bancorp,UPC,Union Planters Corporation 5/3/2004,HSP,Hospira Inc.,AM,American Greetings 4/29/2004,VLO,Valero Energy,JHF,John Hancock Financial Servic -4/23/2004,MYL,Mylan Laboratories,PCS,Sprint PCS -4/2/2004,ACS,Affiliated Computer Servi,TAP/B,Travelers Property Casualty +4/23/2004,MYL,Mylan Laboratories,945852Q,Sprint PCS +4/2/2004,8277831Q,Affiliated Computer Servi,TAP/B,Travelers Property Casualty 4/1/2004,ETFC,E*Trade Financial,FBF,FleetBoston Financial 3/25/2004,CMX,Caremark Rx,TUP,Tupperware Corp. -2/27/2004,MTB,M&T Bank Corp.,CE,Concord EFS Inc. +2/27/2004,MTB,M&T Bank Corp.,519239Q,Concord EFS Inc. 11/13/2003,BIIB,BIOGEN IDEC,BGEN,Biogen Inc. 9/25/2003,ESRX,Express Scripts,QTRN,Quintiles Transnational 8/20/2003,MHS,Medco Health Solutions In,MDR,McDermott International -7/17/2003,8394653Q,ProLogis,MIR,Mirant Corp +7/17/2003,8394653Q,ProLogis,MIRKQ,Mirant Corp 4/16/2003,FII,Federated Investors Inc.,748957Q,Pharmacia Corp. -3/31/2003,SYMC,Symantec Corp.,HI,Household International -3/21/2003,MKC,McCormick & Company,HRC,HEALTHSOUTH Corp. +3/31/2003,SYMC,Symantec Corp.,2727195Q,Household International +3/21/2003,MKC,McCormick & Company,HLS,HEALTHSOUTH Corp. 3/13/2003,AIV,Apartment Investment & Ma,AMR,AMR Corp. -12/12/2002,DGX,Quest Diagnostics,TRW,TRW Inc. +2/24/2003,AN,AutoNation Inc.,RATL,Rational Software +12/12/2002,DGX,Quest Diagnostics,297504Q,TRW Inc. 11/19/2002,CMCSA,Comcast Corp.,CMCSK,Comcast Class A Special 9/4/2002,RAI,RJ Reynolds Tobacco 9/2/2002,,,COC,Conoco Inc. 8/21/2002,TAP/B,Travelers Property Casual,VTSS,Vitesse Semiconductor 8/14/2002,MON,Monsanto Co,PALM,Palm Inc -7/25/2002,WLP,Anthem Inc.,CNC,Conseco Inc. -7/22/2002,EBAY,eBay Inc.,AL,Alcan Inc. +7/25/2002,WLP,Anthem Inc.,CNCEQ,Conseco Inc. +7/22/2002,EBAY,eBay Inc.,8214761Q,Alcan Inc. 7/22/2002,ERTS,Electronic Arts,PDG,Placer Dome Inc. 7/22/2002,GS,Goldman Sachs Group,UN,Unilevr N.V. 7/22/2002,PFG,Principal Financial Group,ABX,Barrick Gold Corp. -7/22/2002,PRU,Prudential Financial,NT,Nortel Networks -7/22/2002,SDS,SunGard Data Systems,N,Inco -7/22/2002,UPS,United Parcel Services,RD,Royal Dutch Petroleum +7/22/2002,PRU,Prudential Financial,NRTLQ,Nortel Networks +7/22/2002,764144Q,SunGard Data Systems,INCLF,Inco +7/22/2002,UPS,United Parcel Services,RDPL,Royal Dutch Petroleum 7/17/2002,NFB,North Fork Bancorporation,IMNX,Immunex Corp. 6/26/2002,SPG,Simon Property Group,CNXT,Conexant Systems -5/15/2002,APOL,Apollo Group,WCOM,WorldCom Inc.-WorldCom Group -5/15/2002,BJS,BJ Services,U,USAirways Group Inc. +5/15/2002,APOL,Apollo Group,WCOEQ,WorldCom Inc.-WorldCom Group +5/15/2002,BJS,BJ Services,UAWGQ,USAirways Group Inc. 5/13/2002,TT,American Standard,SAPE,Sapient Corp. 5/6/2002,FHN,First Tennessee National,680884Q,COMPAQ Computer -2/24/2002,AN,AutoNation Inc.,RATL,Rational Software -2/11/2002,MI,Marshall & Ilsley Corp.,WLL,Willamette Industries +2/11/2002,MI,Marshall & Ilsley Corp.,228510Q,Willamette Industries 2/1/2002,RATL,Rational Software,NMK,Niagara Mohawk Hldgs. Inc. -1/31/2002,MWV,MeadWestvaco Corp.,MEA,Mead Corp. +1/31/2002,MWV,MeadWestvaco Corp.,544791Q,Mead Corp. 1/30/2002,ACE,ACE Limited,W,Westvaco Corp. -1/17/2002,PCL,Plum Creek Timber Co.,KM,K mart +1/17/2002,PCL,Plum Creek Timber Co.,KMRTQ,K mart 1/2/2002,WAT,Waters Corporation,FMC,FMC Corp. 12/17/2001,JNY,Jones Apparel Group,HM,Homestake Mining 12/14/2001,GENZ,Genzyme Corp. 12/13/2001,,,RAL,Ralston Purina Co -12/3/2001,EQR,Equity Res.Properties,NSI,National Service Ind. -11/30/2001,NVDA,NVIDIA Corp.,ENE,Enron Corp. +12/3/2001,EQR,Equity Res.Properties,329556Q,National Service Ind. +11/30/2001,NVDA,NVIDIA Corp.,ENRNQ,Enron Corp. 11/7/2001,HMA,Health Management Assoc.,GPUI,GPU Inc. -10/10/2001,EOP,Equity Office Properties,TX,Texaco Inc. +10/10/2001,EOP,Equity Office Properties,677004Q,Texaco Inc. +10/10/2001,TE,TECO ENERGY INC,GBLXQ,GLOBAL CROSSING LTD 9/21/2001,IMNX,Immunex Corp. 9/18/2001,,,TOS,Tosco Corp. 9/4/2001,IGT,Int'l. Game Technology,BVSN,BroadVision Inc. 9/4/2001,XL,XL Capital,41018Q,Wachovia Corp. 8/30/2001,ABC,AmerisourceBergen,OKE,ONEOK Inc. -8/30/2001,CIEN,CIENA Corp.,AGC,American General +8/30/2001,CIEN,CIENA Corp.,950967Q,American General 8/7/2001,ZMH,Zimmer Holdings,TKR,Timken Co. -8/6/2001,FDO,Family Dollar Stores,CS,Cabletron Systems +8/6/2001,FDO,Family Dollar Stores,ETS,Cabletron Systems 8/3/2001,PMCS,PMC-Sierra,OAT,Quaker Oats 7/9/2001,AWE,AT&T Wireless Group,PCH,Potlatch Corp. 7/2/2001,COL,Rockwell Collins,LDG,Longs Drug Stores -6/28/2001,JHF,John Hancock Financial,H,Harcourt General Inc. +6/28/2001,JHF,John Hancock Financial,739306Q,Harcourt General Inc. 6/25/2001,,,AZA,ALZA Corp. Cl. A 6/18/2001,ZION,Zions Bancorp -6/4/2001,MWW,TMP Worldwide,CIT,CIT Group Inc. -5/14/2001,PBG,Pepsi Bottling Group,ADPT,Adaptec -4/3/2001,MIR,Mirant Corp.,BGG,Briggs & Stratton -4/2/2001,CE,Concord EFS Inc.,CEN,Ceridian Corp (Old) +6/4/2001,MWW,TMP Worldwide,89236Q,CIT Group Inc. +5/14/2001,PBG,Pepsi Bottling Group,ADPTD,Adaptec +4/3/2001,MIRKQ,Mirant Corp.,BGG,Briggs & Stratton +4/2/2001,519239Q,Concord EFS Inc.,ARB,Ceridian Corp (Old) 4/2/2001,FISV,FIserv Inc.,OK,Old Kent Financial -3/1/2001,CTAS,Cintas Corporation,SUB,Summit Bancorp +3/1/2001,CTAS,Cintas Corporation,3075558Q,Summit Bancorp 2/27/2001,FTR,Citizens Communications,3346Q,U.S. Bancorp 2/7/2001,UVN,Univision Communications,UK,Union Carbide 1/30/2001,JBL,Jabil Circuit,CGP,Coastal Corp. -1/16/2001,NE,Noble Drilling Corp.,TWX,Time Warner Inc. +1/16/2001,NE,Noble Drilling Corp.,253647Q,Time Warner Inc. 1/2/2001,AMCC,Applied Micro Circuits,3277Q,Morgan (J.P.) & Co. 12/22/2000,FLR,Fluor Corp. (New),MEE,Massey Energy Company -12/14/2000,AET,Aetna Inc. (New),AET,Aetna Inc. (Old) -12/12/2000,KMI,Kinder Morgan,NGH,Nabisco Group Hldgs. +12/14/2000,AET,Aetna Inc. (New),3253Q,Aetna Inc. (Old) +12/12/2000,4621824Q,Kinder Morgan,NGH,Nabisco Group Hldgs. 12/12/2000,QLGC,QLogic Corp.,PRDCQ,Polaroid Corp. 12/12/2000,SYK,Stryker Corp.,RML,Russell Corp. -12/12/2000,VTSS,Vitessa Semiconductor,SMI,Springs Industries -12/11/2000,ABK,Ambac Financial Group,CCK,Crown Cork & Seal -12/11/2000,AYE,Allegheny Energy Inc.,BS,Bethlehem Steel +12/12/2000,VTSS,Vitessa Semiconductor,304024Q,Springs Industries +12/11/2000,ABKFQ,Ambac Financial Group,CCK,Crown Cork & Seal +12/11/2000,AYE,Allegheny Energy Inc.,BHMSQ,Bethlehem Steel 12/11/2000,INTU,Intuit,OI,Owens-Illinois -12/11/2000,MET,MetLife Inc.,VO,Seagram Co. Ltd. +12/11/2000,MET,MetLife Inc.,291784Q,Seagram Co. Ltd. 12/11/2000,2987536Q,Symbol Technologies,GRA,WR Grace & Co (New) 12/5/2000,RHI,Robert Half International 12/4/2000,,,AFS,Associates First Capital -12/1/2000,CPN,Calpine Corp.,FPC,Florida Progress +12/1/2000,CPNLQ,Calpine Corp.,FPC,Florida Progress 11/24/2000,CHIR,Chiron Corp.,FJ,Fort James Corp. 11/22/2000,FRX,Forest Laboratories,SEG,Seagate Technology 11/17/2000,HOT,Starwood Hotels & Resorts,ACKH,Armstrong Holdings -11/6/2000,BVSN,BroadVision Inc.,PWJ,PainWebber Group -11/2/2000,EOG,EOG Resources,EFU,Eastern Enterprises -11/2/2000,NI,NiSource Inc.,CG,Columbia Energy Group +11/6/2000,BVSN,BroadVision Inc.,301710Q,PainWebber Group +11/2/2000,EOG,EOG Resources,2269312Q,Eastern Enterprises +11/2/2000,NI,NiSource Inc.,68335Q,Columbia Energy Group 10/23/2000,PWER,Power-One Inc.,UCM,Unicom Corp. 10/18/2000,NBR,Nabors Industries,MKG,Mallinckrodt Inc. -10/3/2000,DYN,Dynegy Inc.,BFO,BestFoods +10/3/2000,DYN,Dynegy Inc.,236555Q,BestFoods 10/3/2000,KG,King Pharmaceuticals,YNR,Young & Rubicam -10/2/2000,AV,Avaya Inc.,OWC,Owens Corning -8/30/2000,DVN,Devon Energy Corp.,GAP,Great Atlantic & Pacific Tea +10/2/2000,3414924Q,Avaya Inc.,OWENQ,Owens Corning +8/30/2000,DVN,Devon Energy Corp.,GAPTQ,Great Atlantic & Pacific Tea 8/21/2000,KSE,KeySpan Corp.,NCE,New Century Energies 7/28/2000,PALM,Palm Inc.,COMS,3Com Corp. 7/27/2000,JDSU,JDS Uniphase Corp.,RAD,Rite Aid Corp. -7/17/2000,CIT,CIT Group Inc.,UPR,Union Pacific Resources +7/17/2000,89236Q,CIT Group Inc.,2953349Q,Union Pacific Resources 7/13/2000,JNS,Stilwell Financial,KSU,Kansas City Southern Industri 7/6/2000,Q,Qwest Communication Int'l,USW,US West -7/3/2000,BRCM,Broadcom Corporation,GTE,GTE Corp. -6/29/2000,MERQ,Mercury Interactive,MZ,Milacron Inc. -6/29/2000,VC,Visteon Corp.,IKN,IKON Office Solutions +7/3/2000,BRCM,Broadcom Corporation,571300Q,GTE Corp. +6/29/2000,MERQ,Mercury Interactive,MZIAQ,Milacron Inc. +6/29/2000,VSTNQ,Visteon Corp.,IKN,IKON Office Solutions 6/21/2000,SANM,Sanmina Corp.,WLA,Warner-Lambert -6/21/2000,TIF,Tiffany & Co.,SGI,Silicon Graphics -6/19/2000,CF,Charter One Financial -6/19/2000,NVLS,Novellus Systems,CHA,Champion International -6/16/2000,,,UMG,MediaOne Group Inc. -6/16/2000,MEDI,MedImmune,CSR,Central & South West +6/21/2000,TIF,Tiffany & Co.,SGID,Silicon Graphics +6/19/2000,605018Q,Charter One Financial +6/19/2000,NVLS,Novellus Systems,140402Q,Champion International +6/16/2000,,,UMGI,MediaOne Group Inc. +6/16/2000,MEDI,MedImmune,45200Q,Central & South West 6/13/2000,CVG,Convergys Corp.,TMC,Times Mirror -6/8/2000,SBUX,Starbucks Corp.,SMS,Shared Medical Systems +6/8/2000,SBUX,Starbucks Corp.,2731112Q,Shared Medical Systems 6/5/2000,A,Agilent Technologies,NC,NACCO Industries -6/1/2000,APCC,American Power Conversion,MIR,Mirage Resorts -5/10/2000,MXIM,Maxim Integrated Products,JOS,Jostens Inc. +6/1/2000,2307532Q,American Power Conversion,3301Q,Mirage Resorts +5/10/2000,MXIM,Maxim Integrated Products,JOSEA,Jostens Inc. 5/5/2000,SAPE,Sapient Corp.,RLM,Reynolds Metals -5/5/2000,SEBL,Siebel Systems,CBS,CBS Corp. -4/18/2000,ALTR,Altera Corp.,ARC,Atlantic Richfield +5/5/2000,SEBL,Siebel Systems,667517Q,CBS Corp. +4/18/2000,ALTR,Altera Corp.,300583Q,Atlantic Richfield 4/3/2000,LLTC,Linear Technology,PBY,Pep Boys -4/3/2000,VRTS,Veritas Software,748957Q,Pharmacia & Upjohn -3/16/2000,TSG,Sabre Holdings Corporatio,SRV,Service Corp. International -1/31/2000,BGEN,Biogen,FWC,Foster Wheeler -1/31/2000,CNXT,Conexant Systems,CNG,Consolidated Natural Gas -1/31/2000,HOG,Harley-Davidson,FLE,Fleetwood Enterprises +4/3/2000,3153670Q,Veritas Software,285939Q,Pharmacia & Upjohn +3/16/2000,TSG,Sabre Holdings Corporatio,SCI,Service Corp. International +1/31/2000,BGEN,Biogen,FWLT,Foster Wheeler +1/31/2000,CNXT,Conexant Systems,CNRG,Consolidated Natural Gas +1/31/2000,HOG,Harley-Davidson,FLTWQ,Fleetwood Enterprises 1/6/2000,YNR,Young & Rubicam,827663Q,General Instrument 1/4/2000,NCR,NCR Corp. 10/15/1996,LGN,LOGICON INC,WHO,WATERHOUSE INVESTOR SERV \ No newline at end of file diff --git a/sp500 tickers 10-04.csv b/sp500 tickers 10-04.csv deleted file mode 100644 index 1e2a0d9..0000000 --- a/sp500 tickers 10-04.csv +++ /dev/null @@ -1,501 +0,0 @@ -Constituent Name Constituent Symbol -3M Co MMM -ACE Limited ACE -AES Corp AES -AFLAC Inc AFL -AK Steel Hldg Corp AKS -AT&T Inc T -Abbott Laboratories ABT -Abercrombie & Fitch Company A ANF -Accenture plc ACN -Adobe Systems Inc ADBE -Advanced Micro Devices AMD -Aetna Inc AET -Agilent Technologies Inc A -Air Products & Chemicals Inc APD -Airgas Inc ARG -Akamai Technologies Inc AKAM -Alcoa Inc AA -Allegheny Technologies Inc ATI -Allergan Inc AGN -Allstate Corp ALL -Alpha Natural Resources ANR -Altera Corp ALTR -Altria Group Inc MO -Amazon.com Inc AMZN -Ameren Corp AEE -American Electric Power AEP -American Express Co AXP -American Intl Group Inc AIG -American Tower Corp A AMT -Ameriprise Financial Inc AMP -AmerisourceBergen Corp ABC -Amgen Inc AMGN -Amphenol Corp A APH -Anadarko Petroleum Corp APC -Analog Devices Inc ADI -Aon Corp AON -Apache Corp APA -Apartment Investment & Mgmt AIV -Apollo Group Inc APOL -Apple Inc. AAPL -Applied Materials Inc AMAT -Archer-Daniels-Midland Co ADM -Assurant Inc AIZ -AutoNation Inc AN -AutoZone Inc AZO -Autodesk Inc ADSK -Automatic Data Processing ADP -AvalonBay Communities Inc AVB -Avery Dennison Corp AVY -Avon Products AVP -BB&T Corp BBT -BMC Software Inc BMC -Baker Hughes Inc BHI -Ball Corp BLL -Bank of America Corp BAC -Bard, C.R. Inc BCR -Baxter Intl Inc BAX -Beam Inc BEAM -Becton, Dickinson & Co BDX -Bed Bath & Beyond Inc BBBY -Bemis Co Inc BMS -Berkshire Hathaway B BRK/B -Best Buy Co Inc BBY -Big Lots Inc BIG -Biogen Idec Inc BIIB -BlackRock Inc BLK -Block H & R Inc HRB -Boeing Co BA -Boston Properties Inc BXP -Boston Scientific Corp BSX -Bristol-Myers Squibb BMY -Broadcom Corp A BRCM -Brown-Forman Corp B BF/B -CA Inc CA -CB Richard Ellis Group Inc A CBG -CBS Corp B CBS -CF Industries Holdings CF -CH Robinson Worldwide Inc CHRW -CIGNA Corp CI -CMS Energy Corp CMS -CONSOL Energy Inc CNX -CSX Corp CSX -CVS Caremark Corp. CVS -Cablevision Systems Co A CVC -Cabot Oil & Gas A COG -Cameron International Corp CAM -Campbell Soup Co CPB -Capital One Financial COF -Cardinal Health Inc CAH -CareFusion Corp. CFN -Carmax Inc KMX -Carnival Corp CCL -Caterpillar Inc CAT -Celgene Corp CELG -Centerpoint Energy Inc CNP -CenturyLink Inc CTL -Cephalon Inc CEPH -Cerner Corp CERN -Chesapeake Energy Corp CHK -Chevron Corp CVX -Chicago Mercantile Exchange CME -Chipotle Mexican Grill Inc. CMG -Chubb Corp CB -Cincinnati Financial Corp CINF -Cintas Corp CTAS -Cisco Systems Inc CSCO -Citigroup Inc C -Citrix Systems Inc CTXS -Cliffs Natural Resources Inc CLF -Clorox Co CLX -Coach Inc COH -Coca-Cola Co KO -Coca-Cola Enterprises CCE -Cognizant Tech Solutions Corp CTSH -Colgate-Palmolive Co CL -Comcast Corp CMCSA -Comerica Inc (MI) CMA -Computer Sciences CSC -Compuware Corp CPWR -ConAgra Foods Inc CAG -ConocoPhillips COP -Consolidated Edison Inc ED -Constellation Brands Inc A STZ -Constellation Energy Group CEG -Corning Inc GLW -Costco Wholesale Corp COST -Coventry Health Care Inc CVH -Covidien Plc COV -Cummins Inc CMI -DIRECTV Class A DTV -DTE Energy Co DTE -Danaher Corp DHR -Darden Restaurants Inc DRI -Davita Inc DVA -DeVry Inc DV -Dean Foods Co DF -Deere & Co DE -Dell Inc DELL -Denbury Resources Inc DNR -Dentsply Intl XRAY -Devon Energy Corp DVN -Diamond Offshore Drilling DO -Discover Financial Services DFS -Discovery Communications Inc DISCA -Dominion Resources Inc D -Donnelley, R.R. & Sons RRD -Dover Corp DOV -Dow Chemical DOW -Dr Pepper Snapple Group DPS -DuPont, E.I. de Nemours DD -Duke Energy Corp DUK -Dun & Bradstreet Corp DNB -E*TRADE Financial Corp ETFC -EMC Corp EMC -EOG Resources EOG -EQT Corporation EQT -Eastman Chemical Co EMN -Eaton Corp ETN -Ecolab Inc ECL -Edison Intl EIX -Edwards Lifesciences Corp EW -El Paso Corp EP -Electronic Arts ERTS -Emerson Electric Co EMR -Entergy Corp ETR -Equifax Inc EFX -Equity Residential EQR -Estee Lauder Cos. EL -Exelon Corp EXC -Expedia EXPE -Expeditors Intl of WA Inc EXPD -Express Scripts Inc ESRX -Exxon Mobil Corp XOM -F5 Networks Inc FFIV -FLIR Systems Inc FLIR -FMC Corp FMC -FMC Technologies Inc FTI -Family Dollar Stores Inc FDO -Fastenal Co FAST -FedEx Corp FDX -Federated Investors Inc B FII -Fidelity National Information FIS -Fifth Third Bancorp (OH) FITB -First Horizon National Corp FHN -First Solar Inc FSLR -FirstEnergy Corp FE -Fiserv Inc FISV -Flowserve Corp FLS -Fluor Corp FLR -Ford Motor Co F -Forest Laboratories FRX -Franklin Resources Inc BEN -Freeport McMoRan Copper & Gold FCX -Frontier Communications Corp FTR -GameStop Corp A GME -Gannett Co Inc GCI -Gap Inc GPS -General Dynamics GD -General Electric Co GE -General Mills Inc GIS -Genuine Parts Co GPC -Genworth Financial Inc GNW -Gilead Sciences Inc GILD -Goldman Sachs Group Inc GS -Goodrich Corp GR -Goodyear Tire & Rubber Co GT -Google Inc GOOG -Grainger, W.W. Inc GWW -HCP Inc HCP -Halliburton Co HAL -Harley-Davidson Inc HOG -Harman Intl Industries Inc HAR -Harris Corp HRS -Hartford Finl Services Group HIG -Hasbro Inc HAS -Health Care REIT Inc HCN -Heinz, H.J. Co HNZ -Helmerich & Payne Inc HP -Hershey Foods Corp HSY -Hess Corp HES -Hewlett-Packard Co HPQ -Home Depot Inc HD -Honeywell Intl Inc HON -Hormel Foods Corp HRL -Horton, D.R. Inc DHI -Hospira, Inc HSP -Host Hotels & Resorts Inc HST -Hudson City Bancorp HCBK -Humana Inc HUM -Huntington Bancshares (OH) HBAN -ITT Corporation ITT -Illinois Tool Works Inc ITW -Ingersoll-Rand Plc IR -Integrys Energy Group Inc TEG -Intel Corp INTC -IntercontinentalExchange ICE -Interpublic Group Cos IPG -Intl Business Machines Corp IBM -Intl Flavors & Fragrances IFF -Intl Game Technology IGT -Intl Paper Co IP -Intuit Inc INTU -Intuitive Surgical Inc ISRG -Invesco Ltd IVZ -Iron Mountain Inc IRM -JDS Uniphase Corp JDSU -JP Morgan Chase & Co JPM -Jabil Circuit Inc JBL -Jacobs Engineering Group Inc JEC -Janus Capital Group Inc JNS -Johnson & Johnson JNJ -Johnson Controls Inc JCI -Joy Global Inc JOYG -Juniper Networks Inc JNPR -KLA-Tencor Corporation KLAC -Kellogg Co K -KeyCorp KEY -Kimberly-Clark KMB -Kimco Realty Corp KIM -Kohl's Corp KSS -Kraft Foods Inc A KFT -Kroger Co KR -L-3 Communications Holdings LLL -LSI Corporation LSI -Lab Corp of America Hldgs LH -Legg Mason Inc LM -Leggett & Platt LEG -Lennar Corp LEN -Leucadia National Corp (NY) LUK -Lexmark International Inc LXK -Life Technologies Corp LIFE -Lilly, Eli & Co LLY -Limited Brands Inc LTD -Lincoln National Corp LNC -Linear Technology Corp LLTC -Lockheed Martin LMT -Loews Corp L -Lorillard Inc LO -Lowe's Cos Inc LOW -M&T Bank Corp MTB -MEMC Electronic Materials WFR -Macy's Inc M -Marathon Oil Corp MRO -Marathon Petroleum Corp. MPC -Marriott Intl A MAR -Marsh & McLennan Companies MMC -Masco Corp MAS -Mastercard Inc A MA -Mattel Inc MAT -McCormick & Co MKC -McDonald's Corp MCD -McGraw-Hill Cos Inc MHP -McKesson Corp MCK -Mead Johnson Nutrition Co MJN -MeadWestvaco Corp MWV -Medco Health Solutions Inc MHS -Medtronic Inc MDT -Merck & Co Inc MRK -Metlife Inc MET -Metropcs Communications Inc PCS -Microchip Technology Inc MCHP -Micron Technology Inc MU -Microsoft Corp MSFT -Molex Inc MOLX -Molson Coors Brewing Co B TAP -Monsanto Co. MON -Monster Worldwide Inc MWW -Moody's Corp MCO -Morgan Stanley MS -Mosaic Co MOS -Motorola Mobility Holdings, Inc MMI -Motorola Solutions, Inc MSI -Murphy Oil Corp MUR -Mylan Inc. MYL -NICOR Inc GAS -NIKE Inc B NKE -NRG Energy NRG -NYSE Euronext NYX -Nabors Industries Ltd NBR -Nasdaq OMX Group/The NDAQ -National Oilwell Varco Inc NOV -NetApp Inc NTAP -NetFlix Inc NFLX -Newell Rubbermaid Inc NWL -Newfield Exploration Co NFX -Newmont Mining Corp NEM -News Corporation NWSA -NextEra Energy Inc NEE -Nisource Inc NI -Noble Corp NE -Noble Energy Inc NBL -Nordstrom Inc JWN -Norfolk Southern Corp NSC -Northeast Utilities NU -Northern Trust Corp (IL) NTRS -Northrop Grumman Corp NOC -Novellus Systems Inc NVLS -Nucor Corp NUE -Nvidia Corp NVDA -O'Reilly Automotive ORLY -ONEOK Inc OKE -Occidental Petroleum OXY -Omnicom Group OMC -Oracle Corp ORCL -Owens-Illinois Inc OI -PACCAR Inc PCAR -PG&E Corporation PCG -PNC Finl Services Group PNC -PPG Industries Inc PPG -PPL Corp PPL -Pall Corp PLL -Parker-Hannifin Corp PH -Patterson Cos Inc PDCO -Paychex Inc PAYX -Peabody Energy Corp BTU -Penney, J.C. Inc JCP -People's United Financial Inc PBCT -Pepco Holdings Inc POM -PepsiCo Inc PEP -PerkinElmer Inc PKI -Pfizer Inc PFE -Philip Morris International PM -Pinnacle West Capital (AZ) PNW -Pioneer Natural Resources PXD -Pitney Bowes Inc PBI -Plum Creek Timber Co PCL -Praxair Inc PX -Precision Castparts Corp PCP -Priceline.com Inc PCLN -Principal Financial Group PFG -ProLogis, Inc PLD -Procter & Gamble PG -Progress Energy Inc PGN -Progressive Corp PGR -Prudential Financial Inc PRU -Public Service Enterprise Grp PEG -Public Storage PSA -Pulte Group Inc PHM -QEP Resources QEP -QUALCOMM Inc QCOM -Quanta Services Inc PWR -Quest Diagnostics DGX -Ralph Lauren Corp RL -Range Resources Corp RRC -Raytheon Co RTN -Red Hat Inc RHT -Regions Financial Corp RF -Republic Services Inc RSG -Reynolds American Inc RAI -Robert Half Intl Inc RHI -Rockwell Automation Inc ROK -Rockwell Collins COL -Roper Industries Inc ROP -Ross Stores Inc ROST -Rowan Companies Inc RDC -Ryder System Inc R -SAIC Inc SAI -SCANA Corp SCG -SLM Corp SLM -Safeway Inc SWY -Salesforce.com CRM -SanDisk Corp SNDK -Sara Lee Corp SLE -Schlumberger Ltd SLB -Schwab, Charles Corp SCHW -Scripps Networks Interactive SNI -Sealed Air Corp SEE -Sears Holdings Corp SHLD -Sempra Energy SRE -Sherwin-Williams Co SHW -Sigma-Aldrich Corp SIAL -Simon Property Group SPG -Smucker, J.M. Co SJM -Snap On Inc SNA -Southern Co SO -Southwest Airlines Co LUV -Southwestern Energy Co SWN -Spectra Energy Corp SE -Sprint Nextel Corp S -St Jude Medical Inc STJ -Stanley Black & Decker SWK -Staples Inc SPLS -Starbucks Corp SBUX -Starwood Hotel & Resort World HOT -State Street Corp STT -Stericycle Inc SRCL -Stryker Corp SYK -SunTrust Banks Inc (GA) STI -Sunoco Inc SUN -Supervalu Inc SVU -Symantec Corp SYMC -Sysco Corp SYY -T Rowe Price Group Inc TROW -TECO Energy Inc TE -TJX Cos Inc TJX -Target Corp TGT -Tellabs Inc TLAB -Tenet Healthcare THC -Teradata Corp TDC -Teradyne Inc TER -Tesoro Corp TSO -Texas Instruments Inc TXN -Textron Inc TXT -The Bank of New York Mellon Corp BK -Thermo Fisher Scientific TMO -Tiffany & Co TIF -Time Warner Cable Inc TWC -Time Warner Inc TWX -Titanium Metals Corp TIE -Torchmark Corp TMK -Total System Services Inc TSS -Travelers Cos Inc TRV -Tyco Intl TYC -Tyson Foods Inc A TSN -US Bancorp USB -Union Pacific Corp UNP -United Parcel Service Inc B UPS -United States Steel Corp X -United Technologies Corp UTX -Unitedhealth Group Inc UNH -Unum Group UNM -Urban Outfitters URBN -VF Corp VFC -Valero Energy Corp VLO -Varian Medical Systems Inc VAR -Ventas Inc VTR -VeriSign Inc VRSN -Verizon Communications Inc VZ -Viacom Inc B VIA/B -Visa Inc V -Vornado Realty Trust VNO -Vulcan Materials Co VMC -Wal-Mart Stores WMT -Walgreen Co WAG -Walt Disney Co DIS -Washington Post Co B WPO -Waste Management Inc WM -Waters Corp WAT -Watson Pharmaceuticals WPI -WellPoint Inc WLP -Wells Fargo & Co WFC -Western Digital Corp WDC -Western Union Co WU -Weyerhaeuser Co WY -Whirlpool Corp WHR -Whole Foods Market Inc WFM -Williams Cos Inc WMB -Windstream Corp WIN -Wisconsin Energy Corp WEC -Wyndham Worldwide Corp WYN -Wynn Resorts Ltd WYNN -XL Group Plc XL -Xcel Energy Inc XEL -Xerox Corp XRX -Xilinx Inc XLNX -Yahoo Inc YHOO -Yum! Brands Inc YUM -Zimmer Holdings Inc ZMH -Zions Bancorp (UT) ZION -eBay Inc. EBAY diff --git a/sp500 tickers 10-17.csv b/sp500 tickers 10-17.csv new file mode 100644 index 0000000..7371056 --- /dev/null +++ b/sp500 tickers 10-17.csv @@ -0,0 +1,501 @@ +Constituent Name Constituent Symbol +3M Co MMM +ACE Limited ACE +AES Corp AES +AFLAC Inc AFL +AK Steel Hldg Corp AKS +AT&T Inc T +Abbott Laboratories ABT +Abercrombie & Fitch Company A ANF +Accenture plc ACN +Adobe Systems Inc ADBE +Advanced Micro Devices AMD +Aetna Inc AET +Agilent Technologies Inc A +Air Products & Chemicals Inc APD +Airgas Inc ARG +Akamai Technologies Inc AKAM +Alcoa Inc AA +Allegheny Technologies Inc ATI +Allergan Inc AGN +Allstate Corp ALL +Alpha Natural Resources ANR +Altera Corp ALTR +Altria Group Inc MO +Amazon.com Inc AMZN +Ameren Corp AEE +American Electric Power AEP +American Express Co AXP +American Intl Group Inc AIG +American Tower Corp A AMT +Ameriprise Financial Inc AMP +AmerisourceBergen Corp ABC +Amgen Inc AMGN +Amphenol Corp A APH +Anadarko Petroleum Corp APC +Analog Devices Inc ADI +Aon Corp AON +Apache Corp APA +Apartment Investment & Mgmt AIV +Apollo Group Inc APOL +Apple Inc. AAPL +Applied Materials Inc AMAT +Archer-Daniels-Midland Co ADM +Assurant Inc AIZ +AutoNation Inc AN +AutoZone Inc AZO +Autodesk Inc ADSK +Automatic Data Processing ADP +AvalonBay Communities Inc AVB +Avery Dennison Corp AVY +Avon Products AVP +BB&T Corp BBT +BMC Software Inc BMC +Baker Hughes Inc BHI +Ball Corp BLL +Bank of America Corp BAC +Bard, C.R. Inc BCR +Baxter Intl Inc BAX +Beam Inc BEAM +Becton, Dickinson & Co BDX +Bed Bath & Beyond Inc BBBY +Bemis Co Inc BMS +Berkshire Hathaway B BRK/B +Best Buy Co Inc BBY +Big Lots Inc BIG +Biogen Idec Inc BIIB +BlackRock Inc BLK +Block H & R Inc HRB +Boeing Co BA +Boston Properties Inc BXP +Boston Scientific Corp BSX +Bristol-Myers Squibb BMY +Broadcom Corp A BRCM +Brown-Forman Corp B BF/B +CA Inc CA +CB Richard Ellis Group Inc A CBG +CBS Corp B CBS +CF Industries Holdings CF +CH Robinson Worldwide Inc CHRW +CIGNA Corp CI +CMS Energy Corp CMS +CONSOL Energy Inc CNX +CSX Corp CSX +CVS Caremark Corp. CVS +Cablevision Systems Co A CVC +Cabot Oil & Gas A COG +Cameron International Corp CAM +Campbell Soup Co CPB +Capital One Financial COF +Cardinal Health Inc CAH +CareFusion Corp. CFN +Carmax Inc KMX +Carnival Corp CCL +Caterpillar Inc CAT +Celgene Corp CELG +Centerpoint Energy Inc CNP +CenturyLink Inc CTL +Cerner Corp CERN +Chesapeake Energy Corp CHK +Chevron Corp CVX +Chicago Mercantile Exchange CME +Chipotle Mexican Grill Inc. CMG +Chubb Corp CB +Cincinnati Financial Corp CINF +Cintas Corp CTAS +Cisco Systems Inc CSCO +Citigroup Inc C +Citrix Systems Inc CTXS +Cliffs Natural Resources Inc CLF +Clorox Co CLX +Coach Inc COH +Coca-Cola Co KO +Coca-Cola Enterprises CCE +Cognizant Tech Solutions Corp CTSH +Colgate-Palmolive Co CL +Comcast Corp CMCSA +Comerica Inc (MI) CMA +Computer Sciences CSC +Compuware Corp CPWR +ConAgra Foods Inc CAG +ConocoPhillips COP +Consolidated Edison Inc ED +Constellation Brands Inc A STZ +Constellation Energy Group CEG +Corning Inc GLW +Costco Wholesale Corp COST +Coventry Health Care Inc CVH +Covidien Plc COV +Cummins Inc CMI +DIRECTV Class A DTV +DTE Energy Co DTE +Danaher Corp DHR +Darden Restaurants Inc DRI +Davita Inc DVA +DeVry Inc DV +Dean Foods Co DF +Deere & Co DE +Dell Inc DELL +Denbury Resources Inc DNR +Dentsply Intl XRAY +Devon Energy Corp DVN +Diamond Offshore Drilling DO +Discover Financial Services DFS +Discovery Communications Inc DISCA +Dominion Resources Inc D +Donnelley, R.R. & Sons RRD +Dover Corp DOV +Dow Chemical DOW +Dr Pepper Snapple Group DPS +DuPont, E.I. de Nemours DD +Duke Energy Corp DUK +Dun & Bradstreet Corp DNB +E*TRADE Financial Corp ETFC +EMC Corp EMC +EOG Resources EOG +EQT Corporation EQT +Eastman Chemical Co EMN +Eaton Corp ETN +Ecolab Inc ECL +Edison Intl EIX +Edwards Lifesciences Corp EW +El Paso Corp EP +Electronic Arts ERTS +Emerson Electric Co EMR +Entergy Corp ETR +Equifax Inc EFX +Equity Residential EQR +Estee Lauder Cos. EL +Exelon Corp EXC +Expedia EXPE +Expeditors Intl of WA Inc EXPD +Express Scripts Inc ESRX +Exxon Mobil Corp XOM +F5 Networks Inc FFIV +FLIR Systems Inc FLIR +FMC Corp FMC +FMC Technologies Inc FTI +Family Dollar Stores Inc FDO +Fastenal Co FAST +FedEx Corp FDX +Federated Investors Inc B FII +Fidelity National Information FIS +Fifth Third Bancorp (OH) FITB +First Horizon National Corp FHN +First Solar Inc FSLR +FirstEnergy Corp FE +Fiserv Inc FISV +Flowserve Corp FLS +Fluor Corp FLR +Ford Motor Co F +Forest Laboratories FRX +Franklin Resources Inc BEN +Freeport McMoRan Copper & Gold FCX +Frontier Communications Corp FTR +GameStop Corp A GME +Gannett Co Inc GCI +Gap Inc GPS +General Dynamics GD +General Electric Co GE +General Mills Inc GIS +Genuine Parts Co GPC +Genworth Financial Inc GNW +Gilead Sciences Inc GILD +Goldman Sachs Group Inc GS +Goodrich Corp GR +Goodyear Tire & Rubber Co GT +Google Inc GOOG +Grainger, W.W. Inc GWW +HCP Inc HCP +Halliburton Co HAL +Harley-Davidson Inc HOG +Harman Intl Industries Inc HAR +Harris Corp HRS +Hartford Finl Services Group HIG +Hasbro Inc HAS +Health Care REIT Inc HCN +Heinz, H.J. Co HNZ +Helmerich & Payne Inc HP +Hershey Foods Corp HSY +Hess Corp HES +Hewlett-Packard Co HPQ +Home Depot Inc HD +Honeywell Intl Inc HON +Hormel Foods Corp HRL +Horton, D.R. Inc DHI +Hospira, Inc HSP +Host Hotels & Resorts Inc HST +Hudson City Bancorp HCBK +Humana Inc HUM +Huntington Bancshares (OH) HBAN +ITT Corporation ITT +Illinois Tool Works Inc ITW +Ingersoll-Rand Plc IR +Integrys Energy Group Inc TEG +Intel Corp INTC +IntercontinentalExchange ICE +Interpublic Group Cos IPG +Intl Business Machines Corp IBM +Intl Flavors & Fragrances IFF +Intl Game Technology IGT +Intl Paper Co IP +Intuit Inc INTU +Intuitive Surgical Inc ISRG +Invesco Ltd IVZ +Iron Mountain Inc IRM +JDS Uniphase Corp JDSU +JP Morgan Chase & Co JPM +Jabil Circuit Inc JBL +Jacobs Engineering Group Inc JEC +Janus Capital Group Inc JNS +Johnson & Johnson JNJ +Johnson Controls Inc JCI +Joy Global Inc JOYG +Juniper Networks Inc JNPR +KLA-Tencor Corporation KLAC +Kellogg Co K +KeyCorp KEY +Kimberly-Clark KMB +Kimco Realty Corp KIM +Kohl's Corp KSS +Kraft Foods Inc A KFT +Kroger Co KR +L-3 Communications Holdings LLL +LSI Corporation LSI +Lab Corp of America Hldgs LH +Legg Mason Inc LM +Leggett & Platt LEG +Lennar Corp LEN +Leucadia National Corp (NY) LUK +Lexmark International Inc LXK +Life Technologies Corp LIFE +Lilly, Eli & Co LLY +Limited Brands Inc LTD +Lincoln National Corp LNC +Linear Technology Corp LLTC +Lockheed Martin LMT +Loews Corp L +Lorillard Inc LO +Lowe's Cos Inc LOW +M&T Bank Corp MTB +MEMC Electronic Materials WFR +Macy's Inc M +Marathon Oil Corp MRO +Marathon Petroleum Corp. MPC +Marriott Intl A MAR +Marsh & McLennan Companies MMC +Masco Corp MAS +Mastercard Inc A MA +Mattel Inc MAT +McCormick & Co MKC +McDonald's Corp MCD +McGraw-Hill Cos Inc MHP +McKesson Corp MCK +Mead Johnson Nutrition Co MJN +MeadWestvaco Corp MWV +Medco Health Solutions Inc MHS +Medtronic Inc MDT +Merck & Co Inc MRK +Metlife Inc MET +Metropcs Communications Inc PCS +Microchip Technology Inc MCHP +Micron Technology Inc MU +Microsoft Corp MSFT +Molex Inc MOLX +Molson Coors Brewing Co B TAP +Monsanto Co. MON +Monster Worldwide Inc MWW +Moody's Corp MCO +Morgan Stanley MS +Mosaic Co MOS +Motorola Mobility Holdings, Inc MMI +Motorola Solutions, Inc MSI +Murphy Oil Corp MUR +Mylan Inc. MYL +NICOR Inc GAS +NIKE Inc B NKE +NRG Energy NRG +NYSE Euronext NYX +Nabors Industries Ltd NBR +Nasdaq OMX Group/The NDAQ +National Oilwell Varco Inc NOV +NetApp Inc NTAP +NetFlix Inc NFLX +Newell Rubbermaid Inc NWL +Newfield Exploration Co NFX +Newmont Mining Corp NEM +News Corporation NWSA +NextEra Energy Inc NEE +Nisource Inc NI +Noble Corp NE +Noble Energy Inc NBL +Nordstrom Inc JWN +Norfolk Southern Corp NSC +Northeast Utilities NU +Northern Trust Corp (IL) NTRS +Northrop Grumman Corp NOC +Novellus Systems Inc NVLS +Nucor Corp NUE +Nvidia Corp NVDA +O'Reilly Automotive ORLY +ONEOK Inc OKE +Occidental Petroleum OXY +Omnicom Group OMC +Oracle Corp ORCL +Owens-Illinois Inc OI +PACCAR Inc PCAR +PG&E Corporation PCG +PNC Finl Services Group PNC +PPG Industries Inc PPG +PPL Corp PPL +Pall Corp PLL +Parker-Hannifin Corp PH +Patterson Cos Inc PDCO +Paychex Inc PAYX +Peabody Energy Corp BTU +Penney, J.C. Inc JCP +People's United Financial Inc PBCT +Pepco Holdings Inc POM +PepsiCo Inc PEP +PerkinElmer Inc PKI +Pfizer Inc PFE +Philip Morris International PM +Pinnacle West Capital (AZ) PNW +Pioneer Natural Resources PXD +Pitney Bowes Inc PBI +Plum Creek Timber Co PCL +Praxair Inc PX +Precision Castparts Corp PCP +Priceline.com Inc PCLN +Principal Financial Group PFG +ProLogis, Inc PLD +Procter & Gamble PG +Progress Energy Inc PGN +Progressive Corp PGR +Prudential Financial Inc PRU +Public Service Enterprise Grp PEG +Public Storage PSA +Pulte Group Inc PHM +QEP Resources QEP +QUALCOMM Inc QCOM +Quanta Services Inc PWR +Quest Diagnostics DGX +Ralph Lauren Corp RL +Range Resources Corp RRC +Raytheon Co RTN +Red Hat Inc RHT +Regions Financial Corp RF +Republic Services Inc RSG +Reynolds American Inc RAI +Robert Half Intl Inc RHI +Rockwell Automation Inc ROK +Rockwell Collins COL +Roper Industries Inc ROP +Ross Stores Inc ROST +Rowan Companies Inc RDC +Ryder System Inc R +SAIC Inc SAI +SCANA Corp SCG +SLM Corp SLM +Safeway Inc SWY +Salesforce.com CRM +SanDisk Corp SNDK +Sara Lee Corp SLE +Schlumberger Ltd SLB +Schwab, Charles Corp SCHW +Scripps Networks Interactive SNI +Sealed Air Corp SEE +Sears Holdings Corp SHLD +Sempra Energy SRE +Sherwin-Williams Co SHW +Sigma-Aldrich Corp SIAL +Simon Property Group SPG +Smucker, J.M. Co SJM +Snap On Inc SNA +Southern Co SO +Southwest Airlines Co LUV +Southwestern Energy Co SWN +Spectra Energy Corp SE +Sprint Nextel Corp S +St Jude Medical Inc STJ +Stanley Black & Decker SWK +Staples Inc SPLS +Starbucks Corp SBUX +Starwood Hotel & Resort World HOT +State Street Corp STT +Stericycle Inc SRCL +Stryker Corp SYK +SunTrust Banks Inc (GA) STI +Sunoco Inc SUN +Supervalu Inc SVU +Symantec Corp SYMC +Sysco Corp SYY +T Rowe Price Group Inc TROW +TE Connectivity TEL +TECO Energy Inc TE +TJX Cos Inc TJX +Target Corp TGT +Tellabs Inc TLAB +Tenet Healthcare THC +Teradata Corp TDC +Teradyne Inc TER +Tesoro Corp TSO +Texas Instruments Inc TXN +Textron Inc TXT +The Bank of New York Mellon Corp BK +Thermo Fisher Scientific TMO +Tiffany & Co TIF +Time Warner Cable Inc TWC +Time Warner Inc TWX +Titanium Metals Corp TIE +Torchmark Corp TMK +Total System Services Inc TSS +Travelers Cos Inc TRV +Tyco Intl TYC +Tyson Foods Inc A TSN +US Bancorp USB +Union Pacific Corp UNP +United Parcel Service Inc B UPS +United States Steel Corp X +United Technologies Corp UTX +Unitedhealth Group Inc UNH +Unum Group UNM +Urban Outfitters URBN +VF Corp VFC +Valero Energy Corp VLO +Varian Medical Systems Inc VAR +Ventas Inc VTR +VeriSign Inc VRSN +Verizon Communications Inc VZ +Viacom Inc B VIA/B +Visa Inc V +Vornado Realty Trust VNO +Vulcan Materials Co VMC +Wal-Mart Stores WMT +Walgreen Co WAG +Walt Disney Co DIS +Washington Post Co B WPO +Waste Management Inc WM +Waters Corp WAT +Watson Pharmaceuticals WPI +WellPoint Inc WLP +Wells Fargo & Co WFC +Western Digital Corp WDC +Western Union Co WU +Weyerhaeuser Co WY +Whirlpool Corp WHR +Whole Foods Market Inc WFM +Williams Cos Inc WMB +Windstream Corp WIN +Wisconsin Energy Corp WEC +Wyndham Worldwide Corp WYN +Wynn Resorts Ltd WYNN +XL Group Plc XL +Xcel Energy Inc XEL +Xerox Corp XRX +Xilinx Inc XLNX +Yahoo Inc YHOO +Yum! Brands Inc YUM +Zimmer Holdings Inc ZMH +Zions Bancorp (UT) ZION +eBay Inc. EBAY diff --git a/utils.R b/utils.R new file mode 100644 index 0000000..626324e --- /dev/null +++ b/utils.R @@ -0,0 +1,123 @@ +#fix bug in adjRatios +source("patch-adjRatios.R") +assignInNamespace("adjRatios",adjRatios,ns="TTR") +library(TTR) +rm(adjRatios) + +getBloombergData <- function(conn,ticker, start.date, end.date=Sys.Date()){ + ohlc <- bdh(conn,paste(ticker,"Equity"),c("PX_OPEN","PX_HIGH","PX_LOW","PX_LAST","VOLUME"),start.date,end.date,dates.as.row.names=F) + colnames(ohlc) <- c("Date","Open","High","Low","Close","Volume") + ohlc <- xts(ohlc[,-1],as.Date(ohlc$Date)) + #split information + spl <- bds(conn,paste(ticker,"Equity"),c("EQY_DVD_ADJUST_FACT")) + # bds returns NULL if there is no data. + #Adjustment Factor Operator Type + # 1 = div + # 2 = mul + # 3 = add + # 4 = sub + #Adjustment Factor Flag + # 1 = prices only + # 2 = volumes only + # 3 = prices and volume + + # can't handle 3 or 4 yet + if(NROW(spl)!=0){ + if (NROW(spl[spl[,"Adjustment Factor Operator Type"] %in% c(3, 4),])>0){ + stop("case not handled") + }else{ + spl[spl[,"Adjustment Factor Operator Type"]==1, "Adjustment Factor"] <- + 1/spl[spl[,"Adjustment Factor Operator Type"]==1, "Adjustment Factor"] + } + spl <- xts(data.frame(spl$"Adjustment Factor", + ifelse(spl$"Adjustment Factor Flag" %in% c(2,3), + spl$"Adjustment Factor",NA)), + order.by = as.Date(spl$"Adjustment Date")) + #aggregate non-unique dates + spl <- as.xts(aggregate(spl, identity, prod, na.rm=T)) + if(any( (time(spl) >= start.date) && (time(spl) <= end.date))){ + spl <- window(spl, start=start.date, end = end.date) + }else{ + spl <- NULL + } + } + #div information + #we need to override the end date as well cause the Ex-Date might be in the + #future + override_fields <- c("DVD_START_DT", "DVD_END_DT") + override_values <- c(format(start.date, "%Y%m%d"),format(end.date, "%Y%m%d")) + div <- bds(conn,paste(ticker,"Equity"), c("DVD_HIST"), override_fields, + override_values) + if(NROW(div)!=0){ + div <- xts(div$"Dividend Amount", as.Date(div$"Ex-Date")) + #aggregate non-unique dates + div <- as.xts(aggregate(div, identity, sum)) + } + + if(is.null(div) && is.null(spl)){ + divspl <- NULL + }else if(is.null(div)){ + #need to use merge.xts, otherwise spl is cast to a numeric + divspl <- merge.xts(NA, spl ,all=T) + }else if(is.null(spl)){ + divspl <- merge.xts(div ,NA, NA, all=T) + }else{ + divspl <- merge(div, spl, all=T) + } + if(!is.null(divspl)){ + colnames(divspl) <- c("Adj.Div","Split","Split2") + ohlc <- merge(ohlc, divspl, all = TRUE) + if (all(is.na(ohlc[, "Split2"]))) { + s.ratio2 <- rep(1, NROW(ohlc)) + }else { + s.ratio2 <- adjRatios(split = ohlc[, "Split2"])[, 1] + } + ohlc <- cbind(ohlc, ohlc[, "Adj.Div"] * (1/s.ratio2)) + colnames(ohlc)[NCOL(ohlc)] <- "Div" + adj <- adjRatios(ohlc[, "Split"], ohlc[, "Div"], ohlc[, "Close"]) + s.ratio <- adj[, 1] + d.ratio <- adj[, 2] + cn <- colnames(ohlc) + ohlc <- cbind(ohlc, ohlc[, "Close"]) + colnames(ohlc) <- c(cn, "Unadj.Close") + ohlc[, "Open"] <- ohlc[, "Open"] * d.ratio * s.ratio + ohlc[, "High"] <- ohlc[, "High"] * d.ratio * s.ratio + ohlc[, "Low"] <- ohlc[, "Low"] * d.ratio *s.ratio + ohlc[, "Close"] <- ohlc[, "Close"] * d.ratio * s.ratio + ohlc[, "Volume"] <- ohlc[, "Volume"] * (1/s.ratio2) + ohlc <- ohlc[, c("Open", "High", "Low", "Close", "Volume", + "Unadj.Close", "Div", "Split", "Adj.Div")] + }else{ + cn <- colnames(ohlc) + ohlc <- cbind(ohlc, ohlc[, "Close"]) + colnames(ohlc) <- c(cn, "Unadj.Close") + ohlc <- merge(ohlc,NA,NA,NA,all = TRUE) + colnames(ohlc) <- c(colnames(ohlc)[1:6],"Adj.Div","Split","Div") + } + return( ohlc ) +} + +memb <- function(index,add,date){ + #return the spx tickers at a given date using the history of changes + #index: sp500 tickers as of today + #add: tabele with list of changes + #date: date at which we make the query + toreverse <- add[add$date>=date,] + current.index <- index + for(i in 1:nrow(toreverse)){ + if(toreverse$ticker.add[i]!=""){ + current.index <- current.index[-match(toreverse$ticker.add[i],current.index)] + } + if(toreverse$ticker.del[i]!=""){ + current.index <- sort(c(current.index,toreverse$ticker.del[i])) + } + } + current.index +} + +memb.bb <- function(date){ + #return the spx tickers at a given date using bloomberg api + sp500.tickers <- bds(conn, "SPX Index", "INDX_MWEIGHT_HIST", + "END_DATE_OVERRIDE", format(date, "%Y%m%d")) + return( gsub(" [A-Z]*","",sp500.tickers[,1]) ) +} -- cgit v1.2.3-70-g09d2