[Eventstudiescommits] r287  pkg/vignettes
noreply at rforge.rproject.org
noreply at rforge.rproject.org
Tue Apr 8 19:15:19 CEST 2014
Author: chiraganand
Date: 20140408 19:15:19 +0200 (Tue, 08 Apr 2014)
New Revision: 287
Added:
pkg/vignettes/AMM.Rnw
pkg/vignettes/AMM.bib
Removed:
pkg/vignettes/amm.Rnw
pkg/vignettes/amm.bib
Log:
Renamed AMM vignette.
Copied: pkg/vignettes/AMM.Rnw (from rev 286, pkg/vignettes/amm.Rnw)
===================================================================
 pkg/vignettes/AMM.Rnw (rev 0)
+++ pkg/vignettes/AMM.Rnw 20140408 17:15:19 UTC (rev 287)
@@ 0,0 +1,176 @@
+\documentclass[a4paper,11pt]{article}
+\usepackage{graphicx}
+\usepackage{a4wide}
+\usepackage[colorlinks,linkcolor=blue,citecolor=red]{hyperref}
+\usepackage{natbib}
+\usepackage{float}
+\usepackage{tikz}
+\usepackage{parskip}
+\usepackage{amsmath}
+\title{Augmented Market Models}
+\author{Ajay Shah \and Vikram Bahure \and Chirag Anand}
+\begin{document}
+%\VignetteIndexEntry{eventstudies: Extreme events functionality}
+% \VignetteDepends{}
+% \VignetteKeywords{extreme event analysis}
+% \VignettePackage{eventstudies}
+\maketitle
+
+\begin{abstract}
+The document demonstrates the application of Augmented market model
+(AMM) from the paper \citet{patnaik2010amm} to extract currency
+exposure and AMM residuals from the model.
+\end{abstract}
+
+\SweaveOpts{engine=R,pdf=TRUE}
+\section{Introduction}
+
+Augmented market models (AMM) extends the classical market model \citep{sharpe1964capm, lintner1965capm} to introduce additional right hand side variables like currency returns or interest rates to understand the effect of macro variations in addition to market movements on stock returns. The package provides functionality to estimate augmented market models as well as produce augmented market model residuals (AMM abnormal returns) stripped of market and macro variations to run event studies. The function set was originally written and applied in \citet{patnaik2010amm}. \citet{adler1984exposure} and \citet{jorion1990exchange} are the first papers to use augmented market models to study currency exposure. The standard currency exposure AMM is as follows
+
+\begin{equation}
+ r_j = \alpha_j + \beta_{1j} r_{M1} + \beta_{2j} r_{M2} + \epsilon
+\end{equation}
+
+In the original usage of augmented market models, Currency exposure is
+expressed as the regression coefficient on currency returns (M2). The
+model uses firm stock price as the information set of firm positions
+and it relates firm returns $r_j$ to market index movements $r_{M1}$
+and currency fluctuations $r_{M2}$. The coefficient $\beta_{2j}$
+measures the sensitivity of the valuation of firm $j$ to changes in
+the exchange rate. This is a widely used technique with multiple
+variations including asymmetric exposures.
+
+The AMM implementation in the package has some key innovations as compared to the original implementation of currency exposure AMM's by \citet{adler1984exposure} and \citet{jorion1990exchange}.
+\begin{equation}
+ r_{jt} = \alpha + \beta_1 r_{M1,t}
+ + \sum_{i=0}^{k} a_i e_{ti} + \epsilon_t
+\end{equation}
+
+\begin{enumerate}
+\item Exchange rate series is reexpressed as a series of innovations with an AIC selected AR process. Under this specification, an innovation $e_t$ on the currency market has an impact on the stock price at time $t$ and the following $k$ time periods. Under the above model, currency exposure is embedded in the vector of $a_i$ coefficients; it is no longer a simple scalar $\beta_2$ as was the case under the standard model
+\item Heteroscedasticity in $r_{M1}$ \& $r_{M2}$ : This is resolved by
+ using a HAC estimator
+\item Decomposition of market exposure from firm exposure: Market exposure issue solved by orthogonalising the market index timeseries by first estimating a regression model explaining $r_{M1}$ as a function of past and present currency innovations, and extracting the residual from this regression. These residuals represent uncontaminated market returns
+\end{enumerate}
+
+In the section below, we explain the estimation of currency exposure,
+AMM residuals and performing event study analysis. In section \ref{sec:ce}, we
+replicate the methodology used in \citet{patnaik2010amm} using the
+package. In section \ref{sec:es}, we take the AMM methodology a step ahead to
+extract residuals from AMM methodology which we use the to
+perform traditional event study analysis.
+% Need to talk more about generalisation used for variables other than currency
+
+
+\section{Software approach}\label{sec:ce}
+The package has functions which enable the user to compute linear
+model AMM output, along with currency exposure, using the AMM
+methodology employed in \citet{patnaik2010amm}. In the subsections
+below we describe construction of dataset to input in \texttt{lmAMM}
+function and further computing AMM output and currency exposure.
+
+\subsection{Constructing data set}
+We need to construct usable data set, before performing AMM analysis
+on firm returns using this package. There are two steps to be
+followed constructing \texttt{X} (regressors) and firm returns
+(regressands), to perform OLS as shown in the \citet{patnaik2010amm}.
+\subsubsection{Regressors \& Regressands}
+Regressors in the AMM equation are market returns and currency
+returns, while regressands is firm returns. All the variables should
+have balanced panel if not then merge the time series variable to get
+one. \textit{AMMData} is an time series object with market returns as
+\textit{Nifty} and currency returns as \textit{INR/USD}. If
+currency exposure is to be estimated for different periods separately
+then argument \textit{dates} will be helpful or else \textit{NULL}
+will be provided to perform for full period.
+
+The function \textit{makeX} considers that
+there is impact of currency on market returns and with the argument
+\textit{market.returns.purge}, we orthogonalise the market returns to currency
+returns before using AMM model.
+
+<<>>=
+# Create RHS before running subperiod.lmAMM()
+library(eventstudies)
+data("AMMData")
+nifty < AMMData$index.nifty
+inrusd < AMMData$currency.inrusd
+regressand < AMMData[,c("Infosys","TCS")]
+regressors < makeX(nifty, others=inrusd,
+ switch.to.innov=TRUE, market.returns.purge=TRUE, nlags=1,
+ dates=as.Date(c("20120201","20130101","20140120")), verbose=FALSE)
+@
+
+\subsection{Augmented market model}
+Augmented market model output with a class of \textit{amm} is
+generated using the function \texttt{lmAMM}. This function takes firm
+returns (regressand) and regressor as input. Output of \texttt{lmAMM}
+function is a list object with linear model output of AMM,
+currency exposure, standard deviation and significance of the
+exposure.
+<<>>=
+## AMM residual to time series
+timeseries.lmAMM < function(firm.returns,X,verbose=FALSE,nlags=1){
+ tmp < resid(lmAMM(firm.returns,X,nlags))
+ tmp.res < zoo(tmp,as.Date(names(tmp)))
+}
+## One firm
+amm.output.one < lmAMM(regressand[,1],X=regressors,nlags=1)
+amm.resid.one < timeseries.lmAMM(firm.returns=regressand[,1],
+ X=regressors, verbose=FALSE, nlags=1)
+summary(amm.output.one)
+
+## More than one firm
+ # Extracting and merging
+tmp.resid < sapply(colnames(regressand)[1:2],function(y)
+ timeseries.lmAMM(firm.returns=regressand[,y],
+ X=regressors,
+ verbose=FALSE,
+ nlags=1))
+amm.resid < zoo(tmp.resid,as.Date(rownames(tmp.resid)))
+@
+
+All the basic functionality are available for object with class
+\textit{amm}. \texttt{print},\texttt{summary} and \texttt{plot}
+commands can be used to do preliminary analysis. The plot
+\ref{fig:amm} compares the AMM residuals with abnormal firm returns.
+\begin{figure}[t]
+ \begin{center}
+ \label{fig:amm}
+ \caption{Augment market model}
+ \setkeys{Gin}{width=0.8\linewidth}
+ \setkeys{Gin}{height=0.8\linewidth}
+<<fig=TRUE,echo=FALSE>>=
+plot(amm.output.one)
+@
+ \end{center}
+ \label{fig:one}
+\end{figure}
+
+\subsection{Getting currency exposure}
+The output of \texttt{makeX} function is used in \textit{subperiod.lmAMM} and
+\textit{lmAMM} function to get currency exposure of the firms and AMM
+residuals respectively. In the example below, we demonstrate the use
+of \textit{subperiod.lmAMM} function to estimate currency exposure for
+firms.
+% MakeX and subperiod.lmAMM
+<<>>=
+# Run AMM for one firm across different periods
+ deprintize<function(f){
+ return(function(...) {capture.output(w<f(...));return(w);});
+ }
+firm.exposure < deprintize(subperiod.lmAMM)(firm.returns=regressand[,1],
+ X=regressors,
+ nlags=1,
+ verbose=TRUE,
+ dates= as.Date(c("20120201",
+ "20130101","20140131")))
+str(firm.exposure)
+@
+
+ We can also perform event study analysis, directly on AMM residuals
+ using \textit{eventstudy} function. which is presented in
+ \textit{eventstudies} vignette.
+
+\bibliographystyle{jss} \bibliography{amm}
+\end{document}
Copied: pkg/vignettes/AMM.bib (from rev 275, pkg/vignettes/amm.bib)
===================================================================
 pkg/vignettes/AMM.bib (rev 0)
