Diversity: Diversity

Description Usage Arguments Details Value References See Also Examples

Description

The function Diversity computes the diversity of a probability distribution.

Usage

1
Diversity(x, p = 0.5)

Arguments

x

a numeric vector with non-negative entries.

p

a parameter between 0 and 1. The default value is 0.5.

Details

The diversity function is used in stochastic portfolio theory as a measure of market diversity. It is the generating function of the diversity-weighted portfolio (see DiversityPortfolio). See Example 3.4.4 of Fernholz (2002) for more information.

Value

A number.

References

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

See Also

DiversityPortfolio

Examples

1
2
x <- c(0.3, 0.2, 0.5)
Diversity(x, p = 0.7)

Example output

Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

[1] 1.56824

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