Learn R Programming

RelValAnalysis (version 1.0)

EnergyEntropyDecomp: Energy-entropy Decomposition

Description

The function EnergyEntropyDecomp computes and plots the energy-energy decomposition of any portfolio relative to the benchmark portfolio.

Usage

EnergyEntropyDecomp(market, weight, grouping = NULL, plot = TRUE)

Arguments

Value

If grouping is not provided, it is a zoo object with the followign columns. The definitions of the terms can be found in Section 2 of Pal and Wong (2013). Each term represents an increment for the period.Excess log returnrelative log return.Free energyfree energy.Relative entropyminus of the change of relative entropy.Controlcontrol.Driftdrift. It equals free energy + control.If grouping is provided, it is a list containing several zoo objects:dlogVrelative log return.free.energiesfree energy and its decomposition.relative.entropiesrelative entropy and its decomposition.controlcontrol and its decomposition.

Details

The energy-entropy decomposition decomposes the excess log return of a portfolio (with respect to the benchmark) into three terms: free energy, control and change in relative entropy. See Section 2 of Pal and Wong (2013) for details. It is important to note that Pal and Wong (2013) assumes that the benchmark is a buy-and-hold portfolio, so that market$buy.and.hold is TRUE. The decomposition is modified so that an identity holds even when the market is not buy-and-hold. However in that case the control term in the decomposition is harder to interpret. A portfolio can sometimes be thought of as a portfolio of portfolios, and the energy-entropy decomposition has a corresponding hierchical decomposition, see Section 3 of Pal and Wong (2013). If grouping is provided, the hierachical decomposition will be performed and plotted. An example of grouping is a label for sectors (say 1: financial, 2: utility, 3:energy, etc). For more details see the supplementary files available on the author's website.

References

Pal, S. and T.-K. L. Wong (2013). Energy, entropy, and arbitrage. arXiv preprint arXiv:1308.5376. Author's website: http://www.math.washington.edu/~wongting/

See Also

FreeEnergy, RelativeEntropy, EEControl,

Examples

Run this code
# Example 1
# Energy-entropy decomposition for the entropy-weighted portfolio
data(applestarbucks)
market <- toymkt(applestarbucks, initial.weight = c(0.5, 0.5))
weight <- GetWeight(market, EntropyPortfolio$weight.function)
decomp <- EnergyEntropyDecomp(market, weight, plot = TRUE)


# Example 2
# Example of a hierchical decomposition of the entropy-weighted
# portfolio in the Atlas market model
model <- AtlasModel(n = 6, g = 0.1, sigma = 0.2)
market <- SimMarketModel(model)  # default settings
grouping <- c(1, 1, 2, 2, 2, 2)
weight <- GetWeight(market, EntropyPortfolio$weight.function)
decomp <- EnergyEntropyDecomp(market, weight, grouping, plot = TRUE)

Run the code above in your browser using DataLab