random.longshort.test: Random long short portfolio test

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function generates a vector of investment weights for a portfolio with a given net and gross notional exposure. There are k non-zero positions in the portfolio. The function is used to evaluate the performance of the portfolio generation algorithm.

Usage

1
2
random.longshort.test(n = 2, k = n, segments = NULL, x.t.long = 1, x.t.short = x.t.long, 
max.iter = 2000, eps = 0.001)

Arguments

n

A positive integer value for the number of investments in the portfolio

k

A positive integer value for the number of non zero positions

segments

A vector or list of vectors that defines the portfolio segments

x.t.long

A positive real value for the sum of the long exposures

x.t.short

A positive real value for the sum of the absolute value of the short exposures

max.iter

A positive integer value for the maximum iterations in the acceptance rejection method

eps

A small positive real value for the convergence criteria for the gross notional exposure

Details

The function uses the same portfolio generation method described in random.longshort. The arguments x.t, x.t.long and x.t.short are proportions of total invested capital.

Value

A list with two named components.

x

An n \times 1 numerical vector of investment weights

iter

An integer value for the number of iterations used to obtain the investment weights

Author(s)

Frederick Novomestky fn334@nyu.eu

References

Jacobs, B. I. and K. N. Levy, 1997. The Long and Short of Long-Short Investing, Journal of Investing, Spring 1997, 73-86.

Jacobs, B. I., K. N. Levy and H. M. Markowitz, 2005. Portfolio Optimization with Factors, Scenarios and Realist SHort Positions, Operations Research, July/August 2005, 586-599.

See Also

random.longonly, random.longshort, random.shortonly

Examples

1
2
3
4
5
6
7
8
###
### long short portfolio of 30 investments with 30 non-zero positions
###
x.result <- random.longshort.test( 30 )
###
### long short portfolio of 30 investments with 10 non-zero positions
###
x.result <- random.longshort.test( 30, 10 )

rportfolios documentation built on May 2, 2019, 3:40 p.m.