rp2 0.9.0

admin

Privacy-focused, free, open-source cryptocurrency US tax calculator, up to date for fiscal year 2021: it handles multiple coins/exchanges and computes long/short-term capital gains, cost bases, in/out lot relationships/fractioning, and account balances.It generates data that tax accountants can understand, even if they are not cryptocurrency experts (e.g.form 8949). Project description RP2 v0.9.0 Table of Contents -…

Privacy-focused, free, open-source cryptocurrency US tax calculator, up to date for fiscal year 2021: it handles multiple coins/exchanges and computes long/short-term capital gains, cost bases, in/out lot relationships/fractioning, and account balances.It generates data that tax accountants can understand, even if they are not cryptocurrency experts (e.g.form 8949).

Project description

RP2 v0.9.0

Table of Contents

– [Introduction]

– [License]

– [Download]

– [Installation]

– [Running]

– [Reporting Bugs]

– [Developer Documentation]

– [Frequently Asked Questions]

Introduction

RP2 is a privacy-focused, free, open-source US cryptocurrency tax calculator, that is up to date for Fiscal Year 2021.Preparing crypto taxes can be a daunting and error-prone task, especially if multiple transactions, coins, exchanges and wallets are involved.This task could be delegated to a crypto tax preparation service, but many crypto users value their privacy and prefer not to send their transaction information to third parties unnecessarily.

Additionally, many of these services cost money.RP2 solves all of these problems:

– it manages the complexity related to coin flows and tax calculation and it generates data that accountants can understand (in the format of form 8949), even if they are not cryptocurrency experts;

– it prioritizes user privacy by storing crypto transactions and tax results on the user’s computer and not sending them anywhere else;

– it’s free and open-source.

RP2 reads in a user-prepared spreadsheet containing crypto transactions.It then uses high-precision math to calculate long/short term capital gains, cost bases, balances, average price, in/out lot relationships/fractions, and finally it generates output spreadsheets.

It uses the FIFO accounting method.

It has a programmable plugin architecture for output generators : the builtin plugins are US-specific, but RP2’s architecture makes it possible to contribute additional output generators for different countries or for different US-based cases.The builtin plugins are:

– tax_report_us: generates a tax report meant to be read by tax preparers (in the format of form 8949);

– rp2_full_report: generates a comprehensive report, with complete transaction history, lot relationships/fractions and computation details.

RP2 has extensive unit test coverage to reduce the risk of regression.

IMPORTANT DISCLAIMERS:

– RP2 offers no guarantee of correctness (read the [license] ): always verify results with the help of a tax professional.

– The author of RP2 is not a tax professional, but has used RP2 personally for a few years.

How RP2 Operates

RP2 treats virtual currency as property for tax purposes, as per IRS Virtual Currency Guidance .

RP2 uses the FIFO accounting method (lots acquired first are disposed of first): however, in and out lots typically don’t have matching amounts, so RP2 fractions them, maps in/out lot fractions and computes the resulting cost bases and capital gains for each lot fraction.

RP2 groups lot fractions into the following taxable event categories, each of which has a specific tax treatment :

– [AIRDROP] : gains from airdrops;

– DONATE: donations to charitable organizations;

– GIFT: gifts to parties who are not charitable organizations (not tax-deductible).

– [HARDFORK] : gains from hard forks;

– INTEREST: gains from interest;

– [MINING] : gains from mining;

– MOVE: the fee for moving currency between two accounts controlled by the same owner; these may not be taxable or tax deductible but they still affect the FIFO order so they are tracked;

– SELL: specifically, sale and [exchange of one cryptocurrency for another] .RP2 splits them in two subcategories:long-term capital gains, if the lot was held for more than 1 year, orshort-term capital gains otherwise;

– [STAKING] : gains from staking;

– WAGES: income from crypto wages.

For each of these categories RP2 generates an output spreadsheet with transaction details and computed gains/losses (see Input and Output Files for more details).Users can give this output to their tax preparer with the rest of their tax documentation (see also FAQ on which tax forms to file ).Note that buying cryptocurrency using fiat currency is not a taxable event.

NOTE ON NFTs: Read the FAQ on NFTs to learn about how RP2 treats NFTs.

License

RP2 is released under the terms of Apache License Version 2.0.For more information see LICENSE or http://www.apache.org/licenses/LICENSE-2.0 .

Download

The latest version of RP2 can be downloaded at: https://pypi.org/project/rp2/

Installation

RP2 has been tested on Ubuntu Linux, macOS and Windows 10 but it should work on all systems that have Python version 3.7.0 or greater.

Installation on Ubuntu Linux

Open a terminal window and enter the following commands:

sudo apt-get update sudo apt-get install python3 python3-pip

Then install RP2 Python package requirements:

pip install rp2

Installation on macOS

First make sure Homebrew is installed, then open a terminal window and enter the following commands:

brew update brew install python3

Then install RP2 Python package requirements:

pip install rp2

Installation on Windows 10

First make sure Python 3.7 or greater is installed (in the Python installer window be sure to click on “Add Python to PATH”), then open a PowerShell window and enter the following:

pip install rp2

Installation on Other Unix-like Systems

– install python 3.7 or greater

– install pip3

pip install rp2

Running

