[Blotter-commits] r1017 - in pkg/blotter: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat May 5 03:33:08 CEST 2012


Author: gsee
Date: 2012-05-05 03:33:07 +0200 (Sat, 05 May 2012)
New Revision: 1017

Added:
   pkg/blotter/man/is.portfolio.Rd
Removed:
   pkg/blotter/man/calcPortfWgt.Rd
Modified:
   pkg/blotter/DESCRIPTION
   pkg/blotter/R/calcPortfWgt.R
   pkg/blotter/man/amzn.Rd
Log:
 Patches to pass R CMD check without warnings or notes
 - comment body of calcPortfWgt because it uses a non-existant function (.calcPortfAttr) 
 - Suggests: quantmod
 - add is.portfolio.Rd



Modified: pkg/blotter/DESCRIPTION
===================================================================
--- pkg/blotter/DESCRIPTION	2012-05-05 00:07:01 UTC (rev 1016)
+++ pkg/blotter/DESCRIPTION	2012-05-05 01:33:07 UTC (rev 1017)
@@ -2,7 +2,7 @@
 Type: Package
 Title: Tools for transaction-oriented trading systems
     development.
-Version: 0.8.7
+Version: 0.8.8
 Date: $Date$
 Author: Peter Carl, Brian G. Peterson
 Maintainer: Brian G. Peterson <brian at braverock.com>
@@ -21,7 +21,8 @@
 Suggests:
     PerformanceAnalytics,
     Hmisc,
-    RUnit
+    RUnit,
+    quantmod
 Contributors: Lance Levenson, Ben McCann, Joshua Ulrich,
     Wolfgang Wu, Garrett See
 URL: https://r-forge.r-project.org/projects/blotter/

Modified: pkg/blotter/R/calcPortfWgt.R
===================================================================
--- pkg/blotter/R/calcPortfWgt.R	2012-05-05 00:07:01 UTC (rev 1016)
+++ pkg/blotter/R/calcPortfWgt.R	2012-05-05 01:33:07 UTC (rev 1017)
@@ -15,11 +15,11 @@
 
     # FUNCTION
 
-    pos.value = .getBySymbol(Portfolio = Portfolio, Dates = Dates, Attribute = "Pos.Value", Symbols = Symbols)
-    portf.value = .calcPortfAttr(Portfolio = Portfolio, Date = Dates, Attribute = denominator[1])
-    weights = apply(pos.value, MARGIN = 2, FUN = function(x,y){return(x/y)}, y=portf.value) 
+#    pos.value = .getBySymbol(Portfolio = Portfolio, Dates = Dates, Attribute = "Pos.Value", Symbols = Symbols)    
+#    portf.value = .calcPortfAttr(Portfolio = Portfolio, Date = Dates, Attribute = denominator[1])
+#    weights = apply(pos.value, MARGIN = 2, FUN = function(x,y){return(x/y)}, y=portf.value) 
 
-    return(weights)
+#    return(weights)
 }
 
 ###############################################################################

Modified: pkg/blotter/man/amzn.Rd
===================================================================
--- pkg/blotter/man/amzn.Rd	2012-05-05 00:07:01 UTC (rev 1016)
+++ pkg/blotter/man/amzn.Rd	2012-05-05 01:33:07 UTC (rev 1017)
@@ -1,6 +1,7 @@
 \name{amzn}
 \docType{data}
 \alias{amzn}
+\alias{amzn.trades}
 \title{Hypothetical Intra-Day AMZN Trades}
 \description{
 Two xts objects containing 1-min OHLCV data for one hour of AMZN market activity, 
@@ -8,4 +9,4 @@
 }
 \usage{managers}
 \keyword{datasets}
-\keyword{ ts } 
\ No newline at end of file
+\keyword{ ts } 

Deleted: pkg/blotter/man/calcPortfWgt.Rd
===================================================================
--- pkg/blotter/man/calcPortfWgt.Rd	2012-05-05 00:07:01 UTC (rev 1016)
+++ pkg/blotter/man/calcPortfWgt.Rd	2012-05-05 01:33:07 UTC (rev 1017)
@@ -1,33 +0,0 @@
-\name{calcPortfWgt}
-\alias{calcPortfWgt}
-\title{Calculates the portfolio weights for positions within a given portfolio.}
-\usage{
-  calcPortfWgt(Portfolio, Symbols = NULL, Dates = NULL,
-    denominator = c("Gross.Value", "Net.Value", "Long.Value", "Short.Value"),
-    Account = NULL)
-}
-\arguments{
-  \item{Portfolio}{a portfolio object structured with
-  initPortf()}
-
-  \item{Symbols}{an instrument identifier for a symbol
-  included in the portfolio}
-
-  \item{Dates}{dates to return the calculation over
-  formatted as xts range}
-
-  \item{denominator}{string describing the deniminator, see
-  usage}
-
-  \item{Account}{an Account object containing Portfolio
-  summaries}
-}
-\value{
-  xts timeseries object with weights by date in rows and
-  symbolname in columns
-}
-\description{
-  Portfolio weights may be calculated differently depending
-  on their use.
-}
-

Added: pkg/blotter/man/is.portfolio.Rd
===================================================================
--- pkg/blotter/man/is.portfolio.Rd	                        (rev 0)
+++ pkg/blotter/man/is.portfolio.Rd	2012-05-05 01:33:07 UTC (rev 1017)
@@ -0,0 +1,20 @@
+\name{is.portfolio}
+\alias{is.portfolio}
+\title{generic is.function for portfolio, will take either a string or an object}
+\usage{
+  is.portfolio(x, ...)
+}
+\arguments{
+  \item{x}{an object or string to be tested as a portfolio}
+
+  \item{\dots}{any other passthru parameters}
+}
+\description{
+  If \code{x} is a string, \code{\link{getPortfolio}} will
+  be called with string \code{x} and tested.  Otherwise,
+  the object passed will be tested.
+}
+\seealso{
+  \code{\link{getPortfolio}}
+}
+



More information about the Blotter-commits mailing list