Archive

Tag Archives: Cumulative Abnormal Returns

This post seeks to expand the previous event study carried out on firms in the financial sector to include all firms across all sectors contained in the SP 500 index. The events of interest remain unchanged and can be found here  as per the previous post. For the sake of convenience and given that the plot area becomes to small to include the event summaries in the rectangle (as was done before), I will list a condensed version of the events surrounding/contained in the two rounds of quantitative easing.

lllll

::::::::::Time line Begins ::::::::::

A. 25 November 2008

The Federal Reserve Board announces a new program to purchase direct obligations of housing related government-sponsored enterprises (GSEs)—Fannie Mae, Freddie Mac and Federal Home Loan Banks—and MBS backed by the GSEs. Purchases of up to $100 billion in GSE direct obligations will be conducted as auctions among Federal Reserve primary dealers. Purchases of up to $500 billion in MBS will be conducted by asset managers.

B. 16 December 2008

The focus of the Committee’s policy going forward will be to support the functioning of financial markets and stimulate the economy through open market operations and other measures that sustain the size of the Federal Reserve’s balance sheet at a high level. As previously announced, over the next few quarters the Federal Reserve will purchase large quantities of agency debt and mortgage-backed securities to provide support to the mortgage and housing markets, and it stands ready to expand its purchases of agency debt and mortgage-backed securities as conditions warrant. The Committee is also evaluating the potential benefits of purchasing longer-term Treasury securities.

C. 28 January 2009

The Federal Reserve continues to purchase large quantities of agency debt and mortgage-backed securities to provide support to the mortgage and housing markets, and it stands ready to expand the quantity of such purchases and the duration of the purchase program as conditions warrant. The Committee also is prepared to purchase longer-term Treasury securities if evolving circumstances indicate that such transactions would be particularly effective in improving conditions in private credit markets.

D. 13 February 2009

U.S. Congress approves President Barack Obama’s “Stimulus Package”. The measure will inject an estimated $787 billion (the CBO estimates that $821 billion was actually spent) into the U.S. economy through a variety of tax credits, transfers to support state government programs and “shovel ready” infrastructure projects. The measure is signed into law on 17 February 2009.

E. 9 March 2009

The stock market bottoms. After this point, stock prices begin rising as the rate at which business conditions are worsening begins to decelerate.

F. 18 March 2009

The FOMC votes to maintain the target range for the effective federal funds at 0 to 0.25 percent. In addition, the FOMC decides to increase the size of the Federal Reserve’s balance sheet by purchasing up to an additional $750 billion of agency mortgage-backed securities, bringing its total purchases of these securities to up to $1.25 trillion this year, and to increase its purchases of agency debt this year by up to $100 billion to a total of up to $200 billion. The FOMC also decides to purchase up to $300 billion of longer-term Treasury securities over the next six months to help improve conditions in private credit markets. Finally, the FOMC announces that it anticipates expanding the range of eligible collateral for the TALF (Term Asset-Backed Securities Loan Facility).The Federal Reserve Bank of New York releases more information on the Federal Reserve’s plan to purchase Treasury securities. The Desk will concentrate its purchases in nominal maturities ranging from 2 to 10 years. The purchases will be conducted with the Federal Reserve’s primary dealers through a series of competitive auctions and will occur two to three times a week. The Desk plans to hold the first purchase operation late next week.

G. 16 March 2010

The FOMC announces that “The Committee will maintain the target range for the federal funds rate at 0 to 1/4 percent and continues to anticipate that economic conditions, including low rates of resource utilization, subdued inflation trends, and stable inflation expectations, are likely to warrant exceptionally low levels of the federal funds rate for an extended period. To provide support to mortgage lending and housing markets and to improve overall conditions in private credit markets, the Federal Reserve has been purchasing $1.25 trillion of agency mortgage-backed securities and about $175 billion of agency debt; those purchases are nearing completion, and the remaining transactions will be executed by the end of this month. The Committee will continue to monitor the economic outlook and financial developments and will employ its policy tools as necessary to promote economic recovery and price stability.

H. 31 March 2010

QE1 ends.

I. 10 August 2010

