| valuation.portfolBurSt {PortfolioProbe} | R Documentation |
Returns various concepts of value.
valuation.portfolBurSt(x, prices = x$prices, trade = FALSE,
weight = TRUE, collapse = is.matrix(prices), type = "gross",
cash = NULL)
valuation.default(x, prices, weight = TRUE, collapse = is.matrix(prices),
type = "gross", cash = NULL)
x |
required.
An object of class "portfolBurSt" created
by trade.optimizer (for the
"portfolBurSt" method).
Or a named vector (for the default method).
|
prices |
a named vector of asset prices that includes at least the assets
in the object being evaluated, or a matrix with column names for the
assets.
This is a required argument for the default method. |
trade |
logical value.
If TRUE, then the results are for the trade.
If FALSE, then the results are for the optimal portfolio.
|
weight |
logical value; if TRUE, then the result includes a component
named weight which contains the weights of the assets
(that is, position values scaled by the gross value).
|
collapse |
logical value; if TRUE, then the result will be a vector
containing a valuation for each row of prices.
This must be TRUE if prices is a matrix.
|
type |
this is only used when collapse is TRUE.
A character string that (partially) matches one of: "gross", "net", "long", "short",
"nav".
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" and collapse is
TRUE.
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.
|
if collapse is TRUE, then a vector containing valuations of
type given by the type argument.
This has attributes timestamp and call like the
descriptions given below.
Otherwise, a list with the following components:
individual |
the amount of money in individual assets. |
total |
length 4 vector containing the gross value, the net value, the long value and the short value. |
weight |
only present if the weight argument was TRUE.
A numeric vector containing the weights of the assets.
|
timestamp |
character string giving the time and date of the evaluation. |
call |
the call that created the object. |
These are methods for the generic function valuation.
If prices is a matrix, then collapse must be TRUE.
This help was last revised 2010 September 24.
trade.optimizer, summary.portfolBurSt,
valuation.randportBurSt.
op1 <- trade.optimizer(eq.prices, varian, long.only=TRUE,
gross.value=1e6)
valuation(op1)
valuation(op1, new.prices) # valuation with new prices
valuation(op1, rbind(eq.prices, new.prices)) # two gross values
valuation(op1, trade=TRUE) # valuation for the trade
valuation(op1$trade, eq.prices) # same thing