[R-sig-finance] [R] [R-pkgs] New package 'portfolio'

Jeff Enos jeff at kanecap.com
Thu Mar 9 19:01:19 CET 2006


Roger,

roger bos writes:
 > Jeff/Dave,
 > 
 > The seven page summary doc looks nice and I would be interested in helping
 > out.  I use R for my alpha models and would like to start using the porfolio
 > class to test portfolio construction strategies.  You have a nice start.  I
 > would be happy to help by maybe adding a measure of turnover, maybe we could
 > have some sort of transaction cost measure that could be taken into account
 > when calculating returns.

Thanks for your interest.  I recommend taking a look at the
documentation, examples (especially in the help for
'portfolioBasic-class' and 'portfolioHistory-class'), and the code
itself; the two package vignettes you'll find include the intro doc
you've already mentioned.  Then we could discuss ways in which
measures of turnover and transaction costs could be incorporated into
the package.

 > But first I need to learn a lot more about the
 > library.  I can't even find the help page.  ?portfolio turns up nothing.

There is no help alias for 'portfolio', but calling

help(package = "portfolio")

should list the 15 help files available.

 > help.search("portfolioHistory") turns up the following, but I can't find
 > help using any of those names either:
 > 
 > Help files with alias or concept or title matching 'portfolioHistory'
 > using fuzzy matching:
 > 
 >  global.2004.history(portfolio)
 >                         portfolioHistory object formed from the
 >                         global.2004 dataset
 > portfolioHistory-class(portfolio)
 >                         Class "portfolioHistory"
 > 
 >  Type 'help(FOO, package = PKG)' to inspect entry 'FOO(PKG) TITLE'.
 > 
 > ?portfolioHistory-class
 > 
 > ?"portfolio"
 > 
 > help(portfolioHistory, package=portfolio)
 > None of the above attemps work for me.  Any hints you can give me.

Have you loaded the package?  Calls to 'help' with only a package
argument and calls to 'help.search' as above will return information
even if you haven't.  I have not included S4 class name aliases in the
package, so

?portfolioHistory

will not succeed while

?portfolioHistory-class
class?portfolioHistory

should.

Hope that helps,

Jeff



More information about the R-sig-finance mailing list