The FOMC agrees to keep constant the Federal Reserve’s holdings of securities at their current level by reinvesting principal payments from agency debt and agency mortgage-backed securities in longer-term Treasury securities. The Committee will continue to roll over the Federal Reserve’s holdings of Treasury securities as they mature.

J. 27 August 2010

Federal Reserve chairman Ben Bernanke states that “The committee is prepared to provide additional monetary accommodation through unconventional measures if it proves necessary, especially if the outlook were to deteriorate significantly”, and that he believes “that additional purchases of longer-term securities, should the FOMC choose to undertake them, would be effective in further easing financial conditions.”

K. 3 November 2010

The FOMC announces its decision to expand its holdings of securities in order to promote a stronger pace of economic recovery and to help ensure that inflation, over time, is at levels consistent with its mandate. The Committee will maintain its existing policy of reinvesting principal payments from its securities holdings and to purchase a further $600 billion of longer-term Treasury securities by the end of the second quarter of 2011, a pace of about $75 billion per month.

L. 22 June 2011

The FOMC announces that “The Committee continues to anticipate that economic conditions–including low rates of resource utilization and a subdued outlook for inflation over the medium run–are likely to warrant exceptionally low levels for the federal funds rate for an extended period. The Committee will complete its purchases of $600 billion of longer-term Treasury securities by the end of this month and will maintain its existing policy of reinvesting principal payments from its securities holdings. The Committee will regularly review the size and composition of its securities holdings and is prepared to adjust those holdings as appropriate.

M. 30 June 2011

QE2 ends, with no immediate plans for a third round of quantitative easing.

::::::::::Time line Ends:::::::::::

This time line is copied almost verbatim from this site

lpll

Instead  of just looking at the impact of events on firms in the financial sector, we will examine how each of these events affect the cumulative abnormal returns of each sector through time as well as its impact across sectors while holding time constant. As before, the slider function will be used to select the desired event.

lllll

ghj

Suppose we were interested in the impact of event B, an announcement by the Fed to further support financial and housing markets by future purchases of agency securities and MBS, on the various industry sectors. We would push the slider to event 2 which yields the following plot :

vbvb

For a higher quality image click here

As before, the first plot in the image above shows us the closing prices of the SP 500 index as well as individual events in the two rounds of quantitative easing. Green vertical lines emphasise the location of said events. The red vertical line tells us which of the events is currently selected using the slider. The event summary that used to be in the bottom right corner (as per previous post) was deleted due to plot space limitations. The blue shaded areas encompass the two rounds of quantitative easing.

The two rows of polygon plots in the middle of the image help visualise the cumulative abnormal returns,1 to 30 days after the event occurrence date, across the ten industry sectors to which firms listed on the SP500 index belong. Approximately a week after event B, the energy sector started to pick up while the consumer discretionary sector started to dip before the subsequent steep increase.

The coloured table on the bottom of the image plots the cumulative abnormal returns for each sector 1 to 20 days after the event occurrence date. The deeper colours correspond to higher CARs while lighter shades correspond to lower CARs. Corroborating the previous statements with respect to the consumer discretionary sector,we see the CARs of that sector starting to increase quite quickly starting about a week after event B occurred.

This table was colour coded by

  1. Sorting the CARs in ascending order across all sectors for each event,
  2. Associating with each CAR a unique colour using heat.colors
  3. Unsorting the CARs while retaining respective colour associations.

A snapshot of the code follows

### colour Coding #####################################################
col.codes<-list()

for(i in 1:num.events){
  col.codes$events[[i]]<-list()
  for(j in 1:num.sectors){
    temp<-round(as.matrix(tot$event[[i]][1:20,j]),4)
    col.codes$events[[i]]$col[[j]]<-cbind(temp[order(temp)],rev(heat.colors(20,alpha=0.8)))
    }
}
##########################################################################

#Plotting##################################################################
windows(width=14,height=12)
layout(matrix(c(1,1,1,1,1,2,3,4,5,6,7,8,9,10,11,12,12,12,12,12,12,12,12,12,12),nrow=5,ncol=5,byrow=T))

