FreeEnergy: Free Energy

Description Usage Arguments Details Value References See Also Examples

Description

The function FreeEnergy computes the free energy of a portfolio given the simple returns of the individual assets.

Usage

1
FreeEnergy(pi, R, group.index = NULL)

Arguments

pi

a numeric vector of portfolio weights (a probability vector).

R

a numeric vector of simple returns.

group.index

if provided, the free energy will be decomposed according to the chain rule (see below for more details). The default is NULL. For the format of group.index see the example in GetGroupWeight.

Details

The free energy equals the portfolio log return minus the weighted average log return of the individual assets, see Definition 2.2 of Pal and Wong (2013). It is a weighted measure of the cross volatility of the market.

If group.index is provided the free energy will be decompoesd using the chain rule stated in Lemma 3.1(ii) of Pal and Wong (2013), see equation (24) there. In this case the output has 1 + 1 + m components, where m is the number of groups defined by group.index. The first component is the left-hand-side of (24). The second component is the first term on the right-hand-side of (24). The other m components are the terms in the sum on the right-hand-side of (24).

Value

A non-negative number or +Inf if group.index is not given. A numeric vector if group.index is given.

References

Pal, S. and T.-K. L. Wong (2013). Energy, entropy, and arbitrage. arXiv preprint arXiv:1308.5376.

See Also

EnergyEntropyDecomp

Examples

1
2
3
4
pi <- c(1/3, 1/3, 1/3)  # portfolio weights
R <- c(0.1, 0.02, -0.05)  # simple returns

FreeEnergy(pi, R)

RelValAnalysis documentation built on May 2, 2019, 3:09 a.m.