portfolioWeight: Define Portfolio Weights

Description Usage Arguments Details Value See Also

View source: R/portfolio.R

Description

This function is the creator of an S3 class that defines portfolio weights in terms of a proportion in dollar value or number of shares for a portfolio.

Usage

1
portfolioWeight(weight, unit = c("value", "share"))

Arguments

weight

a numerical vector that specifies the weights

unit

a character string specifying how the weights are defined. One of "value" (default), or "share". Also see "Details".

Details

portfolioWeight is able to produce portfolio weights defined using different approaches: the most basic type of weight is determined by dividing the dollar value of a security by the total dollar value of the portfolio (unit = "value"). Another approach would be to divide the number of units of a given security by the total number of shares held in the portfolio (unit = "share").

Value

An object of class pfWeight.

See Also

portfolio


zhangkd5/riskCalc documentation built on May 4, 2019, 10:16 p.m.