randPort: Makes a randPort object Generates random portfolios for the...

Description Usage Arguments Examples

Description

Makes a randPort object Generates random portfolios for the evaluation of portfolio management

Usage

1
2
3
  randPort(data, match.var = NULL, weight.var = NULL,
    ret.var = NULL, exposures = NULL, n, replace = TRUE,
    verbose = FALSE, ...)

Arguments

data

A dataframe containing data about the universe of stocks

match.var

Variables to match on

weight.var

Weights for the stocks

ret.var

The return variable

exposures

A numeric vector of exposures to the matched factors the the output portfolio should have, in the order they are given in match.var

replace

FALSE if names in the original portfolio should not be in the new one

n

Number of generated portfolios

verbose

Set to TRUE to give verbose output

...

arguments to be passed to kmatching MCMC algorithms

Examples

1
2
3
data(jan)
## this hangs, fix mirror
##rP = randPort(data = jan, match.var = "growth", weight.var = "portfolio", ret.var = "fwd.ret.1m", n = 1000 )

davidkane9/matchingportfolios documentation built on May 15, 2019, 1:14 a.m.