[Returnanalytics-commits] r2147 - pkg/PortfolioAnalytics/sandbox/attribution/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jul 12 11:16:32 CEST 2012


Author: ababii
Date: 2012-07-12 11:16:32 +0200 (Thu, 12 Jul 2012)
New Revision: 2147

Modified:
   pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.Rd
   pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.geometric.Rd
   pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.levels.Rd
   pkg/PortfolioAnalytics/sandbox/attribution/man/AttributionFixedIncome.Rd
   pkg/PortfolioAnalytics/sandbox/attribution/man/Carino.Rd
   pkg/PortfolioAnalytics/sandbox/attribution/man/Conv.option.Rd
   pkg/PortfolioAnalytics/sandbox/attribution/man/DaviesLaker.Rd
   pkg/PortfolioAnalytics/sandbox/attribution/man/Frongello.Rd
   pkg/PortfolioAnalytics/sandbox/attribution/man/Grap.Rd
   pkg/PortfolioAnalytics/sandbox/attribution/man/Menchero.Rd
   pkg/PortfolioAnalytics/sandbox/attribution/man/Return.annualized.excess.Rd
Log:
- documentaion update (inline equations are supported)

Modified: pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.Rd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.Rd	2012-07-12 09:15:48 UTC (rev 2146)
+++ pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.Rd	2012-07-12 09:16:32 UTC (rev 2147)
@@ -29,7 +29,7 @@
   the sector allocation. Interaction term is combined with
   the security selection effect, \item bottom.up - the
   priority is given to the security selection. Interaction
