| pp.priceScenarios {pprobeSup} | R Documentation |
Takes a scenario (matrix) and a price vector; returns the scenario with the initial prices set to the price vector.
pp.priceScenarios(scenarios, prices)
scenarios |
a matrix or three-dimensional array representing scenarios of prices through time. Times are in the rows, assets in the columns. If there is a third dimension, then that holds different scenarios. |
prices |
a vector of prices for the same assets (in the same order). |
a modified version of the input scenarios such that all the
starting prices are equal to the input prices.
In test suite, mildly tested.
This help file was last revised 2013 May 02.
pp.historyScenarios,
scenario.optimizer.
origScen <- pp.normalScenarios(prices=c(A=34.57, B=92.12),
expected.return=c(A=0, B=0), variance=diag(2) * .01,
ntimes=4, nscenarios=5)
# same returns, new starting prices
newPriceScen <- pp.priceScenarios(origScen,
prices=c(A=35.71, B=91.92))