+++ pkg/vignettes/AMM.bib 20140408 17:15:19 UTC (rev 287)
@@ 0,0 +1,53 @@
+
+ at article{patnaik2010amm,
+ title={Does the currency regime shape unhedged currency exposure?},
+ author={Patnaik, Ila and Shah, Ajay},
+ journal={Journal of International Money and Finance},
+ volume={29},
+ number={5},
+ pages={760769},
+ year={2010},
+ publisher={Elsevier}
+}
+
+ at article{sharpe1964capm,
+ title={Capital asset Prices: A Theory of market equilibrium under conditions of risk},
+ author={Sharpe, William F},
+ journal={The Journal of Finance},
+ volume={19},
+ number={3},
+ pages={425442},
+ year={1964},
+ publisher={Wiley Online Library}
+}
+
+ at article{lintner1965capm,
+ title={The valuation of risk assets and the selection of risky investments in stock portfolios and capital budgets},
+ author={Lintner, John},
+ journal={The Review of Economics and Statistics},
+ volume={47},
+ number={1},
+ pages={1337},
+ year={1965},
+ publisher={JSTOR}
+}
+
+ at article{adler1984exposure,
+ title={Exposure to currency risk: definition and measurement},
+ author={Adler, Michael and Dumas, Bernard},
+ journal={Financial management},
+ pages={4150},
+ year={1984},
+ publisher={JSTOR}
+}
+
+ at article{jorion1990exchange,
+ title={The exchangerate exposure of US multinationals},
+ author={Jorion, Philippe},
+ journal={Journal of Business},
+ pages={331345},
+ year={1990},
+ publisher={JSTOR}
+}
+
+
Deleted: pkg/vignettes/amm.Rnw
===================================================================
 pkg/vignettes/amm.Rnw 20140404 03:14:03 UTC (rev 286)