-  term is combined with the sector allocation effect}. By
+  term is combined with the sector allocation effect} By
   default "none" is selected}
 
   \item{wpf}{vector, xts, data frame or matrix with
@@ -56,7 +56,9 @@
   hedged into the base currency}
 
   \item{bf}{TRUE for Brinson and Fachler and FALSE for
-  Brinson, Hood and Beebower arithmetic attribution}
+  Brinson, Hood and Beebower arithmetic attribution. By
+  default Brinson, Hood and Beebower attribution is
+  selected}
 
   \item{linking}{Used to select the linking method to
   present the multi-period summary of arithmetic
@@ -68,10 +70,12 @@
   linking method} By default Carino linking is selected}
 
   \item{geometric}{TRUE/FALSE, whether to use geometric or
-  arithmetic excess returns for the attribution analysis}
+  arithmetic excess returns for the attribution analysis.
+  By default arithmetic is selected}
 
   \item{adjusted}{TRUE/FALSE, whether to show original or
-  smoothed attribution effects for each period}
+  smoothed attribution effects for each period. By default
+  unadjusted attribution effects are returned}
 }
 \value{
   returns a list with the following components: excess
@@ -92,34 +96,40 @@
   returns at one level. If returns and weights are
   available at the lowest level (e.g. for individual
   instruments), the aggregation up to the chosen level from
-  the hierarchy can be done using Return.level function.
-  The attribution effects can be computed for several
-  periods. The multi-period summary is obtained using one
-  of linking methods: Carino, Menchero, GRAP, Frongello. It
-  also allows to break down the geometric excess returns,
-  which link naturally over time. Finally, it annualizes
-  arithmetic and geometric excess returns similarly to the
-  portfolio and/or benchmark returns annualization.
+  the hierarchy can be done using
+  \code{\link{Return.level}} function. The attribution
+  effects can be computed for several periods. The
+  multi-period summary is obtained using one of linking
+  methods: Carino, Menchero, GRAP, Frongello or Davies
+  Laker. It also allows to break down the geometric excess
+  returns, which link naturally over time. Finally, it
+  annualizes arithmetic and geometric excess returns
+  similarly to the portfolio and/or benchmark returns
+  annualization.
 }
 \details{
   The arithmetic excess returns are decomposed into the sum
-  of allocation, selection and interaction effects across n
-  sectors:
+  of allocation, selection and interaction effects across
+  \eqn{n} sectors:
   \deqn{R_{p}-R_{b}=\sum^{n}_{i=1}\left(A_{i}+S_{i}+I_{i}\right)}
   The arithmetic attribution effects for the category i are
   computed as suggested in the Brinson, Hood and Beebower
   (1986): Allocation effect
-  \deqn{A_{i}=(w_{pi}-w_{bi})\times R_{bi}} Selection
-  effect \deqn{S_{i}=w_{pi}\times(R_{pi}-R_{bi})}
-  Interaction effect
-  \deqn{I_{i}=(w_{pi}-w_{bi})\times(R_{pi}-R_{bi})} r -
-  total portfolio returns, b - total benchmark returns,
-  w_pi - weights of the category i in the portfolio, w_bi -
-  weigths of the category i in the benchmark, R_pi -
-  returns of the portfolio category i, R_bi - returns of
-  the benchmark category i. If Brinson and Fachler (1985)
-  is selected the allocation effect differs:
-  \deqn{A_{i}=(w_{pi}-w_{bi})\times (R_{bi} - R_{b})}
+  \deqn{A_{i}=(w_{pi}-w_{bi})\times R_{bi}}{Ai = (wpi -
+  wbi) * Rbi} Selection effect
+  \deqn{S_{i}=w_{pi}\times(R_{pi}-R_{bi})}{Si = wpi * (Rpi
+  - Rbi)} Interaction effect \deqn{I_{i}=(w_{pi}-w_{bi})
+  \times(R_{pi}-R_{bi})}{Ii = (wpi - wbi) * Rpi - Rbi}
+  \eqn{R_{p}}{Rp} - total portfolio returns,
+  \eqn{R_{b}}{Rb} - total benchmark returns,
+  \eqn{w_{pi}}{wpi} - weights of the category \eqn{i} in
+  the portfolio, \eqn{w_{bi}}{wbi} - weigths of the
+  category \eqn{i} in the benchmark, \eqn{R_{pi}}{Rpi} -
+  returns of the portfolio category \eqn{i},
+  \eqn{R_{bi}}{Rbi} - returns of the benchmark category
+  \eqn{i}. If Brinson and Fachler (1985) is selected the
+  allocation effect differs: \deqn{A_{i}=(w_{pi}-w_{bi})
+  \times (R_{bi} - R_{b})}{Ai = (wpi - wbi) * (Rbi - Rb)}
   Depending on goals we can give priority to the allocation
   or to the selection effects. If the priority is given to
   the sector allocation the interaction term will be
@@ -133,45 +143,50 @@
   can be summed up over time to provide the multi-period
   summary:
   \deqn{R_{p}-R_{b}=\sum^{T}_{t=1}\left(A_{t}'+S_{t}'+I_{t}'\right)}
-  where T is the number of periods and prime stands for the
-  adjustment. The geometric attribution effects do not
-  suffer from the linking problem. Moreover we don't have
-  the interaction term. For more details about the
+  where \eqn{T} is the number of periods and prime stands
+  for the adjustment. The geometric attribution effects do
+  not suffer from the linking problem. Moreover we don't
+  have the interaction term. For more details about the
   geometric attribution see the documentation to
-  \code{Attribution.geometric} Finally, arithmetic
+  \code{\link{Attribution.geometric}}. Finally, arithmetic
   annualized excess returns are computed as the arithmetic
   difference between annualised portfolio and benchmark
-  returns: \deqn{AAER=r_{a}-b_{a}} the geometric annualized
-  excess returns are computed as the geometric difference
-  between annualized portfolio and benchmark returns:
-  \deqn{GAER=\frac{1+r_{a}}{1+b_{a}}-1} In the case of
-  multi-currency portfolio, the currency return, currency
-  surprise and forward premium should be specified. The
-  multi-currency arithmetic attribution is handled
-  following Ankrim and Hensel (1992). Currency returns are
-  decomposed into the sum of the currency surprise and the
-  forward premium: \deqn{R_{ci} = R_{cei} + R_{fpi}} where
-  \deqn{R_{cei} = \frac{S_{i}^{t+1} -
+  returns: \deqn{AAER=r_{a}-b_{a}}{AAER = ra - ba} the
+  geometric annualized excess returns are computed as the
+  geometric difference between annualized portfolio and
+  benchmark returns:
+  \deqn{GAER=\frac{1+r_{a}}{1+b_{a}}-1}{GAER = (1 + ra) /
+  (1 + ba) - 1} In the case of multi-currency portfolio,
+  the currency return, currency surprise and forward
+  premium should be specified. The multi-currency
+  arithmetic attribution is handled following Ankrim and
+  Hensel (1992). Currency returns are decomposed into the
+  sum of the currency surprise and the forward premium:
+  \deqn{R_{ci} = R_{cei} + R_{fpi}}{Rci = Rcei + Rfpi}
+  where \deqn{R_{cei} = \frac{S_{i}^{t+1} -
   F_{i}^{t+1}}{S_{i}^{t}}} \deqn{R_{fpi} =
-  \frac{F_{i}^{t+1}}{S_{i}^{t}} - 1} S^t_i - stop rate for
-  asset i at time t F^t_i - forward rate for asset i at
-  time t. Excess returns are decomposed into the sum of
-  allocation, selection and interaction effects as in the
-  standard Brinson model:
+  \frac{F_{i}^{t+1}}{S_{i}^{t}} - 1} \eqn{S_{i}^{t}}{Sit} -
+  spot rate for asset \eqn{i} at time \eqn{t}
+  \eqn{F_{i}^{t}}{Fit} - forward rate for asset \eqn{i} at
+  time \eqn{t}. Excess returns are decomposed into the sum
+  of allocation, selection and interaction effects as in
+  the standard Brinson model:
   \deqn{R_{p}-R_{b}=\sum^{n}_{i=1}\left(A_{i}+S_{i}+I_{i}\right)}
   However the allocation effect is computed taking into
   account currency effects:
   \deqn{A_{i}=(w_{pi}-w_{bi})\times (R_{bi} - R_{ci} -
-  R_{l})} Benchmark returns adjusted fo the currency:
-  \deqn{R_{l} = \sum^{n}_{i=1}w_{bi}\times(R_{bi}-R_{ci})}
-  The contribution from currency is analogous to asset
+  R_{l})}{Ai = (wpi - wbi) * (Rbi - Rci - Rl)} Benchmark
+  returns adjusted fo the currency: \deqn{R_{l} =
+  \sum^{n}_{i=1}w_{bi}\times(R_{bi}-R_{ci})} The
+  contribution from the currency is analogous to asset
   allocation: \deqn{C_{i} = (w_{pi} - w_{bi}) \times
   (R_{cei} - e) + (w_{pfi} - w_{bfi}) \times (R_{fi} - e)}
   where \deqn{e = \sum^{n}_{i=1}w_{bi}\times R_{cei}} The
   final term, forward premium, is also analogous to the
   asset allocation: \deqn{R_{fi} = (w_{pi} - w_{bi}) \times
-  (R_{fpi} - d)} where \deqn{d = \sum^{n}_{i=1}w_{bi}\times
-  R_{fpi}} and R_fpi - forward premium
+  (R_{fpi} - d)}{Rfi = (wpi - wbi) * (Rfpi - d)} where
+  \deqn{d = \sum^{n}_{i=1}w_{bi}\times R_{fpi}} and
+  \eqn{R_{fpi}} - forward premium
 }
 \examples{
 data(attrib)

Modified: pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.geometric.Rd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.geometric.Rd	2012-07-12 09:15:48 UTC (rev 2146)
+++ pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.geometric.Rd	2012-07-12 09:16:32 UTC (rev 2147)
@@ -35,19 +35,27 @@
   \code{\link{Attribution}} function. Geometric attribution
   effects in the contrast with arithmetic do naturally link
   over time multiplicatively:
-  \deqn{\frac{(1+R_{p})}{1+R_{b}}-1=\prod^{n}_{t=1}(1+A_{t}^{G})\times\prod^{n}_{t=1}(1+S{}_{t}^{G})-1}
-  Total allocation effect at time t:
+  \deqn{\frac{(1+R_{p})}{1+R_{b}}-1=\prod^{n}_{t=1}(1+A_{t}^{G})\times
+  \prod^{n}_{t=1}(1+S{}_{t}^{G})-1} Total allocation effect
+  at time \eqn{t}:
   \deqn{A_{t}^{G}=\frac{1+b_{S}}{1+R_{bt}}-1} Total
-  selection effect at time t:
+  selection effect at time \eqn{t}:
   \deqn{S_{t}^{G}=\frac{1+R_{pt}}{1+b_{S}}-1} Semi-notional
   fund: \deqn{b_{S}=\sum^{n}_{i=1}w_{pi}\times R_{bi}}
+  \eqn{w_{pt}}{wpt} - portfolio weights at time \eqn{t},
+  \eqn{w_{bt}}{wbt} - benchmark weights at time \eqn{t},
+  \eqn{r_{t}}{rt} - portfolio returns at time \eqn{t},
+  \eqn{b_{t}}{bt} - benchmark returns at time \eqn{t},
+  \eqn{r} - total portfolio returns \eqn{b} - total
+  benchmark returns \eqn{n} - number of periods
 }
 \details{
   The multi-currency geometric attribution is handled
   following the Appendix A (Bacon, 2004).
 
   The individual selection effects are computed using:
-  \deqn{w_{pi}\times\left(\frac{1+R_{pLi}}{1+R_{bLi}}-1\right)\times\left(\frac{1+R_{bLi}}{1+b_{SL}}\right)}
+  \deqn{w_{pi}\times\left(\frac{1+R_{pLi}}{1+R_{bLi}}-1\right)\times
+  \left(\frac{1+R_{bLi}}{1+b_{SL}}\right)}
 
   The individual allocation effects are computed using:
   \deqn{(w_{pi}-w_{bi})\times\left(\frac{1+R_{bHi}}{1+b_{L}}-1\right)}
@@ -56,15 +64,17 @@
   base currency were used: \deqn{b_{SH} =
   \sum_{i}w_{pi}\times R_{bi}((w_{pi} - w_{bi})R_{bHi} +
   w_{bi}R_{bLi})} Total semi-notional returns in the local
-  currency: \deqn{b_{SL} = \sum_{i}w_{pi}R_{bLi}} Portfolio
-  returns in the local currency: \deqn{R_{pLi}} Benchmark
-  returns in the local currency: \deqn{R_{bLi}} Benchmark
-  returns hedged into the base currency: \deqn{R_{bHi}}
-  Total benchmark returns in the local currency:
-  \deqn{b_{L}} Total portfolio returns in the local
-  currency: \deqn{r_{L}} The total excess returns are
-  decomposed into:
-  \deqn{\frac{(1+R_{p})}{1+R_{b}}-1=\frac{1+r_{L}}{1+b_{SL}}\times\frac{1+b_{SH}}{1+b_{L}}\times\frac{1+b_{SL}}{1+b_{SH}}\times\frac{1+R_{p}}{1+r_{L}}\times\frac{1+b_{L}}{1+R_{b}}-1}
+  currency: \deqn{b_{SL} = \sum_{i}w_{pi}R_{bLi}}
+  \eqn{R_{pLi}}{RpLi} - portfolio returns in the local
+  currency \eqn{R_{bLi}}{RbLi} - benchmark returns in the
+  local currency \eqn{R_{bHi}}{RbHi} - benchmark returns
+  hedged into the base currency \eqn{b_{L}}{bL} - total
+  benchmark returns in the local currency \eqn{r_{L}}{rL} -
+  total portfolio returns in the local currency The total
+  excess returns are decomposed into:
+  \deqn{\frac{(1+R_{p})}{1+R_{b}}-1=\frac{1+r_{L}}{1+b_{SL}}\times\frac{1+
+  b_{SH}}{1+b_{L}}\times\frac{1+b_{SL}}{1+b_{SH}}\times\frac{1+R_{p}}{1+r_{L}}
+  \times\frac{1+b_{L}}{1+R_{b}}-1}
 
   where the first term corresponds to the selection, second
   to the allocation, third to the hedging cost transferred

Modified: pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.levels.Rd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.levels.Rd	2012-07-12 09:15:48 UTC (rev 2146)
+++ pkg/PortfolioAnalytics/sandbox/attribution/man/Attribution.levels.Rd	2012-07-12 09:16:32 UTC (rev 2147)
@@ -40,17 +40,16 @@
   instruments). Benchmark should have the same number of
   columns as portfolio. That is there should be a benchmark
   for each instrument in the portfolio (possibly 0). The
