| deport.randportBurSt {PortfolioProbe} | R Documentation |
Creates a file of the random portfolios represented by the object given it.
deport.randportBurSt(x, filename = deparse(substitute(x)), what = "horizontal.portfolio", multiplier = 1, names.assets = NULL, to = "csv", blank = "", append = FALSE, subset = NULL)
x |
required.
Object of class |
filename |
a character string giving the name of the resulting file,
or the empty string ( |
what |
a character string describing the layout of the file.
This must partially match either |
multiplier |
either a single number, or a numeric vector with names.
If a vector, the names should be the names of any assets that may
appear in |
names.assets |
a character vector providing the names of all assets to be represented in the file. The default is to use the union of the assets that are in the random portfolios. |
to |
a character string partially matching one of:
|
blank |
a character string giving the value to be placed in locations
that do not occur.
The default is no character at all – the
other logical choice for this is |
append |
logical flag.
If |
subset |
if given, a vector that subscripts the random solutions. |
a character string of the name of the file created;
or NULL if filename is the empty string.
the file is created, overwritten or appended.
Except when filename is the empty string, then the
values are printed.
This help was last revised 2012 April 17.
randport1 <- random.portfolio(1000, prices, varian, long.only=TRUE, gross.value = 1e6, bench.constraint=c(spx=.04^2/252), lin.constraints=cntrysect.conmat, lin.bounds=cntrysect.bounds) # create file randport1.csv deport(randport1) # print to screen instead deport(randport1, filename="") # generation in lots, file in shares deport(randport1, mult=100) # write monetary values in file deport(randport1, mult=prices) # tab-separated file of vertically oriented portfolios # all asset names from prices used deport(randport1, to="txt", what="vert", names=names(prices))