[R-SIG-Finance] Strategy performance summary report

Daniel Cegiełka daniel.cegielka at gmail.com
Mon May 2 22:16:54 CEST 2011


Peter,

Of course you right - someone can test strategies using the blotter.
When I first used the blotter, I was convinced that this is how it
should work (for backtesting). Next I thought, if I use the blotter
backtest, it can also be used for real trading. I noticed that blotter
is too slow and I started to look for ways to make it faster with a C.
But I was wrong completely and I presume that this mistake is
committing a lot of people who begin to use the blotter.

You and Brian have a great experience in finance. In my opinion
blotter is written by professionals for professionals. Beginners often
commits the same mistake that I committed - that is, believes that eg
blotter is a whole platform. But the truth is that this is only a
small part which is designed specifically for PnL (blotter). To
analyze the strategy can be used with some packages from
ReturnAnalytics - all specialized in selected uses.

This is one of the main differences between beginners and professionals.

These are my thoughts and I hope that they will be useful for all
begins to work with R and eg blotter. I also want to thank you, Brian,
Jeff and others that you share with others your experience.


btw. "Strategy summary performance report" is an interesting idea to
develop a package (?? TradeReport...) of useful templates for
generating reports (pdf) using Sweave, blotter and others R's finance
tools.

Best regards,
daniel



2011/5/2 Peter Carl <peter at braverock.com>:
> 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
>>
>> _______________________________________________
>> R-SIG-Finance at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions
>> should go.
>>
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



More information about the R-SIG-Finance mailing list