eprbell / rp2

Privacy-focused, free, open-source cryptocurrency tax calculator for multiple countries: it handles multiple coins/exchanges and computes long/short-term capital gains, cost bases, in/out lot relationships/fractioning, and account balances. It supports FIFO, LIFO, HIFO and it outputs in form 8949 format. It has a programmable plugin architecture
https://pypi.org/project/rp2/
Apache License 2.0
270 stars 43 forks source link

Margin trading #46

Closed jtourt closed 2 years ago

jtourt commented 2 years ago

Does RP2 handle margin trading? Leveraged trades. Shorting. Selling borrowed assets that are bought later to repay the loan.

eprbell commented 2 years ago

While I don't have direct experience with margin trading, my understanding is that such taxable events generate normal capital gains and losses (see this article for more on the topic: https://coinledger.io/blog/crypto-margin-trades-taxes). So margin-based transaction types would be supported by RP2 with its normal built-in primitives.

eprbell commented 2 years ago

Closing the issue: if you have more questions feel free to open a new issue.