Package 'DiversificationR'

Title: Econometric Tools to Measure Portfolio Diversification
Description: Diversification is one of the most important concepts in portfolio management. This framework offers scholars, practitioners and policymakers a useful toolbox to measure diversification. Specifically, this framework provides recent diversification measures from the recent literature. These diversification measures are based on the works of Rudin and Morgan (2006) <doi:10.3905/jpm.2006.611807>, Choueifaty and Coignard (2008) <doi:10.3905/JPM.2008.35.1.40>, Vermorken et al. (2012) <doi:10.3905/jpm.2012.39.1.067>, Flores et al. (2017) <doi:10.3905/jpm.2017.43.4.112>, Calvet et al. (2007) <doi:10.1086/524204>, and Candelon, Fuerst and Hasse (2020).
Authors: Jean-Baptiste Hasse [cre, aut]
Maintainer: Jean-Baptiste Hasse <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-11-17 03:38:55 UTC
Source: https://github.com/cran/DiversificationR

Help Index


Efficient portfolios returns

Description

This dataset includes efficient real estate portfolios returns from 1999 to 2018 (annual frequency). Overall, country- and -sector level portfolios are computed in both Markowitz and Black-Litterman frameworks.

Usage

data("data_efficient_portfolios_returns")

Format

The format is: num [1:19, 1:6] 7.87 6.93 6.32 6.92 7.1 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:6] "v_Overall_M" "v_Countries_M" "v_Sectors_M" "v_Overall_BL" ...

Source

Author's own calculations based on MSCI dataset.

References

Candelon, Bertrand, Franz Fuerst, and Jean-Baptiste Hasse. "Diversification Potential in Real Estate Portfolios." (2020) Cambridge Working Paper.

Examples

data(data_efficient_portfolios_returns)
head(data_efficient_portfolios_returns)

Function computing a circular block bootstrap

Description

This function computes a circular block-resampling bootstrap of a matrix of returns.

Usage

f_circular_bloc_bootstrap(m_input_data_series, input_c, input_b, input_prob)

Arguments

m_input_data_series

A matrix of assets or portfolios returns (one per column)

input_c

A numerical value (number of wrapping the data around in a circle)

input_b

A numerical value (length of block size - time dimension)

input_prob

A numerical value (probability)

Value

RSRL

A numerical value (bootstrapped RSRL)

mRSRL

A numerical value (bootstrapped mRSRL)

bootstapped_series

A matrix of numerical values (bootstrapped returns)

Author(s)

Jean-Baptiste Hasse

References

Efron, B. "Bootstrap methods: another look at the jackknife." The Annals of Statistics 7 (1979): 1-26.

Hall, Peter, Joel L. Horowitz, and Bing-Yi Jing. "On blocking rules for the bootstrap with dependent data." Biometrika 82.3 (1995): 561-574.

Politis, Dimitris N., and Joseph P. Romano. "A circular block-resampling procedure for stationary data." Exploring the limits of bootstrap 2635270 (1992).

Examples

# NOT RUN {

  # Load data
  data("data_efficient_portfolios_returns")
  m_example_returns <- data_efficient_portfolios_returns[,1:2]

  # Compute Circular bootstap
  f_circular_bloc_bootstrap(m_example_returns, 10, 2, 0.95)

# }

Function computing portfolio diversification measures

Description

This function computes several portfolio diversification measures: Portfolio Diversification Index (PDI), Diversification Ratio (DR), Diversification Delta (DD) and Diversification Delta Star (DD*).

Usage

f_diversification_measurement(v_input_weights, m_input_returns, c_input_method)

Arguments

v_input_weights

A vector of numerical values (asset weights)

m_input_returns

A matrix of numerical values (asset returns)

c_input_method

A character value (name of the diversification measure)

Value

result

A numeric value

Author(s)

Jean-Baptiste Hasse

References

Rudin, Alexander M. "A portfolio diversification index." The Journal of Portfolio Management 32.2 (2006): 81-89.

