Learn R Programming

rportfolios (version 1.0-1)

ractive.test: Generate random active portfolios

Description

This function generates m random actively managed portfolios relative to a given benchmark portfolio. Each portfolio is the combination of a benchmark portfolio and a notional neutral long short portfolio with given gross notional exposure. The number of non zero positions in the long short portfolios is k. The function is used to evaluate the computational performance of the portfolio generation algorithm.

Usage

ractive.test(m, x.b, x.g, k = length(x.b), segments = NULL, max.iter = 2000, eps = 0.001)

Arguments

m
A positive integer value for the number of portfolios in the sample
x.b
A numeric vector with the investment weights in the benchmark portfolio
x.g
A positive numeric value for the gross notional exposure in the long short portfolio
k
A positive integer value for the number of non zero positions in the long short portfolio
segments
A vector or list of vectors that defines the portfolio segments
max.iter
A positive integer value for the maximum iterations for the long short portfolio
eps
A small positive real value for the convergence criteria for the gross notional exposure

Value

A list with two named components.

Details

The function executes the function random.active.test using the R function lapply. The result is a list containing the investment weight vector and the number of iterations. These data are stored in a matrix of investment weights and a vector of iterations. This list is returned.

References

Grinold, R. C. and R. H. Kahn, 1999. Active Portfolio Management: Quantitative Approach for Providing Superior Returns and Controlling Risk, Second Edition, McGraw-Hill, New York, NY.

Qian, E. E., R. H. Hua and E. H. Sorensen, 2007. Quantitative Equity Portfolio Management, Chapman \& Hall, London, UK.

Scherer, B., 2007. Portfolio Construction and Risk Budgeting, Third Edition, Risk Books, London, UK.

See Also

random.active.test

Examples

Run this code
###
### benchmark consists of 20 equally weighted investments
###
x.b <- rep( 1, 30 ) / 30
###
### the gross notional exposure of the long short portfolio is a benchmark weight
###
x.g <- 1 / 30
###
### generate 100 random active portfolios with 30 non zero positions in the long short portfolios
###
x.matrix <- ractive.test( 100, x.b, x.g )
###
### generate 100 random active portfolios with 10 non zero positions in the long short portfolios
###
y.matrix <- ractive.test( 100, x.b, x.g, 10 )

Run the code above in your browser using DataLab