gotasty / tastypl

Track P/L, portfolio performance, net credit after rolls, for tastytraders
GNU General Public License v3.0
65 stars 21 forks source link

Doesn't handle `Administrative Transfer' log entries #2

Open aperepel opened 6 years ago

aperepel commented 6 years ago

Hi,

I have 2 accounts with TW and occasionally fat finger a roll by doing it in a wrong account. This is taken care of by the backend team later moving the trade from account A to account B. However, the transaction export CSV has the commission entry as a positive 1 and fails.

Stacktrace:

14304 tastypl.go:427] record #60, positive commission amount 1.00
goroutine 1 [running]:

Here is an example of such entry:

2018-03-20T11:22:22-0400 | Administrative Transfer | BUY_TO_CLOSE | FB      180420C00160000 | Equity Option | Administrative transfer to account XXXX | -912 | 1 | -912 | 1 | 0.17 | 100 | FB | 4/20/18 | 160 | CALL