Choueifaty, Yves, and Yves Coignard. "Toward maximum diversification." The Journal of Portfolio Management 35.1 (2008): 40-51.

Vermorken, Maximilian A., Francesca R. Medda, and Thomas Schroder. "The diversification delta: A higher-moment measure for portfolio diversification." The Journal of Portfolio Management 39.1 (2012): 67-74.

Flores, Yuri Salazar, et al. "The diversification delta: A different perspective." The Journal of Portfolio Management 43.4 (2017): 112-124.

Examples

# NOT RUN {

  # Load data
  data("data_efficient_portfolios_returns")
  m_assets_returns <- data_efficient_portfolios_returns
  number_assets <- length(m_assets_returns[1,])
  v_weights <- rep(1/number_assets, number_assets)

  # Portfolio Diversification Index (PDI)
  f_diversification_measurement(v_weights, m_assets_returns, "Portfolio_Diversification_Index")

  # Diversification Ratio (DR)
  f_diversification_measurement(v_weights, m_assets_returns, "Diversification_Ratio")

  # Diversification Delta (DD)
  f_diversification_measurement(v_weights, m_assets_returns, "Diversification_Delta")

  # Diversification Delta Star (DD*)
  f_diversification_measurement(v_weights, m_assets_returns, "Diversification_Delta_Star")

# }

Function computing the RSRL or the RSRL

Description

This function computes the relative Sharpe ratio loss (RSRL) or its modified version (mRSRL) from two vectors of financial returns (a given portfolio and its benchmark). RSRL and mRSRL are both (under)diversification measures. Compared to RSRL, mRSRL is robust to the non-normality of returns.

Usage

f_RSRL(v_input_data_portfolio, v_input_data_benchmark, b_input_RSRL_modified, input_prob)

Arguments

v_input_data_portfolio

A vector of returns

v_input_data_benchmark

A vector of returns

b_input_RSRL_modified

A boolean value

input_prob

A numerical value

Value

result

A numeric value

Author(s)

Jean-Baptiste Hasse

References

Calvet, Laurent E., John Y. Campbell, and Paolo Sodini. "Down or out: Assessing the welfare costs of household investment mistakes." Journal of Political Economy 115.5 (2007): 707-747.

Candelon, Bertrand, Franz Fuerst, and Jean-Baptiste Hasse. "Diversification Potential in Real Estate Portfolios." (2020) Cambridge Working Paper.

Examples

# NOT RUN {

  # Load data
  data("data_efficient_portfolios_returns")

  # Prepare variables
  v_port <- data_efficient_portfolios_returns[,2]
  v_bench <- data_efficient_portfolios_returns[,1]

  # Compute RSRL
  f_RSRL(v_port, v_bench, FALSE, 0.95)

  # Compute mRSRL
  f_RSRL(v_port, v_bench, TRUE, 0.95)

# }

Function computing the Sharpe ratio or one of its modified version

Description

This function computes the Sharpe ratio (SR) or one of its modified version (mSR) from two vectors of financial returns (a given portfolios and its benchmark).

Usage

f_SR(v_input_data_portfolio, v_input_data_benchmark, c_input_method, input_prob)

Arguments

v_input_data_portfolio

A vector of numerical values (returns)

v_input_data_benchmark

A vector of numerical values (returns)

c_input_method

A vector of characters (method)

input_prob

A numerical value (probability)

Value

result

A numeric value

Author(s)

Jean-Baptiste Hasse

References

Bali, Turan G., Stephen J. Brown, and K. Ozgur Demirtas. "Do hedge funds outperform stocks and bonds?." Management Science 59.8 (2013): 1887-1903.

Favre, Laurent, and José-Antonio Galeano. "Mean-modified value-at-risk optimization with hedge funds." The journal of alternative investments 5.2 (2002): 21-25.

Gregoriou, Greg N., and Jean-Pierre Gueyie. "Risk-adjusted performance of funds of hedge funds using a modified Sharpe ratio." The Journal of wealth management 6.3 (2003): 77-83.

