Open jaymon0703 opened 4 years ago
I think the fix might be better done in addTxns
than in perTradeStats
.
make.index.unique
in xts
was created in part for this exact problem, to ensure strict time ordering of transactions even when timestamp frequency isn't high enough to keep things separated.
It is possible there is a round turn trade with buy and sell transactions occurring on the same whole second timestamp. Not sure about microseconds...should be rare if possible.
This feature request is about handling the error by giving the user an appropriate message if the condition is triggered.