valuation.randportBurSt {PortfolioProbe} | R Documentation

## Monetary Value of Random Portfolios

### Description

Returns the value or weights of the positions or portfolios.

### Usage

    valuation.randportBurSt(x, prices, weight = FALSE, collapse = FALSE,
            type = "gross", cash = NULL)

### Arguments

`x` | required. An object of class `"randportBurSt"` (generally the result of a call to `random.portfolio`).
`prices` | required. A named vector or a matrix of asset prices that includes at least the assets in the object being evaluated. if a matrix, then the column names need to be names of the assets; rows will presumably represent dates and may or may not be named.
`weight` | logical value; if `TRUE`, then the result will contain weights rather than monetary value.
`collapse` | logical value; if `TRUE`, then the result will be a vector or matrix containing results for the portfolios rather than individual assets.
`type` | a character string that (partially) matches one of: `"gross"`, `"net"`, `"long"`, `"short"`, `"nav"`. This is only used when `collapse` is `TRUE`. When this has value `"nav"`, then the result is the net value plus cash. When this has value `"short"`, the result is non-negative numbers.
`cash` | this is only used when `type="nav"`. A single number, a numeric vector with as many elements as there are rows in `prices`, or `NULL`. If this is `NULL`, then the amount of cash is the gross value at the first time point for each portfolio.

### Value

a list, vector or matrix containing valuation information. If `collapse` is `FALSE`, then the result is a list of the same length as the input `x` where each component holds the asset valuations or weights.
If `collapse` is `TRUE`, then the result is a vector if prices is a vector, and a matrix if prices is a matrix. The numbers are the valuation (or weights) for the portfolio (at each point in time if `prices` is a matrix).
The (extra) attributes are:

`timestamp` | character string giving the date and time of the evaluation.
`call` | the call that created the object.

### Details

This is a method for the generic function `valuation` for class `randportBurSt`.

If the portfolios are long-short and the valuations are going to be used to calculate returns, then you should set `type="nav"` and set `cash` properly for the situation that you have.

### Revision

This help was last revised 2010 January 02.

### See Also

`random.portfolio`, `deport.randportBurSt`, `valuation.portfolBurSt`.

### Examples

    randport1 <- random.portfolio(100, prices, varian, long.only=TRUE,
            bench.constr=c(spx=.04^2/252), lin.constraints=cntrysect.conmat,
            lin.bounds=cntrysect.bounds, gross.value=1e6)

    randval1 <- valuation(randport1, prices)
    randval1n <- valuation(randport1, new.prices)

[Package PortfolioProbe version 1.00 Index]