Skip to content

Possible tradeStats() issue

1 message · Michael Newell

#
Jan/Brian thank you very much for your suggestion of adding this to
the exit of the trade rather than the open.  I am new to using the
package so am still finding my way around, as you note this does look
to solve my immediate issue.

Brian I agree with your comment on transactions and the way
tradeStats() calculates transactions seems to work fine (NumberOfTxns
<- nrow(txn) - 1), it was just the calculation of 'NumberOfTrades'
which I had issue with.  I've had a quick look at perTradeStats which
would also appear to give me a lot of what I need so thank you for the
suggestion.

Myself and a colleague only came across the Quanstrat package a couple
of weeks ago having previously developed a custom parallel testing
framework for a specific strategy using Quantmod as a base.  I am only
sorry we did not come across Quantstrat earlier!  As we get to grips
with this fabulous package I hope that we can contribute patches and
such where appropriate.

--
Regards,

Michael Newell