GeometricMean: Geometric Mean

Description Usage Arguments Details Value References See Also Examples

Description

The function GeometricMean computes the geometric mean of non-negative numbers with a given weight.

Usage

1
GeometricMean(x, weight = rep(1/length(x), length(x)))

Arguments

x

a numeric vector with non-negative entries.

weight

a numeric probability vector. The default value is the vector with equal weights.

Details

The geometric mean is used in stochastic portfolio theory as the generating function of the constant-weighted portfolio. See Example 3.1.6 of Fernholz (2002).

Value

A number.

References

Fernholz, E. R. (2002) Stochastic portfolio theory. Springer.

See Also

ConstantPortfolio

Examples

1
2
3
x <- c(0.3, 0.7)
weight <- c(0.6, 0.4)
GeometricMean(x, weight)

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