Ch 5 - AIG

Load data AIG

library(Quandl)
AIG_2002_Today <- Quandl("GOOG/NYSE_AIG", start_date="2002-01-01", collapse="monthly", type="xts")

AIG_2002_2007 <- Quandl("GOOG/NYSE_AIG", start_date="2002-01-01", end_date="2007-12-31", collapse="monthly", type="xts")

AIG_2009_2012 <- Quandl("GOOG/NYSE_AIG", start_date="2009-01-01", end_date="2012-12-31", collapse="monthly", type="xts")

mean series

mean(AIG_2002_Today[,"Close"])
[1] 620.6963
mean(AIG_2002_2007[,"Close"])
[1] 1284.019
mean(AIG_2009_2012[,"Close"])
[1] 31.42438

Time Series 2002 to today

plot(AIG_2002_Today[,"Close"], xlab = "Time", ylab = "Price", main = "AIG 2002 to today")

plot of chunk unnamed-chunk-5

Time Series 2002 to today from google/finance

alt text

Time Series 2002 to 2007

plot(AIG_2002_2007[,"Close"], xlab = "Time", ylab = "Price", main = "AIG 2002 to 2007")

plot of chunk unnamed-chunk-6

Time Series 2002 to 2007 from google/finance

alt text

Histogram 2002 to 2007

hist(AIG_2002_2007[, "Close"], breaks = 7, xlab = "Price", ylab = "# of Months", main = "AIG 2002 to 2007")

plot of chunk unnamed-chunk-7

Histogram 2002 to 2007 from book

alt text

Histogram 2009 to 2012

hist(AIG_2009_2012[, "Close"], breaks = 7, xlab = "Price", ylab = "# of Months", main = "AIG 2009 to 2012")

plot of chunk unnamed-chunk-8