-  contribution to the allocation in the ith category for
-  the dth level is:
-  \deqn{\left(^{d}w_{pi}-^{d}w_{bi}\right)\times\left(\frac{1+^{d}R_{bi}}{1+^{d-1}R_{bi}}-1\right)\times\frac{1+^{d-1}R_{bi}}{1+bs^{d-1}}}
-}
-\details{
-  The total attribution for each asset allocation step in
-  the decision process is:
-  \deqn{\frac{1+^{d}bs}{1+^{d-1}bs}-1}
-
+  contribution to the allocation in the \eqn{i^{th}}
+  category for the \eqn{d^{th}} level is:
+  \deqn{\left(^{d}w_{pi}-^{d}w_{bi}\right)\times
+  \left(\frac{1+^{d}R_{bi}}{1+^{d-1}R_{bi}}-1\right)
+  \times\frac{1+^{d-1}R_{bi}}{1+bs^{d-1}}} The total
+  attribution for each asset allocation step in the
+  decision process is: \deqn{\frac{1+^{d}bs}{1+^{d-1}bs}-1}
   The final step, stock selection, is measured by:
-  \deqn{^{d}w_{pi}\times\left(\frac{1+R_{pi}}{1+^{d}R_{bi}}-1\right)\times\frac{1+^{d}R_{bi}}{1+^{d}bs}}
+  \deqn{^{d}w_{pi}\times\left(\frac{1+R_{pi}}{1+^{d}R_{bi}}-1\right)
+  \times\frac{1+^{d}R_{bi}}{1+^{d}bs}}
 }
 \examples{
 data(attrib)

Modified: pkg/PortfolioAnalytics/sandbox/attribution/man/AttributionFixedIncome.Rd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/man/AttributionFixedIncome.Rd	2012-07-12 09:15:48 UTC (rev 2146)
+++ pkg/PortfolioAnalytics/sandbox/attribution/man/AttributionFixedIncome.Rd	2012-07-12 09:16:32 UTC (rev 2147)
@@ -61,33 +61,40 @@
   risk-adjusted attribution. The arithmetic attribution is
   handled using weighted duration approach (Van Breukelen,
   2000). The allocation, selection and currency allocation
-  effects for category i are: \deqn{A_{i} = (D_{pi}\times
-  w_{pi}-D_{\beta}\times D_{bi}\times w_{pi})\times
-  (-\Delta y_{bi} + \Delta y_{b})} \deqn{S_{i} =
+  effects for category \eqn{i} are: \deqn{A_{i} =
+  (D_{pi}\times w_{pi}-D_{\beta}\times D_{bi}\times w_{pi})
+  \times (-\Delta y_{bi} + \Delta y_{b})} \deqn{S_{i} =
   D_{i}\times w_{pi}\times (-\Delta y_{ri} + \Delta
   y_{bi})} \deqn{C_{i} = (w_{pi} - w_{bi})\times (c_{i} +
-  R_{fi} - c')} where w_pi - portfolio weights, w_bi -
-  benchmark weights, D_i - modified duration in bond
-  category i. Duration beta:
-  \deqn{D_{\beta}=\frac{D_{r}}{D_{b}}} D_r - portfolio
-  duration, D_b - benchmark duration, D_bi - benchmark
-  duration for category i, D_pi - portfolio duration for
-  category i, Delta y_ri - change in portfolio yield for
-  category i, Delta y_bi - change in benchmark yield for
-  category i, Delta y_b - change in benchmark yield, R_ci-
-  currency returns for category i, R_fi - risk-free rate in
-  currency of asset i, \deqn{c'=
+  R_{fi} - c')}{Ci = (wpi - wbi) * (ci + Rfi - c')} where
+  \eqn{w_{pi}}{wpi} - portfolio weights, \eqn{w_{bi}}{wbi}
+  - benchmark weights, \eqn{D_{i}}{Di} - modified duration
+  in bond category \eqn{i}. Duration beta:
+  \deqn{D_{\beta}=\frac{D_{r}}{D_{b}}}{Dbeta = Dr / Db}
+  \eqn{D_{r}}{Dr} - portfolio duration, \eqn{D_{b}}{Db} -
+  benchmark duration, \eqn{D_{bi}}{Dbi} - benchmark
+  duration for category \eqn{i}, \eqn{D_{pi}}{Dpi} -
+  portfolio duration for category \eqn{i}, \eqn{\Delta
+  y_{ri}}{Delta yri} - change in portfolio yield for
+  category \eqn{i}, \eqn{\Delta y_{bi}}{Delta ybi} - change
+  in benchmark yield for category \eqn{i}, \eqn{\Delta
+  y_{b}}{Delta yb} - change in benchmark yield,
+  \eqn{R_{ci}}{Rci} - currency returns for category
+  \eqn{i}, \eqn{R_{fi}}{Rfi} - risk-free rate in currency
+  of asset \eqn{i}, \deqn{c'=
   \sum_{i}w_{bi}\times(R_{ci}+R_{fi})} The geometric
   attribution is adapted using Van Breukelen (2000)
   approach for the arithmetic attribution. The individual
   allocation and selection effects are computed as follows:
-  \deqn{A_{i}=D_{i}w_{pi}-D_{\beta}D_{bi}w_{bi}}
+  \deqn{A_{i}=D_{i}w_{pi}-D_{\beta}D_{bi}w_{bi}}{Ai = Di *
+  wpi - Dbeta * Dbi * wbi}
   \deqn{S_{i}=\frac{D_{pi}}{D_{bi}}\times (R_{bi} - R_{fi})
-  + R_{fi}}
+  + R_{fi}}{Si = Dpi / Dbi * (Rbi - Rfi) + Rfi}
 }
 \examples{
 data(attrib)
-AttributionFixedIncome(Rp, wp, Rb, wb, Rf, Dp, Db, S, wbf, geometric = FALSE)
+AttributionFixedIncome(Rp, wp, Rb, wb, Rf, Dp, Db, S, wbf,
+geometric = FALSE)
 }
 \author{
   Andrii Babii

Modified: pkg/PortfolioAnalytics/sandbox/attribution/man/Carino.Rd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/man/Carino.Rd	2012-07-12 09:15:48 UTC (rev 2146)
+++ pkg/PortfolioAnalytics/sandbox/attribution/man/Carino.Rd	2012-07-12 09:16:32 UTC (rev 2147)
@@ -27,19 +27,23 @@
   effects so that they can be summed up over multiple
   periods. Attribution effect are multiplied by the
   adjustment factor: \deqn{A_{t}' = A_{t} \times
-  \frac{k_{t}}{k}} where \deqn{k_{t} = \frac{log(1 +
-  R_{pt}) - log(1 + R_{bt})}{R_{pt} - R_{bt}}} \deqn{k =
-  \frac{log(1 + R_{p}) - log(1 + R_{b})}{R_{p} - R_{b}}} In
-  case if portfolio and benchmark returns are equal:
-  \deqn{k_{t} = \frac{1}{1 + R_{pt}}} where A_t' - adjusted
-  attribution effects at period t, A_t - unadjusted
-  attribution effects at period t, R_pt - portfolio returns
-  at period t, R_bt - benchmark returns at period t, Rp -
-  total portfolio returns, Rb - total benchmark returns, n
-  - number of periods The total arithmetic excess returns
-  can be explained in terms of the sum of adjusted
+  \frac{k_{t}}{k}}{At' = At * kt / k} where \deqn{k_{t} =
+  \frac{log(1 + R_{pt}) - log(1 + R_{bt})}{R_{pt} -
+  R_{bt}}} \deqn{k = \frac{log(1 + R_{p}) - log(1 +
+  R_{b})}{R_{p} - R_{b}}} In case if portfolio and
+  benchmark returns are equal: \deqn{k_{t} = \frac{1}{1 +
+  R_{pt}}}{kt = 1 / (1 + Rpt)} where \eqn{A_{t}'}{At'} -
+  adjusted attribution effects at period \eqn{t},
+  \eqn{A_{t}}{At} - unadjusted attribution effects at
+  period \eqn{t}, \eqn{R_{pt}}{Rpt} - portfolio returns at
+  period \eqn{t}, \eqn{R_{bt}}{Rbt} - benchmark returns at
+  period \eqn{t}, \eqn{R_{p}}{Rp} - total portfolio
+  returns, \eqn{R_{b}}{Rb} - total benchmark returns,
+  \eqn{n} - number of periods The total arithmetic excess
+  returns can be explained in terms of the sum of adjusted
   attribution effects: \deqn{R_{p} - R_{b} =
-  \sum^{n}_{t=1}\left(Allocation_{t}+Selection_{t}+Interaction_{t}\right)}
+  \sum^{n}_{t=1}\left(Allocation_{t}+Selection_{t}+
+  Interaction_{t}\right)}
 }
 \examples{
 data(attrib)

Modified: pkg/PortfolioAnalytics/sandbox/attribution/man/Conv.option.Rd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/man/Conv.option.Rd	2012-07-12 09:15:48 UTC (rev 2146)
+++ pkg/PortfolioAnalytics/sandbox/attribution/man/Conv.option.Rd	2012-07-12 09:16:32 UTC (rev 2147)
@@ -32,9 +32,11 @@
   exposure}
 }
 \examples{
-option = matrix(c(1000, 1000, 1000, 300, 400, 10, 20, 30, 40, 50, 10, 11, 12, 13, 14, 12, 13,
-14, 15, 16, 0.1, 0.2, 0.3, 0.4, 0.5, 0.1, 0.1, 0.2, 0.2, 0.3), 5, 6)
-colnames(option) = c("Strike", "Number", "Current option", "End option", "delta", "returns")
+option = matrix(c(1000, 1000, 1000, 300, 400, 10, 20, 30, 40, 50, 10, 11,
+12, 13, 14, 12, 13, 14, 15, 16, 0.1, 0.2, 0.3, 0.4, 0.5, 0.1, 0.1, 0.2,
+0.2, 0.3), 5, 6)
+colnames(option) = c("Strike", "Number", "Current option", "End option",
+"delta", "returns")
 rownames(option) = c("CVX", "XOM", "GE", "WMT", "FB")
 Conv.option(option)
 }

