Learn R Programming

rportfolios (version 1.0-1)

portfolio.diversification: Portfolio Diversification Measure

Description

This function computes one of several portfolio diversification measures for a single portfolio or a collection of portfolios.

Usage

portfolio.diversification(portfolios, method = c("naive", "herfindahl", "herfindahl-hirschman", "hannah-kay", "shannon"), alpha = 2)

Arguments

portfolios
a vector or matrix of portfolio exposures
method
a character value for the method used to compute the measure
alpha
a numeric value for parameter required for the Hannah-Kay measure

Value

A vector with one or more values.

Details

The function ocmputes a portfolio diversification measure for a single portfolio or for a collection of portfolios organized as a matrix.

References

Worthington, A. C., 2009. Household Asset Portfolio Diversification: Evidence from the Household, Income and Labour Dynamics in Australia (Hilda) Survey, Working Paper, Available at SSRN: http:////ssrn.com//abstract=1421567.

Examples

Run this code
onePortfolio <- random.longonly( 100, 75 )
naive <- portfolio.diversification( onePortfolio, method = "naive" )
herfindahl <- portfolio.diversification( onePortfolio, method = "herfindahl" )
herfindahl.hirschman <- portfolio.diversification( onePortfolio, method = "herfindahl-hirschman" )
hannah.kay <- portfolio.diversification( onePortfolio, method = "hannah-kay" )
shannon <- portfolio.diversification( onePortfolio, method = "shannon" )

Run the code above in your browser using DataLab