if (interactive()) {
  draw <- function(panel) {
    par(mai=c(0.015,0.35,0.25,0.1))

    plot(type='l',ylim=c(min(SP500.daily.prices)-50,max(SP500.daily.prices)),col='blue',lwd=1.35,pl,las=2,ylab='SP 500 closing values',cex.axis=0.75,cex.lab=0.95,bty='o',xlab='',xaxt='n')
    grid('lightgrey',nx=32,ny=9,lty=1,lwd=0.5)
    rect(xleft=Qe1.ind.l,ybottom=min(SP500.daily.prices)-100,xright=Qe1.ind.r,ytop=max(SP500.daily.prices)+100,col=box.col[42],border=NA)
    rect(xleft=Qe2.ind.l,ybottom=min(SP500.daily.prices)-100,xright=Qe2.ind.r,ytop=max(SP500.daily.prices)+100,col=box.col[42],border=NA)
    rect(xleft=temp.l,ybottom=min(SP500.daily.prices)-100,xright=temp.r,ytop=max(SP500.daily.prices)+100,col=box.col[65],border=NA)
    text(x=pl.event.idx+5,y=ifelse(pl.event.y==min(pl.event.y),pl.event.y-55,pl.event.y-95),events.ind[,1],cex=0.95,font=1,col='black')
    text(x=(Qe1.ind.r-Qe1.ind.l)-150,y=max(SP500.daily.prices)-150,'Quantitative Easing \n Round 1',col='black',cex=1.1)
    text(x=Qe2.ind.r-85,y=min(SP500.daily.prices)+50,'Quantitative Easing \n Round 2',col='black',cex=1.1)

    for(i in 1:nrow(events.ind)){
       abline(v=pl.event.idx[i],col=ifelse(pl.event.idx[i]==pl.event.idx[panel$event],'red','darkgreen'),lwd=1.2)
       points(pl.event.idx[i],pl[pl.event.idx[i]],col=ifelse(pl.event.idx[i]==pl.event.idx[panel$event],'red','darkgreen'),cex=1.2,pch=16)
       rect(xleft=pl.event.idx[nrow(events.ind)]+3,ybottom=1000,xright=850,ytop=1060,col='orange',border=NA)
       text(x=pl.event.idx[nrow(events.ind)]+3+(840-pl.event.idx[nrow(events.ind)]+2)/2,y=1030,paste('EVENT :',events.ind[panel$event,1],' [',rownames(events.ind)[events.ind[,1]==events.ind[index(pl.event.idx)[panel$event]]],']'),cex=0.75,font=1)

    }

    par(mai=c(0.15,0.35,0.3,0.1))

    for(i in 1:10){
       stackpoly(cex.axis=0.75,cex.lab=0.85,cex.main=0.85,border='black',axis4=FALSE,xaxlab=NA,col=cc[i],as.matrix(tot$event[[panel$event]][,i]),main=colnames(as.matrix(tot$event[[panel$event]]))[i],xlab='',ylab='')
    }
    plot.new()
    par(mai=c(0.015,0,0.15,0.05))
    plot.window(xlim=c(-1,107),ylim=c(0,200))

    for(i in 1:11){
       for(j in 1:21){
            if(j==21 & i==2)
               {
                rect((i-1)*10,(j-1)*10,10*i,(j*10)+0.25,density=NA,col='darkblue',lty=1,border='white')
                text((10*i)-5,(21*10)-4.5,sector.short[i-1],cex=0.85,col="white",font=1)
               }
            else if(j==21 & i>2)
              {
               rect((i-1)*10,(j-1)*10,10*i,(j*10)+0.25,density=NA,col='darkblue',lty=1,border='white')
               text((10*i)-5,(21*10)-4.5,sector.short[i-1],cex=0.85,col="white",font=1)
            }
        else if(j==21 & i==1)
        {
          rect((i-1)*10,(j-1)*10,10*i,(j*10)+0.25,density=NA,col='blue',lty=1,border='white')
        }
        else if(j<21 & i>1)
        {
            temp<-round(as.matrix(tot$event[[panel$event]][1:20,i-1]),4)[j]
            temp.col<-col.codes$events[[panel$event]]$col[[i-1]]
            rect((i-1)*10,(j-1)*10+1,10*i,(j*10)+4,density=NA,col=temp.col[index(temp.col)[temp==as.numeric(temp.col[,1])],2],lwd=1.0,border='white')
            text((i-1)*10+4,(j-1)*10+6,temp,col='black',cex=0.85,font=1)
        }
        else if(j<21 & i==1)
        {
            rect((i-1)*10,(j-1)*10+1,10*i,(j*10)+4,density=NA,col='dark blue',lwd=1.0,border='white')
            text((i-1)*10+4,(j-1)*10+6,paste('DAY :: ',j),col='white',cex=0.85,font=1)
        }
      }
    }
     panel
  }
  panel<- rp.control(event = 1,asset=1)
  rp.slider(panel,event,1,length(pl.event.idx), action=draw,resolution=1,showvalue=TRUE)
}
Advertisements

