# arith2geom

Arithmetic to geometric moments of asset returns

## Syntax

```[mg, Cg] = arith2geom(ma, Ca)
[mg, Cg] = arith2geom(ma, Ca, t)
```

## Arguments

 `ma` Arithmetic mean of asset-return data (n-vector). `Ca` Arithmetic covariance of asset-return data (n-by-n symmetric, positive-semidefinite matrix. `t` (Optional) Target period of geometric moments in terms of periodicity of arithmetic moments with default value 1 (scalar).

## Description

`arith2geom` transforms moments associated with a simple Brownian motion into equivalent continuously-compounded moments associated with a geometric Brownian motion with a possible change in periodicity.

`[mg, Cg] = arith2geom(ma, Ca, t)` returns `mg`, continuously-compounded or "geometric" mean of asset returns over the target period (n-vector), and `Cg`, which is a continuously-compounded or "geometric" covariance of asset returns over the target period (n-by-n matrix).

Arithmetic returns over period tA are modeled as multivariate normal random variables with moments

$E\left[\text{X}\right]={\text{m}}_{A}$

and

$\mathrm{cov}\left(\text{X}\right)={\text{C}}_{A}$

Geometric returns over period tG are modeled as multivariate lognormal random variables with moments

$E\left[\text{Y}\right]=1+{\text{m}}_{G}$

$\mathrm{cov}\left(\text{Y}\right)={\text{C}}_{G}$

Given t = tG / tA, the transformation from geometric to arithmetic moments is

$1+{\text{m}}_{{G}_{i}}=\mathrm{exp}\left(t{\text{m}}_{{A}_{i}}+\frac{1}{2}t{\text{C}}_{{A}_{ii}}\right)$

${\text{C}}_{{G}_{ij}}=\left(1+{\text{m}}_{{G}_{i}}\right)\left(1+{\text{m}}_{{G}_{\text{j}}}\right)\left(\mathrm{exp}\left(t{\text{C}}_{A}\right)-1\right)$

For i,j = 1,..., n.

 Note:   If t = 1, then Y = exp(X).

This function has no restriction on the input mean `ma` but requires the input covariance `Ca` to be a symmetric positive-semidefinite matrix.

The functions `arith2geom` and `geom2arith` are complementary so that, given `m`, `C`, and `t`, the sequence

```[mg, Cg] = arith2geom(m, C, t); [ma, Ca] = geom2arith(mg, Cg, 1/t); ```

yields `ma` = `m` and `Ca` = `C`.

## Examples

Example 1. Given arithmetic mean `m` and covariance `C` of monthly total returns, obtain annual geometric mean `mg` and covariance `Cg`. In this case, the output period (1 year) is 12 times the input period (1 month) so that ```t = 12``` with

`[mg, Cg] = arith2geom(m, C, 12);`

Example 2. Given annual arithmetic mean `m` and covariance `C `of asset returns, obtain monthly geometric mean `mg` and covariance `Cg`. In this case, the output period (1 month) is 1/12 times the input period (1 year) so that `t = 1/12` with

`[mg, Cg] = arith2geom(m, C, 1/12);`

Example 3. Given arithmetic means `m` and standard deviations `s` of daily total returns (derived from 260 business days per year), obtain annualized continuously-compounded mean `mg `and standard deviations `sg` with

```[mg, Cg] = arith2geom(m, diag(s .^2), 260); sg = sqrt(diag(Cg));```

Example 4. Given arithmetic mean `m` and covariance `C` of monthly total returns, obtain quarterly continuously-compounded return moments. In this case, the output is 3 of the input periods so that ```t = 3``` with

`[mg, Cg] = arith2geom(m, C, 3);`

Example 5. Given arithmetic mean `m` and covariance `C` of 1254 observations of daily total returns over a 5-year period, obtain annualized continuously-compounded return moments. Since the periodicity of the arithmetic data is based on 1254 observations for a 5-year period, a 1-year period for geometric returns implies a target period of ```t = 1254/5``` so that

`[mg, Cg] = arith2geom(m, C, 1254/5); `