[Blotter-commits] r27 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Dec 17 15:37:47 CET 2008


Author: peter_carl
Date: 2008-12-17 15:37:47 +0100 (Wed, 17 Dec 2008)
New Revision: 27

Removed:
   pkg/R/getTxnAvgCost.R
Log:
- removed, function doesn't sum through time


Deleted: pkg/R/getTxnAvgCost.R
===================================================================
--- pkg/R/getTxnAvgCost.R	2008-12-17 14:36:48 UTC (rev 26)
+++ pkg/R/getTxnAvgCost.R	2008-12-17 14:37:47 UTC (rev 27)
@@ -1,32 +0,0 @@
-`getTxnAvgCost` <-
-function(Portfolio, Symbol, Date)
-{ # @author Peter Carl
-
-    # DESCRIPTION:
-    # Gets the value of that period's transactions and returns the sum 
-
-    # Inputs
-    # Portfolio: a portfolio object containing transactions
-    # Symbol: an instrument identifier for a symbol included in the portfolio
-    # Date: timestamp as of which to have the most recent position
-
-    # Outputs
-    # Numeric value of the most recent position.
-
-    # FUNCTION
-    TxnData = Portfolio[[Symbol]]$txn
-    TxnValue = sum(TxnData[Date,'Txn.Avg.Cost'])
-    return(TxnValue)
-}
-
-###############################################################################
-# Blotter: Tools for transaction-oriented trading systems development
-# for R (see http://r-project.org/) 
-# Copyright (c) 2008 Peter Carl and Brian G. Peterson
-#
-# This library is distributed under the terms of the GNU Public License (GPL)
-# for full details see the file COPYING
-#
-# $Id:  $
-#
-###############################################################################



More information about the Blotter-commits mailing list