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 cents, not dollars
-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.0.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for capital_gains-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9299f5e7554742d67e3f2e8769b8d0147e1c74c2923a5360e6816fe81f43e44e |
|
MD5 | e8ffa2b5dd61b19a11b8bcd08e2239e1 |
|
BLAKE2b-256 | e635396b8b82d44cdf7053ad5ae4373233f7c89e93f4ee5d1d4cb4c934e7223b |