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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 19 22:26:51 CET 2010


Author: braverock
Date: 2010-01-19 22:26:51 +0100 (Tue, 19 Jan 2010)
New Revision: 187

Added:
   pkg/blotter/.project
Modified:
   pkg/blotter/DESCRIPTION
   pkg/blotter/NAMESPACE
   pkg/blotter/R/addTxn.R
   pkg/blotter/R/calcAcctAttr.R
   pkg/blotter/R/calcEndEq.R
   pkg/blotter/R/calcPortfAttr.R
   pkg/blotter/R/calcPortfSummary.R
   pkg/blotter/R/calcPortfWgt.R
   pkg/blotter/R/calcPosAvgCost.R
   pkg/blotter/R/calcPosValue.R
   pkg/blotter/R/calcRealizedPL.R
   pkg/blotter/R/calcTradingPL.R
   pkg/blotter/R/calcTxnAvgCost.R
   pkg/blotter/R/calcTxnValue.R
   pkg/blotter/R/calcUnrealizedPL.R
   pkg/blotter/R/chart.Posn.R
   pkg/blotter/R/getByPortf.R
   pkg/blotter/R/getBySymbol.R
   pkg/blotter/R/getEndEq.R
   pkg/blotter/R/getPos.R
   pkg/blotter/R/getPosAvgCost.R
   pkg/blotter/R/getPosQty.R
   pkg/blotter/R/getRealizedPL.R
   pkg/blotter/R/getTxn.R
   pkg/blotter/R/getTxnFees.R
   pkg/blotter/R/getTxnValue.R
   pkg/blotter/R/initAcct.R
   pkg/blotter/R/initPortf.R
   pkg/blotter/R/initPosPL.R
   pkg/blotter/R/initTxn.R
   pkg/blotter/R/updateAcct.R
   pkg/blotter/R/updateEndEq.R
   pkg/blotter/R/updatePortf.R
   pkg/blotter/R/updatePosPL.R
   pkg/blotter/demo/amzn_test.R
   pkg/blotter/demo/longtrend.R
   pkg/blotter/demo/turtles.R
   pkg/blotter/man/IBM.Rd
   pkg/blotter/man/addTxn.Rd
   pkg/blotter/man/amzn.Rd
   pkg/blotter/man/blotter-package.Rd
   pkg/blotter/man/calcAcctAttr.Rd
   pkg/blotter/man/calcPortfAttr.Rd
   pkg/blotter/man/calcPortfWgt.Rd
   pkg/blotter/man/calcPosAvgCost.Rd
   pkg/blotter/man/calcRealizedPL.Rd
   pkg/blotter/man/calcTxnAvgCost.Rd
   pkg/blotter/man/calcTxnValue.Rd
   pkg/blotter/man/getByPortf.Rd
   pkg/blotter/man/getBySymbol.Rd
   pkg/blotter/man/getEndEq.Rd
   pkg/blotter/man/getTxn.Rd
   pkg/blotter/man/initAcct.Rd
   pkg/blotter/man/initPortf.Rd
   pkg/blotter/man/updateAcct.Rd
   pkg/blotter/man/updatePosPL.Rd
Log:
- add lookups to functions missing them
- update auto keywords

Added: pkg/blotter/.project
===================================================================
--- pkg/blotter/.project	                        (rev 0)
+++ pkg/blotter/.project	2010-01-19 21:26:51 UTC (rev 187)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>blotter</name>
+	<comment></comment>
+	<projects>
+		<project>FinancialInstrument</project>
+		<project>PerformanceAnalytics</project>
+		<project>PortfolioAnalytics</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>de.walware.statet.r.builders.RSupport</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>de.walware.statet.base.StatetNature</nature>
+		<nature>de.walware.statet.r.RNature</nature>
+	</natures>
+</projectDescription>


Property changes on: pkg/blotter/DESCRIPTION
___________________________________________________________________
Name: svn:keywords
   - Date
   + Id Revision Date Author


Property changes on: pkg/blotter/NAMESPACE
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/R/addTxn.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcAcctAttr.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcEndEq.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcPortfAttr.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcPortfSummary.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcPortfWgt.R
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcPosAvgCost.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcPosValue.R
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcRealizedPL.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcTradingPL.R
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcTxnAvgCost.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcTxnValue.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/calcUnrealizedPL.R
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author

