Description Usage Arguments Details Value References See Also Examples
The function FreeEnergy
computes the free energy of a portfolio given the simple returns of the individual assets.
1 | FreeEnergy(pi, R, group.index = NULL)
|
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 |
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).
A non-negative number or +Inf
if group.index
is not given. A numeric vector if group.index
is given.
Pal, S. and T.-K. L. Wong (2013). Energy, entropy, and arbitrage. arXiv preprint arXiv:1308.5376.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.