+++ pkg/vignettes/amm.Rnw 20140408 17:15:19 UTC (rev 287)
@@ 1,176 +0,0 @@
\documentclass[a4paper,11pt]{article}
\usepackage{graphicx}
\usepackage{a4wide}
\usepackage[colorlinks,linkcolor=blue,citecolor=red]{hyperref}
\usepackage{natbib}
\usepackage{float}
\usepackage{tikz}
\usepackage{parskip}
\usepackage{amsmath}
\title{Augmented Market Models}
\author{Ajay Shah \and Vikram Bahure \and Chirag Anand}
\begin{document}
%\VignetteIndexEntry{eventstudies: Extreme events functionality}
% \VignetteDepends{}
% \VignetteKeywords{extreme event analysis}
% \VignettePackage{eventstudies}
\maketitle

\begin{abstract}
The document demonstrates the application of Augmented market model
(AMM) from the paper \citet{patnaik2010amm} to extract currency
exposure and AMM residuals from the model.
\end{abstract}

\SweaveOpts{engine=R,pdf=TRUE}
\section{Introduction}

Augmented market models (AMM) extends the classical market model \citep{sharpe1964capm, lintner1965capm} to introduce additional right hand side variables like currency returns or interest rates to understand the effect of macro variations in addition to market movements on stock returns. The package provides functionality to estimate augmented market models as well as produce augmented market model residuals (AMM abnormal returns) stripped of market and macro variations to run event studies. The function set was originally written and applied in \citet{patnaik2010amm}. \citet{adler1984exposure} and \citet{jorion1990exchange} are the first papers to use augmented market models to study currency exposure. The standard currency exposure AMM is as follows

