Capital gains calculator
Project description
capital-gains
Capital gains calculator.
Installation
pip install capital-gains
Usage
usage: capital-gains [<options>] [--] <input file>
Capital gains calculator
optional arguments:
-h, --help show this help message and exit
-d <n>, --decimal-places <n>
round $ to <n> decimal places; default: 0
-s <n>, --shares-decimal-places <n>
round shares to <n> decimal places; default: 0
-t, --totals output totals
-v, --version show program's version number and exit
Input format
See example/input.csv.
Each entry has the following format:
date,symbol,name,shares,price,fee
Buys have positive shares
; sells have negative shares
. price
and fee
are
always positive. fee
and name
are optional. A sell without a name
will
sell all open lots FIFO; a sell with a name
will only sell lots with the same
name
. Thus name
can be used to specify sell orders other than FIFO.
Output format
Closed lots are tabulated in a format suitable for form
8949, rounded to the nearest dollar
(use -d 2
to round to the nearest cent).
Open lots, and optionally totals for both closed and open lots (use -t
), are
also summarized.
Examples
capital-gains -t example/input.csv > example/output.txt
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
capital-gains-1.0.2.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for capital_gains-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1d4f2543880658146ed393af4bde98cf0a93c1aa581a985ccd8dcf72eea07ae |
|
MD5 | 11d0611acbe056ca676a455410d5da46 |
|
BLAKE2b-256 | ba5c529bf65a32751edfc872ab7e4d625cd236dd0ec76daa5bf5b915b2972607 |