Sharpe, William F. "The sharpe ratio." Journal of Portfolio Management 21.1 (1994): 49-58.

Sharpe, William F. "Mutual fund performance." The Journal of business 39.1 (1966): 119-138.

Examples

# NOT RUN {

  # Load data
  data("data_efficient_portfolios_returns")

  # Prepare data
  v_port <- data_efficient_portfolios_returns[,2]
  v_bench <- data_efficient_portfolios_returns[,1]
  v_rf <- v_bench


  # Compute the Reward-to-Variablity Ratio as in Sharpe (1966)
  f_SR(v_port, v_rf, "", 0.95)

  # Compute the Sharpe ratio as in Sharpe (1994)
  f_SR(v_port, v_bench, "S", 0.95)

  # Compute the modified Sharpe ratio as in Favre and Galeano (2002) and Gregoriou and Gueyie (2003)
  f_SR(v_port, v_bench, "FG-GG", 0.95)

  # Compute the modified Sharpe ratio as in Bali et al. (2013)
  f_SR(v_port, v_bench, "BBD", 0.95)

# }

Function computing coefficients and significance levels of the RSRL and mRSRL

Description

This function computes coefficients and significance levels of the RSRL and mRSRL. It performs the (under)diversification test of a given portfolio compared to its benchmark.

Usage

f_test_RSRL(v_input_p_r, v_input_b_r, input_c, input_b, input_sim, b_input_s, input_prob)

Arguments

v_input_p_r

A vector of portfolio returns

v_input_b_r

A vector of portfolio returns

input_c

A numerical value (number of data repetitions)

input_b

A numerical value (size of the block - time dimension)

input_sim

A numerical value (number of simulations)

b_input_s

A boolean value (percentile or studentized bootstrap)

input_prob

A numerical value (probability)

Value

RSRL

A numerical value (RSRL coefficient)

Signif_level_RSRL

Numerical value (RSRL significance level)

mRSRL

A numerical value (RSRL coefficient)

Signif_level_mRSRL

Numerical value (mRSRL significance level)

Author(s)

Jean-Baptiste Hasse

References

Candelon, Bertrand, Franz Fuerst, and Jean-Baptiste Hasse. "Diversification Potential in Real Estate Portfolios." (2020) Cambridge Working Paper.

Examples

# NOT RUN {

  # Load data
  data("data_efficient_portfolios_returns")

  # Prepare data
  v_port <- data_efficient_portfolios_returns[,2]
  v_bench <- data_efficient_portfolios_returns[,1]

  # Test RSRL and mRSRL
  f_test_RSRL(v_port, v_bench, 10, 2, 1000, TRUE, 0.95)

# }

Function computing Value-at-Risk and modified Value-at-Risk

Description

This function computes the Value-at-Risk (VaR) or the modified Value-at-Risk (mVaR) from a vector of financial returns. mVaR is also called the Cornish-Fisher expansion of Value-at-Risk. Compared to classic VaR, mVaR adequately accounts for the non-normality of returns.

Usage

f_VaR(v_input_data, b_input_var_modified, input_prob)

Arguments

v_input_data

A vector including an asset or portfolio returns

b_input_var_modified

A boolean to compute VaR or mVaR

input_prob

A numerical value (probability)

Value

result

A numeric value

Author(s)

Jean-Baptiste Hasse

References

Cornish, Edmund A., and Ronald A. Fisher. "Moments and cumulants in the specification of distributions." Revue de l'Institut international de Statistique (1938): 307-320.

Jorion, Philippe. "Risk2: Measuring the risk in value at risk." Financial analysts journal 52.6 (1996): 47-56.

Examples

# NOT RUN {

  # Load data
  data("data_efficient_portfolios_returns")

  # Prepare variables
  v_port <- data_efficient_portfolios_returns[,1]

  # Compute VaR
  f_VaR(v_port, FALSE, 0.95)

  # Compute modified VaR
  f_VaR(v_port, TRUE, 0.95)

# }