Skip to main content

Parses 1099 tax document (1099-B, 1099-INT, 1099-DIV) from PDF into CSV format and performs simple analysis

Project description

๐Ÿƒ 1099 Parser

Note: Dividend features are in beta. I haven't written tests yet. Use the --analysis-report flag to get more details about how decisions are made and double check my work.

Build

This project converts standard 1099 tax documents (validated on Robinhood and Wealthfront documents so far) from PDF to CSV file. This tool will be helpful for those who need every transaction in a spreadsheet format for tax reporting purposes. After parsing the tax documents, it will perform some simple analysis on the holding period of securities which reported qualifying dividends.

Original Work

Copyright (c) 2023 Andrew Wells (ajwells@uchicago.com)

Original Author

Many kudos to original author Keun Park (kevin.park1217@gmail.com), whose work I used as a foundation upon which to expand.

Donate

๐Ÿš€ Running Locally

Prerequisites

Make sure you have the following installed on your computer.

  • Latest Python 3
    Must be version 3.6 or higher
  • [Windows Only] Build Tools for Visual Studio 2019
    In the installer, select
    • C++ build tools
    • the Windows 10 SDK
    • the latest version of MSVC v142 x64/x86 build tools.

Installing

$ python -m pip install wheel
$ python -m pip install --upgrade parse_1099

Note: If commands above fail, try replacing python with python3

Running

$ parse_1099
usage: parse_1099 [-h] --pdf FILE [--csv FILE] [--silent] [--validate] [--disable-dividend-analysis] [--analysis-report]

Example and Validation

Set the --validate flag to print out total values for some columns. Make sure these values match with the PDF!

$ parse_1099 --pdf consolidated_1099.pdf --validate
Pages: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 40/40 [00:03<00:00, 10.41it/s]
>>> Calculated Totals:
    Make sure the values matches with the PDF totals!
    proceeds: $77,521.03, cost: $80,902.05, wash_sales_loss: $3,733.41, gain_loss: $352.39
>>> Saved to output.csv

๐Ÿž Issues and Bugs

If you have any issues with the tool, please open a GitHub Issue with as much as detail as you can provide.

Development

Structure

This is the first python module I've worked on, so the structure may be a little goofy. I tried to structure the project into two parsers, one for 1099-B Proceeds from Broker and Barter Exchange Transactions and one for 1099-DIV Detail for Dividends and Distributions.

In each case, I designed for extensibility via versioning, in case the structure of the data or the presentation of the data on the PDF ever changes. Hypothetically the correct version of the subparser could be detected, but there's no sense writing that functionality until the scenario arises.

Building

The following will build the python wheel file into the dist folder. Note that python and pip can be exchanged with python3 and pip3 depending on your environment configuration.

$ python -m build

The following will update the installed module requiring a version bump.

$ pip install dist/parse_1099-X.Y.Z-...whl --force-reinstall --no-deps

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

parse_1099-2.1.0.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

parse_1099-2.1.0-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file parse_1099-2.1.0.tar.gz.

File metadata

  • Download URL: parse_1099-2.1.0.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for parse_1099-2.1.0.tar.gz
Algorithm Hash digest
SHA256 a8add83a219a2803cc6d281b771b0e14c54d3f1b354be05d5f5602d4e6bd16ea
MD5 1edcc92c94b77579c8bdc4d0c2bfb70d
BLAKE2b-256 5d83d667fbaf5cb24cad9b4ba743b514b5a3ce14bf0ac98e42233bd9d3ff413c

See more details on using hashes here.

File details

Details for the file parse_1099-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: parse_1099-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for parse_1099-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 145933145cb74524040768d5b5812bfdbab28106dd38f55d65d6ce0972b0e444
MD5 695aff58ae8a8a7f2fb3ba0384749534
BLAKE2b-256 34fb0f1d0dfc765048ce769f732c621247387d96a9bc3d9f13cbd5ea2c0e76fa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page