[Blotter-commits] r1352 - in pkg: blotter blotter/R quantstrat/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jan 12 23:46:57 CET 2013
Author: opentrades
Date: 2013-01-12 23:46:57 +0100 (Sat, 12 Jan 2013)
New Revision: 1352
Added:
pkg/blotter/R/put.account.R
Modified:
pkg/blotter/DESCRIPTION
pkg/blotter/NAMESPACE
pkg/quantstrat/R/paramsets.R
Log:
- introduced put.account() for better data abstraction
Modified: pkg/blotter/DESCRIPTION
===================================================================
--- pkg/blotter/DESCRIPTION 2013-01-12 22:35:57 UTC (rev 1351)
+++ pkg/blotter/DESCRIPTION 2013-01-12 22:46:57 UTC (rev 1352)
@@ -63,3 +63,4 @@
'updateEndEq.R'
'updatePortf.R'
'updatePosPL.R'
+ 'put.account.R'
Modified: pkg/blotter/NAMESPACE
===================================================================
--- pkg/blotter/NAMESPACE 2013-01-12 22:35:57 UTC (rev 1351)
+++ pkg/blotter/NAMESPACE 2013-01-12 22:46:57 UTC (rev 1352)
@@ -23,6 +23,7 @@
export(is.portfolio)
export(pennyPerShare)
export(perTradeStats)
+export(put.account)
export(put.portfolio)
export(tradeQuantiles)
export(tradeStats)
Added: pkg/blotter/R/put.account.R
===================================================================
--- pkg/blotter/R/put.account.R (rev 0)
+++ pkg/blotter/R/put.account.R 2013-01-12 22:46:57 UTC (rev 1352)
@@ -0,0 +1,22 @@
+#' put a account object in .blotter env
+#' @param account.st string identifying account
+#' @param account account object
+#' @export
+
+put.account <- function(account.st, account)
+{
+ blotter.account.st <- paste('account', account.st, sep='.')
+ assign(blotter.account.st, account, envir=.blotter)
+}
+
+###############################################################################
+# Blotter: Tools for transaction-oriented trading systems development
+# for R (see http://r-project.org/)
+# Copyright (c) 2008-2011 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: getPortfolio.R 742 2011-08-25 21:12:43Z braverock $
+#
+###############################################################################
Modified: pkg/quantstrat/R/paramsets.R
===================================================================
--- pkg/quantstrat/R/paramsets.R 2013-01-12 22:35:57 UTC (rev 1351)
+++ pkg/quantstrat/R/paramsets.R 2013-01-12 22:46:57 UTC (rev 1352)
@@ -436,10 +436,8 @@
list2env(env.instrument, envir=FinancialInstrument:::.instrument)
put.portfolio(portfolio.st, portfolio)
+ put.account(account.st, account)
- blotter.account.st <- paste('account', account.st, sep='.')
- assign(blotter.account.st, account, envir=.blotter)
-
strategy.order_book.st <- paste('order_book', portfolio.st, sep='.')
assign(strategy.order_book.st, order_book, envir=.strategy)
More information about the Blotter-commits
mailing list