\begin{equation}
 r_j = \alpha_j + \beta_{1j} r_{M1} + \beta_{2j} r_{M2} + \epsilon
\end{equation}

In the original usage of augmented market models, Currency exposure is
expressed as the regression coefficient on currency returns (M2). The
model uses firm stock price as the information set of firm positions
and it relates firm returns $r_j$ to market index movements $r_{M1}$
and currency fluctuations $r_{M2}$. The coefficient $\beta_{2j}$
measures the sensitivity of the valuation of firm $j$ to changes in
the exchange rate. This is a widely used technique with multiple
variations including asymmetric exposures.

The AMM implementation in the package has some key innovations as compared to the original implementation of currency exposure AMM's by \citet{adler1984exposure} and \citet{jorion1990exchange}.
\begin{equation}
 r_{jt} = \alpha + \beta_1 r_{M1,t}
 + \sum_{i=0}^{k} a_i e_{ti} + \epsilon_t
\end{equation}

\begin{enumerate}
\item Exchange rate series is reexpressed as a series of innovations with an AIC selected AR process. Under this specification, an innovation $e_t$ on the currency market has an impact on the stock price at time $t$ and the following $k$ time periods. Under the above model, currency exposure is embedded in the vector of $a_i$ coefficients; it is no longer a simple scalar $\beta_2$ as was the case under the standard model
\item Heteroscedasticity in $r_{M1}$ \& $r_{M2}$ : This is resolved by
 using a HAC estimator
\item Decomposition of market exposure from firm exposure: Market exposure issue solved by orthogonalising the market index timeseries by first estimating a regression model explaining $r_{M1}$ as a function of past and present currency innovations, and extracting the residual from this regression. These residuals represent uncontaminated market returns
\end{enumerate}

In the section below, we explain the estimation of currency exposure,
AMM residuals and performing event study analysis. In section \ref{sec:ce}, we
replicate the methodology used in \citet{patnaik2010amm} using the
package. In section \ref{sec:es}, we take the AMM methodology a step ahead to
extract residuals from AMM methodology which we use the to
perform traditional event study analysis.
% Need to talk more about generalisation used for variables other than currency


\section{Software approach}\label{sec:ce}
The package has functions which enable the user to compute linear
model AMM output, along with currency exposure, using the AMM
methodology employed in \citet{patnaik2010amm}. In the subsections
below we describe construction of dataset to input in \texttt{lmAMM}
function and further computing AMM output and currency exposure.

\subsection{Constructing data set}
We need to construct usable data set, before performing AMM analysis
on firm returns using this package. There are two steps to be
followed constructing \texttt{X} (regressors) and firm returns
(regressands), to perform OLS as shown in the \citet{patnaik2010amm}.
\subsubsection{Regressors \& Regressands}
Regressors in the AMM equation are market returns and currency
returns, while regressands is firm returns. All the variables should
have balanced panel if not then merge the time series variable to get
one. \textit{AMMData} is an time series object with market returns as
\textit{Nifty} and currency returns as \textit{INR/USD}. If
currency exposure is to be estimated for different periods separately
then argument \textit{dates} will be helpful or else \textit{NULL}
will be provided to perform for full period.

The function \textit{makeX} considers that
there is impact of currency on market returns and with the argument
\textit{market.returns.purge}, we orthogonalise the market returns to currency
returns before using AMM model.

<<>>=
# Create RHS before running subperiod.lmAMM()
library(eventstudies)
data("AMMData")
nifty < AMMData$index.nifty
inrusd < AMMData$currency.inrusd
regressand < AMMData[,c("Infosys","TCS")]
regressors < makeX(nifty, others=inrusd,
 switch.to.innov=TRUE, market.returns.purge=TRUE, nlags=1,
 dates=as.Date(c("20120201","20130101","20140120")), verbose=FALSE)
@

