update.randportBurSt {PortfolioProbe}R Documentation

Re-execute a random portfolio or optimization object

Description

Re-executes a call to random.portfolio or trade.optimizer, possibly with some arguments changed.

Usage

update.portfolBurSt(object, ..., evaluate = TRUE, checkinput = TRUE, 
	envir = parent.frame(), random.portfolio = FALSE)
update.randportBurSt(object, ..., evaluate = TRUE, checkinput = TRUE, 
	envir = parent.frame(), trade.optimizer = FALSE)

Arguments

object

object produced by trade.optimizer or random.portfolio (or random.portfolio.utility).

...

arguments to random.portfolio that should be added or changed from those in the initial call.

evaluate

logical value. If TRUE (the default), then the command is executed. If FALSE, then the (revised) call is returned.

This argument needs to be given by its full name since it comes after the three-dots in the argument list.

checkinput

logical value. If TRUE (the default), then a check is made to see if the prices, variance, expected return and the existing portfolio are the same in the new call as the original call. Except that any of these are excluded from the test if they are arguments in the call to update.

This argument needs to be given by its full name since it comes after the three-dots in the argument list.

envir

the environment in which the evaluation is to take place.

This argument needs to be given by its full name since it comes after the three-dots in the argument list.

random.portfolio

logical value. If TRUE, then the call is changed so that random.portfolio rather than trade.optimizer is the function called.

If the control argument is specifically in the call, then you will need to change control.

This argument needs to be given by its full name since it comes after the three-dots in the argument list.

trade.optimizer

logical value. If TRUE, then the call is changed so that trade.optimizer rather than random.portfolio is the function called.

If the control argument is specifically in the call, then you will need to change control.

This argument needs to be given by its full name since it comes after the three-dots in the argument list.

Value

If evaluate is TRUE, then the possibly revised call is executed, producing a random portfolio object (of class "randportBurSt") – or an optimized portfolio object.

Details

Arguments that are changed need to use the exact same abbreviation (if any) as the original call. For instance, if in the original call net.value is abbreviated to net.val, then you need to use net.val if you want to change the net value allowed.

Revision

This help was last revised 2013 April 11.

See Also

random.portfolio, trade.optimizer, pprobe.checkinput.

Examples

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

randport2 <- update(randport1) # same again
randport3 <- update(randport1, gross.value=1.5e6)

opt1 <- trade.optimizer(prices, variance=varian, 
	long.only=TRUE, bench.constr=c(spx=.04^2/252), 
	lin.constraints=cntrysect.conmat,
	lin.bounds=cntrysect.bounds, gross.value=1e6)

opt2 <- update(opt1, gross.value=1.5e6) 

randport4 <- update(opt1, number.rand=100, random.portfolio=TRUE)

[Package PortfolioProbe version 1.06 Index]