[R] Question on entry exit tabulating in any R finance package

rtist patwarner2424 at yahoo.com
Mon Mar 29 03:12:49 CEST 2010


I asked the question in Rmetrics subforum, but for some reason, almost two
weeks later, it keeps saying I haven't been approved to post yet there.

I'll try again here on the open forum.

I wanted to have a script that tabulates results by trade. I.e. instead of
tabulating each day as a trade event, you enter on one date, exit another,
and simply tabulate metrics based on one trade period.  For example, you
could have a moving average crossover system and the results would be
tabulated based on each trade (including entry/exit date attributes).

The package, Tradesys, is very close, but I can't seem to find any
documentation beyond:
http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/*checkout*/pkg/inst/doc/tradesys.pdf?rev=19&root=tradesys
And unfortunately, the definitions are a bit sparse and I had trouble
reverse engineering them.
For instance, in the table on page 3:
Phase ETime XTime Time Numb EPrice XPrice PnL RoR
107 EL 2006-09-21 2007-09-12 356 244 1324.89 1471.10 146.21 0.264117052

Pnl Makes sense (1471.10-1324.89 )= 146.21, but, I would expect ROR to be
~1471.1/1324.89-1 ~ 11.03%, yet RoR col shows 26.411% 

I also looked at blotter, which shows an example that is long only and seems
a bit cumbersome to run the simple metrics for trade entry/exit.  Any ideas
on packages that will do this, or why I'm misunderstanding the Tradesys
results?

thanks,
rtist
Pat W.
-- 
View this message in context: http://n4.nabble.com/Question-on-entry-exit-tabulating-in-any-R-finance-package-tp1694607p1694607.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list