The function FreeEnergy computes the free energy of a portfolio given the simple returns of the individual assets.
Usage
FreeEnergy(pi, R, group.index = NULL)
Arguments
Value
A non-negative number or +Inf if group.index is not given. A numeric vector if group.index is given.
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).
References
Pal, S. and T.-K. L. Wong (2013). Energy, entropy, and arbitrage. arXiv preprint arXiv:1308.5376.