Modified: pkg/blotter/R/chart.Posn.R
===================================================================
--- pkg/blotter/R/chart.Posn.R	2010-01-19 21:26:31 UTC (rev 186)
+++ pkg/blotter/R/chart.Posn.R	2010-01-19 21:26:51 UTC (rev 187)
@@ -60,7 +60,7 @@
     chartSeries(Prices, TA=NULL,...)
     plot(addTA(Buys,pch=2,type='p',col='green', on=1));
     plot(addTA(Sells,pch=6,type='p',col='red', on=1));
-    plot(addTA(Position,type='h',col='blue', lwd=2));
+    plot(addTA(Position,type='b',col='blue', lwd=2));
     if(!is.null(CumPL))  plot(addTA(CumPL, col='darkgreen', lwd=2))
 }
 
@@ -72,6 +72,6 @@
 # This library is distributed under the terms of the GNU Public License (GPL)
 # for full details see the file COPYING
 #
-# $Id: $
+# $Id$
 #
 ###############################################################################
\ No newline at end of file


Property changes on: pkg/blotter/R/chart.Posn.R
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author

Modified: pkg/blotter/R/getByPortf.R
===================================================================
--- pkg/blotter/R/getByPortf.R	2010-01-19 21:26:31 UTC (rev 186)
+++ pkg/blotter/R/getByPortf.R	2010-01-19 21:26:51 UTC (rev 187)
@@ -1,7 +1,11 @@
 `getByPortf` <-
 function(Account, Attribute, Date=NULL)
 { # @author Peter Carl
-
+    aname<-Account
+    Account<-try(get(paste("account",aname,sep='.'), envir=.blotter))
+    if(inherits(Account,"try-error"))
+        stop(paste("Account",aname," not found, use initAcct() to create a new account"))
+    
     # DESCRIPTION:
     # Retrieves calculated attributes for each portfolio in the account
     # from the portfolio summary table.  Assembles into a portfolio-by-time table 


Property changes on: pkg/blotter/R/getByPortf.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author

Modified: pkg/blotter/R/getBySymbol.R
===================================================================
--- pkg/blotter/R/getBySymbol.R	2010-01-19 21:26:31 UTC (rev 186)
+++ pkg/blotter/R/getBySymbol.R	2010-01-19 21:26:51 UTC (rev 187)
@@ -1,7 +1,11 @@
 `getBySymbol` <-
 function(Portfolio, Attribute, Date=NULL, Symbols = NULL)
 { # @author Peter Carl
-
+    pname<-Portfolio
+    Portfolio<-get(paste("portfolio",pname,sep='.'),envir=.blotter)
+    if(inherits(Portfolio,"try-error"))
+        stop(paste("Portfolio",name," not found, use initPortf() to create a new account"))
+    
     # DESCRIPTION:
     # Retrieves calculated attributes for each position in the portfolio
     # from the posPL table.  Assembles into a symbol-by-time table useful


Property changes on: pkg/blotter/R/getBySymbol.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/getEndEq.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/getPos.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/getPosAvgCost.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/getPosQty.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/getRealizedPL.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/getTxn.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/getTxnFees.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/getTxnValue.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/initAcct.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/initPortf.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/initPosPL.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/initTxn.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/updateAcct.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/updateEndEq.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/updatePortf.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/R/updatePosPL.R
___________________________________________________________________
Name: svn:keywords
   - Id
   + Id Revision Date Author


Property changes on: pkg/blotter/demo/amzn_test.R
___________________________________________________________________
Name: svn:keywords
   - Revision Id
   + Id Revision Date Author

Modified: pkg/blotter/demo/longtrend.R
===================================================================
--- pkg/blotter/demo/longtrend.R	2010-01-19 21:26:31 UTC (rev 186)
+++ pkg/blotter/demo/longtrend.R	2010-01-19 21:26:51 UTC (rev 187)
@@ -119,6 +119,6 @@
 # This library is distributed under the terms of the GNU Public License (GPL)
 # for full details see the file COPYING
 #
-# $Id:  $
+# $Id$
 #
 ###############################################################################


Property changes on: pkg/blotter/demo/longtrend.R
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/demo/turtles.R
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/IBM.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/addTxn.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/amzn.Rd
___________________________________________________________________
Name: svn:keywords
   - Revision Id
   + Id Revision Date Author


Property changes on: pkg/blotter/man/blotter-package.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/calcAcctAttr.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/calcPortfAttr.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/calcPortfWgt.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/calcPosAvgCost.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/calcRealizedPL.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/calcTxnAvgCost.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/calcTxnValue.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/getByPortf.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/getBySymbol.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/getEndEq.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/getTxn.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/initAcct.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/initPortf.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/updateAcct.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author


Property changes on: pkg/blotter/man/updatePosPL.Rd
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date Author



More information about the Blotter-commits mailing list