Before running RP2, the user must prepare two files:

– an ODS-format spreadsheet, containing crypto transactions (ODS-format files can be opened and edited with [LibreOffice] , Microsoft Excel and many other spreadsheet applications);

– a JSON config file, describing the format of the spreadsheet file: what value each column corresponds to (e.g.timestamp, amount, exchange, fee, etc.) and which cryptocurrencies and exchanges to expect.

The formats of these files are described in detail in the Input Files section of the documentation.

Examples of an input spreadsheet and its respective config file:

– [input/crypto_example.ods]

– [config/crypto_example.config] (if desired, this config file can be used as boilerplate).

After reading the input files, RP2 computes taxes and generates output files, which contain information on long/short capital gains, cost bases, balances, average price, in/out lot relationships and fractions.They are described in detail in the Output Files section of the documentation.

To try RP2 with example files, download crypto_example.ods and crypto_example.config .

Let’s call

the location of the downloaded files.

To generate output for the example files open a terminal window (or PowerShell if on Windows) and enter the following commands:

cd rp2 -o output -p crypto_example_ crypto_example.config crypto_example.ods

Results are generated in the

output directory and logs are stored in the

log directory.

To print command usage information for the

rp2 command:

rp2 –help

Input and Output Files

Read the input files and output files documentation.

Reporting Bugs

Read the Contributing document.

Contributing

Read the https://github.com/eprbell/rp2/tree/main/CONTRIBUTING.md document.

Developer Documentation

Read the developer documentation .

Frequently Asked Questions

Read the user FAQ list and the developer FAQ list .

Change Log

Read the Change Log document.

RP2 Change Log

v0.8.2

– Verified software is up to date for FY 2021

– Wrote several answers in User FAQ document

– Minor fixes

v0.8.1

– Added several new tests (from/to_year command line option variations and new transaction types)

– Reworked time filter logic to fix two bugs related to -f and -t options:with time filtering on, running sums reflected only filtered transactions, instead of all transactions (in other words, running sums should not be affected by filtering)with time filtering on, number of fractions reflected also fractions with year higher than time filterwith time filtering on, sold lot percentages would be shown incorrectly in some cases

– Updated documentation: various fixes and improvements

v0.8.0

– added new transaction types: AIRDROP, HARDFORK, INTEREST, MINING, STAKING, WAGES.Removed transaction type EARN, which used to encompass all the above types

– revisited output generators: rp2_report was renamed to rp2_full_report and mock_8949_us was renamed to tax_report_us.The tax_report_us plugin now generates one sheet per taxable event type: Airdrops, Capital Gains, Donations, Gifts, Hard Forks, Interest, Investment Expense, Mining, Staking, Wages.

– fixed bug in from/to_year logic: entry sets didn’t consider the time filter in certain corner cases

– updated documentation to reflect above changes

v0.7.3

– Added from/to_year command line option

v0.7.2

– Minor fixes related to Pypi package distribution and upload

v0.7.1

– Minor fixes related to Pypi package distribution and upload

v0.7.0

– First version uploaded to Pypi

– Added pre-commit hooks

– Added bandit security checks

– Major revision of user and developer documentation

– Fixed lint errors

– Various bug fixes and improvements

v0.6.0

– First version tracked in change log

– Added Python packaging support

– Switched to high-precision math (decimal.Decimal)

– Finished documentation (except FAQs)

– Added bumpversion

– Various bug fixes and improvements

Project details

Download files

Download the file for your platform.If you’re not sure which to choose, learn more about installing packages .

|Filename, size||File type||Python version||Upload date||Hashes|

|Filename, size||File type Source||Python version None||Upload date||Hashes|

|Filename, size||File type Wheel||Python version py3||Upload date||Hashes|

[rp2-0.9.0.tar.gz] (1.3 MB)

[View]

[rp2-0.9.0-py3-none-any.whl] (89.2 kB)

[View]

[Close]

[Hashes] for rp2-0.9.0.tar.gz

|Algorithm||Hash digest|

|SHA256|

|MD5|

|BLAKE2-256|

375bb10da7224b6ae8e4fa32b6ea23713f6cc59b593254945265bdf6ec3688d6

91ef7292f70310d399ff0c20aaaed490

9572d9468b6801eccfd2a0c5a40fb22e9e9f1ff9f45cbe000f7f5931fb2539e2

[Close]

[Hashes] for rp2-0.9.0-py3-none-any.whl

|Algorithm||Hash digest|

|SHA256|

|MD5|

|BLAKE2-256|

791890c2b28d468ed5838af904946bfdc60bc1650314af44d6c3e8dfd6797991

6217ea53a1c4d7a9bc77a5cbeeb124fd

812d64b5077b9e42e8aef5a83ae2c8e5c64369ebaa65e596849519c88041d12f.

Leave a Reply

Next Post

Ethereum Is Looking Strong in 2022 Based on Tokenomics

Ethereum (CCC: ETH-USD ) is sustaining its downward trend which began in early November. Given that fact, it’s arguable that few probably want to hear another discussion of why that has come to be. Instead, let’s look into the deflationary pressure being exerted on ETH, and why that’s a good thing for its price moving…
Ethereum Is Looking Strong in 2022 Based on Tokenomics

Subscribe US Now