Modified: pkg/PortfolioAnalytics/sandbox/attribution/man/DaviesLaker.Rd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/man/DaviesLaker.Rd	2012-07-12 09:15:48 UTC (rev 2146)
+++ pkg/PortfolioAnalytics/sandbox/attribution/man/DaviesLaker.Rd	2012-07-12 09:16:32 UTC (rev 2147)
@@ -26,16 +26,20 @@
   time. This function uses Davies and Laker linking method
   to compute total attribution effects. Arithmetic excess
   returns are decomposed as follows: \deqn{R_{p} - R_{b} =
+  Allocation + Selection + Interaction}{Rp - Rb =
   Allocation + Selection + Interaction} \deqn{Allocation =
   \prod^{T}_{t=1}(1+bs_{t})-\prod^{T}_{t=1}(1+R_{bt})}
   \deqn{Selection =
   \prod^{T}_{t=1}(1+rs_{t})-\prod^{T}_{t=1}(1+R_{bt})}
   \deqn{Interaction =
-  \prod^{T}_{t=1}(1+R_{pt})-\prod^{T}_{t=1}(1+rs_{t})-\prod^{T}_{t=1}(1+bs_{t})+\prod^{T}_{t=1}(1+R_{bt})}
-  R_pi - portfolio returns at period i, Rb_i - benchmark
-  returns at period i, rs_i - selection notional fund
-  returns at period i, bs_i - allocation notional fund
-  returns at period i, T - number of periods
+  \prod^{T}_{t=1}(1+R_{pt})-\prod^{T}_{t=1}(1+rs_{t})-
+  \prod^{T}_{t=1}(1+bs_{t})+\prod^{T}_{t=1}(1+R_{bt})}
+  \eqn{R_{pi}}{Rpi} - portfolio returns at period \eqn{i},
+  \eqn{R_{bi}}{Rbi} - benchmark returns at period \eqn{i},
+  \eqn{rs_{i}}{rsi} - selection notional fund returns at
+  period \eqn{i}, \eqn{bs_{i}}{bsi} - allocation notional
+  fund returns at period \eqn{i}, \eqn{T} - number of
+  periods
 }
 \examples{
 data(attrib)

Modified: pkg/PortfolioAnalytics/sandbox/attribution/man/Frongello.Rd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/man/Frongello.Rd	2012-07-12 09:15:48 UTC (rev 2146)
+++ pkg/PortfolioAnalytics/sandbox/attribution/man/Frongello.Rd	2012-07-12 09:16:32 UTC (rev 2147)
@@ -27,12 +27,15 @@
   attribution effects so that they can be summed up over
   multiple periods Adjusted attribution effect at period t
   are: \deqn{A_{t}' =
-  A_{t}\times\prod^{t-1}_{i=1}(1+r_{pi})+R_{bt}\times\sum^{t-1}_{i=1}A_{i}'}
-  A_t' - adjusted attribution effects at period t, A_t -
-  unadjusted attribution effects at period t, R_pi -
-  portfolio returns at period i, R_bi - benchmark returns
-  at period , Rp - total portfolio returns, Rb - total
-  benchmark returns, n - number of periods
+  A_{t}\times\prod^{t-1}_{i=1}(1+r_{pi})+R_{bt}
+  \times\sum^{t-1}_{i=1}A_{i}'} \eqn{A_{t}'}{At'} -
+  adjusted attribution effects at period \eqn{t},
+  \eqn{A_{t}}{At} - unadjusted attribution effects at
+  period \eqn{t}, \eqn{R_{pi}}{Rpi} - portfolio returns at
+  period \eqn{i}, \eqn{R_{bi}}{Rbi} - benchmark returns at
+  period, \eqn{R_{p}}{Rp} - total portfolio returns,
+  \eqn{R_{b}}{Rb} - total benchmark returns, \eqn{n} -
+  number of periods
 }
 \examples{
 data(attrib)

Modified: pkg/PortfolioAnalytics/sandbox/attribution/man/Grap.Rd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/man/Grap.Rd	2012-07-12 09:15:48 UTC (rev 2146)
+++ pkg/PortfolioAnalytics/sandbox/attribution/man/Grap.Rd	2012-07-12 09:16:32 UTC (rev 2147)
@@ -26,18 +26,20 @@
   function uses GRAP smoothing algorithm to adjust
   attribution effects so that they can be summed up over
   multiple periods Attribution effect are multiplied by the
-  adjustment factor \deqn{A_{t}' = A_{t} \times G_{t}}
-  where
+  adjustment factor \deqn{A_{t}' = A_{t} \times G_{t}}{At'
+  = At * Gt} where
   \deqn{G_{t}=\prod^{t-1}_{i=1}(1+R_{pi})\times\prod^{n}_{t+1}(1+R_{bi})}
-  A_t' - adjusted attribution effects at period t, A_t -
-  unadjusted attribution effects at period t, R_pi -
-  portfolio returns at period i, R_bi - benchmark returns
-  at period i, Rp - total portfolio returns, Rb - total
-  benchmark returns, n - number of periods The total
-  arithmetic excess returns can be explained in terms of
-  the sum of adjusted attribution effects: \deqn{R_{p} -
-  R_{b} =
-  \sum^{n}_{t=1}\left(Allocation_{t}+Selection_{t}+Interaction_{t}\right)}
+  \eqn{A_{t}'}{At'} - adjusted attribution effects at
+  period \eqn{t}, \eqn{A_{t}}{At} - unadjusted attribution
+  effects at period \eqn{t}, \eqn{R_{pi}}{Rpi} - portfolio
+  returns at period \eqn{i}, \eqn{R_{bi}}{Rbi} - benchmark
+  returns at period \eqn{i}, \eqn{R_{p}}{Rp} - total
+  portfolio returns, \eqn{R_{b}}{Rb} - total benchmark
+  returns, \eqn{n} - number of periods The total arithmetic
+  excess returns can be explained in terms of the sum of
+  adjusted attribution effects: \deqn{R_{p} - R_{b} =
+  \sum^{n}_{t=1}\left(Allocation_{t}+Selection_{t}+
+  Interaction_{t}\right)}
 }
 \examples{
 data(attrib)

Modified: pkg/PortfolioAnalytics/sandbox/attribution/man/Menchero.Rd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/man/Menchero.Rd	2012-07-12 09:15:48 UTC (rev 2146)
+++ pkg/PortfolioAnalytics/sandbox/attribution/man/Menchero.Rd	2012-07-12 09:16:32 UTC (rev 2147)
@@ -26,25 +26,29 @@
   function uses Menchero smoothing algorithm to adjust
   attribution effects so that they can be summed up over
   multiple periods Attribution effect are multiplied by the
-  adjustment factor \deqn{A_{t}' = A_{t} \times (M +a_{t})}
-  where
-  \deqn{M=\frac{\frac{1}{n}(R_{p}-R_{b})}{(1+R_{p})^{\frac{1}{n}}-(1+R_{b})^{\frac{1}{n}}}}
-  \deqn{a_{t} =
-  \left(\frac{R_{p}-R_{b}-M\times\sum^{n}_{t=1}(R_{pt}-R_{bt})}{\sum^{n}_{t=1}(R_{pt}-R_{bt})^{2}}\right)\times(R_{pt}-R_{bt})}
+  adjustment factor \deqn{A_{t}' = A_{t} \times (M
+  +a_{t})}{At' = At * (M + at)} where
+  \deqn{M=\frac{\frac{1}{n}(R_{p}-R_{b})}{(1+R_{p})^{\frac{1}{n}}-
+  (1+R_{b})^{\frac{1}{n}}}} \deqn{a_{t} =
+  \left(\frac{R_{p}-R_{b}-M\times\sum^{n}_{t=1}(R_{pt}-
+  R_{bt})}{\sum^{n}_{t=1}(R_{pt}-R_{bt})^{2}}\right)\times(R_{pt}-R_{bt})}
   In case if portfolio and benchmark returns are equal the
   limit of the above value is used: \deqn{M = (1 +
-  r_{p})^\frac{n-1}{n}} A_t' - adjusted attribution effects
-  at period t, A_t - unadjusted attribution effects at
-  period t, R_pt - portfolio returns at period t, R_bt -
-  benchmark returns at period t, Rp - total portfolio
-  returns, Rb - total benchmark returns, n - number of
-  periods
+  r_{p})^\frac{n-1}{n}}{M = (1 + rp)^((n - 1) / n)}
+  \eqn{A_{t}'}{At'} - adjusted attribution effects at
+  period \eqn{t}, \eqn{A_{t}}{At} - unadjusted attribution
+  effects at period \eqn{t}, \eqn{R_{pt}}{Rpt} - portfolio
+  returns at period \eqn{t}, \eqn{R_{bt}}{Rbt} - benchmark
+  returns at period \eqn{t}, \eqn{R_{p}}{Rp} - total
+  portfolio returns, \eqn{R_{b}}{Rb} - total benchmark
+  returns, \eqn{n} - number of periods
 }
 \details{
   The total arithmetic excess returns can be explained in
   terms of the sum of adjusted attribution effects:
   \deqn{R_{p} - R_{b} =
-  \sum^{n}_{t=1}\left(Allocation_{t}+Selection_{t}+Interaction_{t}\right)}
+  \sum^{n}_{t=1}\left(Allocation_{t}+Selection_{t}+
+  Interaction_{t}\right)}
 }
 \examples{
 data(attrib)

Modified: pkg/PortfolioAnalytics/sandbox/attribution/man/Return.annualized.excess.Rd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/man/Return.annualized.excess.Rd	2012-07-12 09:15:48 UTC (rev 2146)
+++ pkg/PortfolioAnalytics/sandbox/attribution/man/Return.annualized.excess.Rd	2012-07-12 09:16:32 UTC (rev 2147)
@@ -29,8 +29,8 @@
   scale by raising the compound return to the number of
   periods in a year, and taking the root to the number of
   total observations:
-  \deqn{prod(1+R_{a})^{\frac{scale}{n}}-1=\sqrt[n]{prod(1+R_{a})^{scale}}-1}{prod(1
-  + Ra)^(scale/n) - 1}
+  \deqn{prod(1+R_{a})^{\frac{scale}{n}}-1=\sqrt[n]{prod(1+R_{a})^{scale}}-
+  1}{prod(1 + Ra)^(scale/n) - 1}
 
   where scale is the number of periods in a year, and n is
   the total number of periods for which you have
@@ -40,10 +40,11 @@
   benchmark we can compute annualized excess return as
   difference in the annualized portfolio and benchmark
   returns in the arithmetic case: \deqn{er = R_{pa} -
-  R_{ba}}
+  R_{ba}}{er = Rpa - Rba}
 
   and as a geometric difference in the geometric case:
-  \deqn{er = (1 + R_{pa}) / (1 + R_{ba}) - 1}
+  \deqn{er = (1 + R_{pa}) / (1 + R_{ba}) - 1}{er = (1 +
+  Rpa) / (1 + Rba) - 1}
 }
 \examples{
 data(attrib)



More information about the Returnanalytics-commits mailing list