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
--cents round to nearest cent, not dollar
-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 --cents
to round to the nearest cent).
Open lots are also summarized.
Examples
capital-gains 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.1.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for capital_gains-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 770fa8f20cacf29d1581ddf655ccc2fd93fe99a3cda5b92159833de01bd53c06 |
|
MD5 | 30bf482eeb911a9970273c0c0198fa58 |
|
BLAKE2b-256 | 8e43f36a28c621a271abce9bb07eb28c653250f455dc377b8e4634aaa68516c2 |