pp.priceScenarios {pprobeSup}R Documentation

Set the initial prices for a scenario

Description

Takes a scenario (matrix) and a price vector; returns the scenario with the initial prices set to the price vector.

Usage

pp.priceScenarios(scenarios, prices)

Arguments

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).

Value

a modified version of the input scenarios such that all the starting prices are equal to the input prices.

Testing status

In test suite, mildly tested.

Revision

This help file was last revised 2013 May 02.

See Also

pp.historyScenarios, scenario.optimizer.

Examples


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))

[Package pprobeSup version 1.00 Index]