| deport.portfolBurSt {PortfolioProbe} | R Documentation |
Creates either a csv (comma separated) file or a txt (tab separated) file that contains the optimized portfolio, the trade, the existing portfolio, or all three.
deport.portfolBurSt(x, filename = deparse(substitute(x)), what = "all", multiplier = 1, to = "csv", blank = "")
x |
required.
An object of class |
filename |
a character string giving the name of the file to be created,
or the empty string ( |
what |
a character string partially matching one of the following:
|
multiplier |
either a single number, or a named vector where the names match the assets that are involved. This is used, for example, when the optimization was performed in terms of lots, but the file is desired to be in shares. Another use is to produce monetary values in the file. |
to |
a character string partially matching one of:
|
blank |
a character string giving the value to be placed in locations
that do not occur (in the case when |
a character string giving the name of the file created; or
NULL if filename is the empty string.
the file of the specified name is created or overwritten.
Except when filename is the empty string, then the
values are printed.
The "optimal" and "new.portfolio" choices for the
what argument are the same thing.
This help was last revised 2012 April 17.
trade.optimizer, write.table.
optim1 <- trade.optimizer(eq.prices, varian, long.only=TRUE, gross.value=1e6, ntrade=60, existing=cur.port) # create file named optim1.csv deport(optim1) # print to screen instead deport(optim1, filename="") # optimization in lots (of 100), file in shares deport(optim1, multiplier=100) # write monetary values in the file deport(optim1, multiplier=current.prices) deport(optim1, what="opt", to="txt") deport(optim1, file="opt1zero", what="all", blank="0")