In this post, the standard event study methodology will be applied to measure the effect of 2 rounds of quantitative easing on the cumulative abnormal returns (CAR) for individual financial firms listed on the SP 500 as well as the cumulative average abnormal returns (CAAR) across all firms in the financial sector. Stock data will be downloaded for the period : 2005-11-25 :: 2011-12-31

The standard methodology can be summarised as follows :

  1. Define the event and establish the estimation / event windows. For the purposes of this post, the event(s) we are interested in are the different stages associated with the 2 rounds of quantitative easing. For more information on each stage of each round of QE click here.  Estimation window : 3 years of daily data up to the date of the events Event window: 30 days after the event occurence.

  2. Establish firm selection criteria. The firms we are interested in are all the 82 financial firms listed on the SP500 . Tabulated Information on the composition of the SP500 can be downloaded from the following Wikipedia entry, where firms listed on the index can be sorted according to the desired industry sector ( financial in our case) before being copied to Excel, saved as a CSV file and imported into R.
  3. Calculate normal and abnormal returns for securities in the sample set.Once we have determined the event dates and the associated subset of the SP 500 index, the next step would be to estimate the normal return for each stock in the period after each event. This is then compared to the actual return observed for the corresponding stock for the same period to gauge abnormal returns. Specifically, return data in the estimation window will be fed into a single index model (CAPM) to elicit coefficient estimates. These estimates will then be applied to data in the event window to determine the normal or expected returns. The abnormal return for each stock in the event window is simply the difference between the actual returns in the period and the estimated returns : εi,t = Ri,t – βi(Rm,t-rf,t).

Click here for more information

l

setwd("C:/University of Warwick/R experiments/Event Study")

library(quantmod)
library(timeSeries)
library(RColorBrewer)
library(plotrix)
library(rpanel)

#Download Data & initialise
beg=as.Date('2005-11-25')
end=as.Date('2011-12-31')

getSymbols('^GSPC',from=beg,to=end)
SP500.daily.prices<-GSPC[,4]
SP500.monthly.prices<-to.monthly(SP500.daily.prices)[,4]
SP500.daily.returns<-Delt(SP500.daily.prices,type='arithmetic')[-1,]*100
SP500.monthly.returns<-Delt(SP500.monthly.prices,type='arithmetic')[-1,]*100

events<-c('The Federal Reserve Board \n announces a new program to \n purchase direct obligations \n of housing related \n government-sponsored \n enterprise',' The Committee is evaluating \n the potential benefits of \n purchasing longer-term \n Treasury securities.','The Federal Reserve continues \n to purchase large quantities \n of agency debt and MBS','U.S. Congress approves \n Obamas Stimulus Package.','The stock market bottoms.','The FOMC decides to purchase \n up to $300 billion of \n longer-term Treasury securities \n over the next six months to \n help improve conditions','The Committee will continue \n to monitor the economic outlook \n and financial developments and \n will employ its policy tools \n as necessary to promote \n economic recovery and price stability.','QE1 ends.','The Committee will continue to \n roll over the Federal Reserves \n holdings of Treasury securities \n as they mature.','Ben Bernanke states that the \n committee is prepared to \n provide additional monetary \n accommodation through \n unconventional measures if it \n proves necessary','The FOMC announces its \n decision to expand its \n holdings of securities in \n order to promote \n a stronger pace of economic \n recovery','The Committee will complete \n its purchases of $600 billion \n of longer-term Treasury securities \n by the end of this month and will \n maintain its existing policy of \n reinvesting principal payments.','QE2 ends, with no immediate \n plans for a third round of \n quantitative easing.')
ind<-LETTERS[1:length(events)]
events.ind<-cbind(ind,events)
rownames(events.ind)<-c('2008-11-25','2008-12-16','2009-01-28','2009-02-13','2009-03-9','2009-03-18','2010-03-16','2010-03-31','2010-08-10','2010-08-27','2010-11-03','2011-06-22','2011-06-30')
rownames(SP500.daily.returns)<-'SP500'