\subsection{Augmented market model}
Augmented market model output with a class of \textit{amm} is
generated using the function \texttt{lmAMM}. This function takes firm
returns (regressand) and regressor as input. Output of \texttt{lmAMM}
function is a list object with linear model output of AMM,
currency exposure, standard deviation and significance of the
exposure.
<<>>=
## AMM residual to time series
timeseries.lmAMM < function(firm.returns,X,verbose=FALSE,nlags=1){
 tmp < resid(lmAMM(firm.returns,X,nlags))
 tmp.res < zoo(tmp,as.Date(names(tmp)))
}
## One firm
amm.output.one < lmAMM(regressand[,1],X=regressors,nlags=1)
amm.resid.one < timeseries.lmAMM(firm.returns=regressand[,1],
 X=regressors, verbose=FALSE, nlags=1)
summary(amm.output.one)

## More than one firm
 # Extracting and merging
tmp.resid < sapply(colnames(regressand)[1:2],function(y)
 timeseries.lmAMM(firm.returns=regressand[,y],
 X=regressors,
 verbose=FALSE,
 nlags=1))
amm.resid < zoo(tmp.resid,as.Date(rownames(tmp.resid)))
@

All the basic functionality are available for object with class
\textit{amm}. \texttt{print},\texttt{summary} and \texttt{plot}
commands can be used to do preliminary analysis. The plot
\ref{fig:amm} compares the AMM residuals with abnormal firm returns.
\begin{figure}[t]
 \begin{center}
 \label{fig:amm}
 \caption{Augment market model}
 \setkeys{Gin}{width=0.8\linewidth}
 \setkeys{Gin}{height=0.8\linewidth}
<<fig=TRUE,echo=FALSE>>=
plot(amm.output.one)
@
 \end{center}
 \label{fig:one}
\end{figure}

\subsection{Getting currency exposure}
The output of \texttt{makeX} function is used in \textit{subperiod.lmAMM} and
\textit{lmAMM} function to get currency exposure of the firms and AMM
residuals respectively. In the example below, we demonstrate the use
of \textit{subperiod.lmAMM} function to estimate currency exposure for
firms.
% MakeX and subperiod.lmAMM
<<>>=
# Run AMM for one firm across different periods
 deprintize<function(f){
 return(function(...) {capture.output(w<f(...));return(w);});
 }
firm.exposure < deprintize(subperiod.lmAMM)(firm.returns=regressand[,1],
 X=regressors,
 nlags=1,
 verbose=TRUE,
 dates= as.Date(c("20120201",
 "20130101","20140131")))
str(firm.exposure)
@

 We can also perform event study analysis, directly on AMM residuals
 using \textit{eventstudy} function. which is presented in
 \textit{eventstudies} vignette.

\bibliographystyle{jss} \bibliography{amm}
\end{document}
Deleted: pkg/vignettes/amm.bib
===================================================================
 pkg/vignettes/amm.bib 20140404 03:14:03 UTC (rev 286)
+++ pkg/vignettes/amm.bib 20140408 17:15:19 UTC (rev 287)
@@ 1,53 +0,0 @@

 at article{patnaik2010amm,
 title={Does the currency regime shape unhedged currency exposure?},
 author={Patnaik, Ila and Shah, Ajay},
 journal={Journal of International Money and Finance},
 volume={29},
 number={5},
 pages={760769},
 year={2010},
 publisher={Elsevier}
}

 at article{sharpe1964capm,
 title={Capital asset Prices: A Theory of market equilibrium under conditions of risk},
 author={Sharpe, William F},
 journal={The Journal of Finance},
 volume={19},
 number={3},
 pages={425442},
 year={1964},
 publisher={Wiley Online Library}
}

 at article{lintner1965capm,
 title={The valuation of risk assets and the selection of risky investments in stock portfolios and capital budgets},
 author={Lintner, John},
 journal={The Review of Economics and Statistics},
 volume={47},
 number={1},
 pages={1337},
 year={1965},
 publisher={JSTOR}
}

 at article{adler1984exposure,
 title={Exposure to currency risk: definition and measurement},
 author={Adler, Michael and Dumas, Bernard},
 journal={Financial management},
 pages={4150},
 year={1984},
 publisher={JSTOR}
}

 at article{jorion1990exchange,
 title={The exchangerate exposure of US multinationals},
 author={Jorion, Philippe},
 journal={Journal of Business},
 pages={331345},
 year={1990},
 publisher={JSTOR}
}


More information about the Eventstudiescommits
mailing list