[R-SIG-Finance] Strategy performance summary report

Brian G. Peterson brian at braverock.com
Mon May 2 13:25:04 CEST 2011


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



More information about the R-SIG-Finance mailing list