event.idx<-NULL
event.y<-NULL
for(i in 1:nrow(events.ind)){
  event.idx[i]<-which(index(SP500.daily.prices)==as.Date(rownames(events.ind)[i]))
  event.y[i]<-SP500.daily.prices[event.idx[i]]
}

ff.data<-read.zoo("vv.csv",header=T,sep=',')
rf<-as.xts(window(ff.data,start=beg,end=end)[-1,4])

#Financial firms data and estimation window

fin.list<-as.matrix(read.table('finexcel.csv',header=F,sep=''))

n<-length(fin.list)
b<-as.Date('2005-11-25')
e<-end

assets<-NULL
for(i in 1:n){
  getSymbols(fin.list[i],from=b,end=e)
  print(paste('Downloading data for :',fin.list[i]))
  assets$returns[[i]]<-as.timeSeries(dailyReturn(get(fin.list[i])[,4],type='arithmetic')*100)
}

matrix.returns<-NULL
for(i in 1:n){
  matrix.returns<-cbind(matrix.returns,assets$returns[[i]])
}
mat<-matrix.returns[-1,]
colnames(mat)<-fin.list
events.window<-matrix(c(event.idx-(3*252)+1,event.idx),nrow=nrow(events.ind),ncol=2,dimnames=list(ind,c('Beg.est','End.est')))
events.window.pred<-matrix(c(event.idx+1,event.idx+31),nrow=nrow(events.ind),ncol=2,dimnames=list(ind,c('Beg.pred','End.pred')))

est<-NULL
prem<-SP500.daily.returns-rf
colnames(prem)<-'Prem'

for(i in 1:nrow(events.ind)){
  est$pred[[i]]<-list()
  for(j in 1:n){
    est$pred[[i]]$fit[[j]]<-lm(mat[events.window[i,1]:events.window[i,2],j]~prem[events.window[i,1]:events.window[i,2]])
    est$pred[[i]]$alphas[[j]]<-as.matrix(coef(est$pred[[i]]$fit[[j]])[1])
    est$pred[[i]]$betas[[j]]<-as.matrix(coef(est$pred[[i]]$fit[[j]])[2])

    est$pred[[i]]$estnorm[[j]]<-est$pred[[i]]$betas[[j]]*prem[(events.window[i,2]-30):events.window[i,2]]
    est$pred[[i]]$estabnorm[[j]]<-mat[(events.window[i,2]-30):(events.window[i,2]),j]-est$pred[[i]]$estnorm[[j]]
    est$pred[[i]]$estcumu[[j]]<-cumsum(est$pred[[i]]$estabnorm[[j]])

    est$pred[[i]]$norm[[j]]<-est$pred[[i]]$betas[[j]]*prem[events.window.pred[i,1]:events.window.pred[i,2]]
    est$pred[[i]]$abnorm[[j]]<-mat[events.window.pred[i,1]:events.window.pred[i,2],j]-est$pred[[i]]$norm[[j]]
    est$pred[[i]]$cumu[[j]]<-cumsum(est$pred[[i]]$abnorm[[j]])

   est$pred[[i]]$comb[[j]]<-rbind(est$pred[[i]]$estcumu[[j]],est$pred[[i]]$cumu[[j]])
  }

}

#Average residuals across firms
avg<-NULL

for(i in 1:nrow(events.ind)){
  avg[[i]]<-as.matrix(est$pred[[i]]$abnorm[[1]])
  for(j in 2:n){
    avg[[i]]<-cbind(avg[[i]],as.matrix(est$pred[[i]]$abnorm[[j]]))
}
}

tot<-NULL
for(i in 1:nrow(events.ind)){
  tot[[i]]<-as.matrix(rowMeans(avg[[i]]))
}

tot.cumu<-NULL
for(i in 1:nrow(events.ind)){
  tot.cumu[[i]]<-as.matrix(cumsum(tot[[i]]))
}

#Visualise SP500 and events

p<-as.matrix(SP500.daily.prices)
pl<-as.matrix(p[index(p)[rownames(p)==as.Date('2008-10-27')]:last(index(p))])
rownames(pl)<-rownames(p)[index(p)[rownames(p)==as.Date('2008-10-27')]:last(index(p))]
pl.event.idx<-NULL
pl.event.y<-NULL
for(i in 1:nrow(events.ind)){
  pl.event.idx[i]<-which((rownames(pl))==as.Date(rownames(events.ind)[i]))
  pl.event.y[i]<-pl[pl.event.idx[i]]
}
Qe1.ind.l<-which(rownames(pl)==as.Date('2008-11-25'))
Qe1.ind.r<-which(rownames(pl)==as.Date('2010-03-31'))

temp.l<-which(rownames(pl)==as.Date('2010-08-10'))
temp.r<-which(rownames(pl)==as.Date('2010-11-03'))

Qe2.ind.l<-which(rownames(pl)==as.Date('2010-11-03'))
Qe2.ind.r<-which(rownames(pl)==as.Date('2011-06-30'))

box.col<-as.matrix(topo.colors(Qe1.ind.r-Qe1.ind.l,alpha=0.30))

windows(width=14,height=12)
layout(matrix(c(1,1,2,3,4,5),nrow=3,ncol=2,byrow=T))
par(mai=c(0.5,1,0.1,0.1))

if (interactive()) {
  draw <- function(panel) {
    par(mai=c(0.5,0.5,0.1,0.1))

    plot(type='l',ylim=c(min(SP500.daily.prices)-50,max(SP500.daily.prices)),col='blue',lwd=1.35,pl,las=2,ylab='SP 500 closing values',cex.axis=0.75,cex.lab=0.95,bty='o',xlab='',xaxt='n')
    mtext(padj=1,cex=0.75,side=1,paste('EVENT :','[',panel$event,']',':::','ASSET :','[',fin.list[panel$asset],']'),font=2)
    grid('lightgrey',nx=32,ny=9,lty=1,lwd=0.5)
    rect(xleft=Qe1.ind.l,ybottom=min(SP500.daily.prices)-100,xright=Qe1.ind.r,ytop=max(SP500.daily.prices)+100,col=box.col[42],border=NA)
    rect(xleft=Qe2.ind.l,ybottom=min(SP500.daily.prices)-100,xright=Qe2.ind.r,ytop=max(SP500.daily.prices)+100,col=box.col[42],border=NA)
    rect(xleft=temp.l,ybottom=min(SP500.daily.prices)-100,xright=temp.r,ytop=max(SP500.daily.prices)+100,col=box.col[65],border=NA)
    text(x=pl.event.idx+5,y=ifelse(pl.event.y==min(pl.event.y),pl.event.y-55,pl.event.y-95),events.ind[,1],cex=0.95,font=1,col='black')
    text(x=(Qe1.ind.r-Qe1.ind.l)-150,y=max(SP500.daily.prices)-50,'Quantitative Easing \n Round 1',col='black',cex=1.1)
    text(x=Qe2.ind.r-85,y=min(SP500.daily.prices)+50,'Quantitative Easing \n Round 2',col='black',cex=1.1)

    for(i in 1:nrow(events.ind)){
      abline(v=pl.event.idx[i],col=ifelse(pl.event.idx[i]==pl.event.idx[panel$event],'red','darkgreen'),lwd=1.2)
      points(pl.event.idx[i],pl[pl.event.idx[i]],col=ifelse(pl.event.idx[i]==pl.event.idx[panel$event],'red','darkgreen'),cex=1.2,pch=16)
      rect(xleft=pl.event.idx[nrow(events.ind)]+3,ybottom=1000,xright=850,ytop=1060,col='orange',border=NA)
      text(x=pl.event.idx[nrow(events.ind)]+3+(840-pl.event.idx[nrow(events.ind)]+2)/2,y=1030,paste('EVENT :',events.ind[panel$event,1],' [',rownames(events.ind)[events.ind[,1]==events.ind[index(pl.event.idx)[panel$event]]],']'),cex=0.75,font=1)
      rect(xleft=pl.event.idx[nrow(events.ind)]+3,ybottom=600,xright=850,ytop=995,col='white',border=NA)
      text(x=pl.event.idx[nrow(events.ind)]+85,y=815,col='black',cex=0.75,font=1,events.ind[,2][rownames(events.ind)[events.ind[,1]==events.ind[index(pl.event.idx)[panel$event]]]])

    }

    stackpoly(border='black',xaxt='n',axis4=F,xaxlab=NA,col='blue',as.matrix(mat[(event.idx[panel$event]-30):events.window.pred[panel$event,2],panel$asset]),ylab='Estimation/Event Windows',xlab='')
    abline(v=30,lwd=2,col='darkorange')
    mtext(side=3,'Estimation Window Event Window',col='black',cex=0.85)

    plot(type='l',col='black',lwd=1.35,(mat[events.window.pred[panel$event,1]:events.window.pred[panel$event,2],panel$asset]),las=2,ylab=' Actual/Normal Returns',cex.axis=0.75,cex.lab=0.95,bty='o',xlab='',xaxt='n')
    lines(type='l',col='red',lwd=1.35,(est$pred[[panel$event]]$norm[[panel$asset]]),las=2,ylab='',cex.axis=0.75,cex.lab=0.95,bty='c',xlab='',xaxt='n')
    legend("topleft",fill=c('black','red'),legend=c('Actual Returns','Normal Returns'),ncol=1,bty='n',border='white')

    cg<-as.matrix(est$pred[[panel$event]]$comb[[panel$asset]])
    tg<-tot.cumu[[panel$event]]

    stackpoly(border='black',xaxt='n',axis4=F,col='red',cg,ylab=paste('CAR for ',fin.list[panel$asset]),xlab='',cex.axis=0.75,cex.lab=0.95)
    rect(xleft=0,ybottom=-100,xright=30,ytop=100,col=box.col[42],border=NA)

    stackpoly(border='black',xaxt='n',axis4=F,col='dark orange',tg,ylab='CAAR for financials',xlab='',cex.axis=0.75,cex.lab=0.95)
    panel
}
  panel<- rp.control(event = 1,asset=1)
  rp.slider(panel,event,1,length(pl.event.idx), action=draw,resolution=1,showvalue=TRUE)
  rp.slider(panel,asset,1,n,action=draw,resolution=1,showvalue=TRUE)
}

