Giter VIP home page Giter VIP logo

stockstax's Introduction

StocksTax Logo

StocksTax

StocksTax calculates capital gains using transactions and price data from CSV files for shares transactions. Capital gains are calculated according to section 104 holding; 30-day bed and breakfasting; and same-day rules.

Guidance on tax calculation when selling shares: https://www.gov.uk/tax-sell-shares

Disclaimer

Do not rely on this software for accuracy. Anything provided by this software does not constitute advice in any form. The software is provided "as is", without warranty of any kind. Use at your own risk. See the LICENSE file for more details.

Providing Data

Transaction data need to be provided in CSV files contained within particular directories. Transactions are in ./gains.

CSV files can be produced by any decent spreadsheet software. Spreadsheet software can be used to manipulate exported price, exchange and wallet data into the correct format.

Empty rows are allowed. Additional columns for comments etc. are allowed and ignored.

Please see the ./examples directory which contains an example of how data should be provided.

Capital Gain/Loss data

Buying selling shares and other acquisitions or disposals can be provided in the ./gains directory in as many CSV files as desired. The CSV files can be named anything as long as they end in .csv.

Trades should be provided with the following columns:

Column Description
DATE The date of the trade, acquistion and/or disposal formatted as YYYY-MM-DD
ASSET The name of the asset (stock index or company name)
AMOUNT Number of shares acquired or disposed
PRICE Price in GBP paid/received per share
FEE Fee paid for transaction in GBP

Running Calculations

Please run PYTHONPATH=. python3 pycryptax/__main__.py -h for usage details.

When running a calculation you must either be in the directory containing the prices, income and/or gains directories, or provide it using the --dir option.

Calcuations are done for a particular period of time. The start and end dates need to be provided in the YYYY-MM-DD format. For example, to calculate income for the 2009-2010 tax year in the ./examples directory:

PYTHONPATH=. python3 pycryptax/__main__.py gain 2019-04-06 2020-04-05 -d ./examples

The following actions are allowed:

  • gain: Produces the gain and loss for each asset and in total. Also displays the status of the section 104 holding at the end of the calculation period.

Acknowledgements

This program code is based on PyCryptax project by Matthew Mitchell GitHub: @MatthewLM

stockstax's People

Contributors

mgalushka avatar matthewlm avatar

Stargazers

Kenny avatar Edgar Fuoss avatar Nazarii Shymanskyi avatar

Watchers

James Cloos avatar

Forkers

vvsvin allod

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.