[Blotter-commits] r90 - pkg/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jul 15 04:55:58 CEST 2009
Author: peter_carl
Date: 2009-07-15 04:55:58 +0200 (Wed, 15 Jul 2009)
New Revision: 90
Modified:
pkg/man/blotter-package.Rd
Log:
- fixed the example to use negative fees
Modified: pkg/man/blotter-package.Rd
===================================================================
--- pkg/man/blotter-package.Rd 2009-07-15 02:55:09 UTC (rev 89)
+++ pkg/man/blotter-package.Rd 2009-07-15 02:55:58 UTC (rev 90)
@@ -59,18 +59,18 @@
## Trades must be made in date order.
print('Adding trades to \"p\"...')
# Make a couple of trades in IBM
-p = addTxn(p, "IBM", '2007-01-03', 50, 96.5, 0.05*50)
-p = addTxn(p, "IBM", '2007-01-04', 50, 97.1, 0.05*50)
+p = addTxn(p, "IBM", '2007-01-03', 50, 96.5, -0.05*50)
+p = addTxn(p, "IBM", '2007-01-04', 50, 97.1, -0.05*50)
# ...a few in F...
-p = addTxn(p, "F", '2007-01-03', -100, 7.60, 0.05*100)
-p = addTxn(p, "F", '2007-01-04', 50, 7.70, 0.05*50)
-p = addTxn(p, "F", '2007-01-10', 50, 7.78, 0.05*50)
+p = addTxn(p, "F", '2007-01-03', -100, 7.60, -0.05*100)
+p = addTxn(p, "F", '2007-01-04', 50, 7.70, -0.05*50)
+p = addTxn(p, "F", '2007-01-10', 50, 7.78, -0.05*50)
# ...and some in MMM
-p = addTxn(p, "MMM", '2007-01-05', -50, 77.9, 0.05*50)
-p = addTxn(p, "MMM", '2007-01-08', 50, 77.6, 0.05*50)
-p = addTxn(p, "MMM", '2007-01-09', 50, 77.6, 0.05*50)
+p = addTxn(p, "MMM", '2007-01-05', -50, 77.9, -0.05*50)
+p = addTxn(p, "MMM", '2007-01-08', 50, 77.6, -0.05*50)
+p = addTxn(p, "MMM", '2007-01-09', 50, 77.6, -0.05*50)
print('Updating portfolio \"p\"...')
p = updatePortf(p,'2007-01')
More information about the Blotter-commits
mailing list