lThe rpanel package allows us to select the event and security of interest individually.

Suppose we are interested in the effect of Event C, which corresponds to ‘ The Fed contintuing to purchase large quantities of agency debt and MBS ‘ around 2009-01-28, on Aon plc. We would push the ‘event slider’ to 3 and the ‘asset slider’ to 24 to yield the following plot window :

Click here for : High quality Image

The first plot charts the SP 500 closing values along with the time periods corresponding to the 2 rounds of quantitative easing ( blue shaded areas). The little box in the bottom right corner of the plot is a quick summary of the selected event and its date of occurrence.  The vertical green lines and the labels [A:M] reflect individual events that took place in each round of QE. The vertical red lines indicate which of these events is currently selected.

The blue area plot in the second row of the plot window is a snapshot of the estimation and event windows. We are using 3 years of data up to the date associated with Event C for estimation purposes. The event window itself stretches from event date to 30 days after the event. Visually, the estimation and event windows are separated using an orange line. While we are using 3 years worth of data for estimation purposes, we are only displaying the stock returns 30 days before and after the event.

The line plot in the second row charts both the estimated normal return and the actually observed return in the event window. The 3 years of data in the estimation window has been fed into a single index model to elicit coefficient estimates. These estimates were then applied to data in the event window to calculate normal/expected returns according to the CAPM. The difference between the actual and normal returns (black and red lines respectively) represent abnormal returns for the security.

The red area plot in the last row charts the cumulative abnormal returns (CAR) for Aon plc both 30 days before and 30 days after the selected event. It appears that about a week after the Fed’s continuing purchase of debt ( pumping liquidity into the economy), Aon plc has experienced a surge in abnormal returns.

The final orange area plot represents the cumulative average abnormal return (CAAR) acoss all the 82 financial firms listed on the SP 500 for the period from the event date to 30 days after the event date.