Two small additional things. ?First, look at the demo directory in blotter
for code examples. ?I do, however, agree with Brian's assertion that
blotter is best used indirectly through a framework like quantstrat. ?You
will, however, want to analyze the results using blotter's data and
objects, and tracking through those demos might help you understand how to
do that better.
We've spent a fair amount of time improving blotter's documentation with
the aim of moving it and a companion package, FinancialInstrument, to CRAN
relatively soon. ?That said, this is an area where contributions would be
much appreciated. ?If you've got an example, a demo, notes that you've
kept for your own use, etc. that you think would be additive, we'd like to
know. ?Tests are deeply appreciated. ?Please feel free to contact either
Brian or I with ideas.
pcc
--
Peter Carl
http://www.braverock.com/~peter
On Sun, 2011-05-01 at 19:10 -0700, algotr8der wrote:
I have been searching for documentation for the blotter package and I am
confused as to what is the official documentation. I have version 193 of
blotter installed and there are no user guides or package vignettes
associated with the install.
I too am looking for ways to extract trade statistics.
So - my questions are:
1) Can someone please point me to the official documentation for blotter
2) Are functions such as table.TradeStats.R and the likes implemented in
new
versions of blotter.
Thank you very kindly.
Daniel's response is close to the mark.
Obviously, the documentation for any R package is included with the
installation of the package, and is available from within R with help(),
'?', '??' and help.search().
R-Forge, however, does not generate PDF versions of the manual for you.
You would need to do that yourself using 'R CMD check' or similar. As
I've said before on this list, this may be done easily on *nix and Mac
systems, and with Duncan's Rtools for Windows.
http://www.murdoch-sutherland.com/Rtools/
Anyone who wants to use development packages in Windows should be able
to build those packages from source.
SVN r193 of blotter is *very* old (2010-01-21). ?The current SVN commit
is r596. ?Since r512(2010-12-30), blotter has have the 'tradeStats' and
related functions which I believe answer algotr8der's question number 2.
(more recent versions of blotter include better versions of these
functions). ?Since r516(2010-10-10) , blotter has had function
PortfReturns(), which provides per-instrument return contribution on
account equity. ?PortfReturns may be used to extract return-based
numbers for use with analysis ala PerformanceAnalytics.
As Daniel said in his reply to this thread, blotter only (and will only)
deal with P&L for a set of transactions. It knows nothing of 'strategy'.
For defining 'strategy' rules, I will refer you to the 'quantstrat'
package, also on R-Forge in the TradeAnalytics project. ?quantstrat uses
blotter transparently for P&L. ?I rarely call blotter by hand, except to
use chart.Posn(). ?I let quantstrat manage the rest of the mechanics.
As an aside: The entire TradeAnalytics set of packages (specifically
quantstrat and blotter) are listed as alpha code because they are still
under heavy development, interfaces and functions may change. ?That
said, they are robust to their intended purpose, and are used on real,
large, production strategies with very high correlations between
theoretical and actual trading results.
Regards,
? ?- Brian
--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock