-
-
Save neerajt/192ad539e459f82a332a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(Quandl) | |
symbolList <- c("AMZN","GOOG", "MSFT", "AAPL", "GLW", "HAL") | |
data <- data.frame("Date" = c(), | |
"Effective Tax Rate" = c(), | |
"Earnings Before Interest and Taxes" = c(), | |
"symbol" = c()) | |
for(symbol in symbolList){ | |
effectiveTaxRate = Quandl(paste0("DMDRN/", symbol, "_EFF_TAX"), trim_start="2003-01-01", trim_end="2014-12-31") | |
EBIT = Quandl(paste0("DMDRN/", symbol, "_EBIT"), trim_start="2003-01-01", trim_end="2014-12-31") | |
tmp_data <- merge(effectiveTaxRate,EBIT,by=c("Date")) | |
tmp_data$symbol <- symbol | |
data <- rbind(data, tmp_data) | |
bp <- barplot(tail(table(data$symbol), 50), xaxt="n") | |
labs <- names(table(data$symbol)) | |
text(x=bp, y=-1.25, labels=labs, xpd=TRUE, srt=315) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment