GithubHelp home page GithubHelp logo

ecmatos / stock_income_tax Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 43 KB

This repository aims to help people calculate the average costs of their stocks to declare in the income tax.

License: Apache License 2.0

Python 100.00%

stock_income_tax's Introduction

Stocks Income Tax

This repository aims to help people calculate the average costs of their stocks to declare in the income tax.

Getting started

The application will read your stock market orders using an Excel file or your brokerage notes.

Brokerages method

Download the brokerages and move the files to the orders folder. So far, the app supports these brokerage notes:

  • ๐Ÿ‘ท In progress - Nuinvest
  • ๐Ÿ‘ท In progress - Rico Investimentos

Excel file method

On the files folder, fill the excel file orders.xlsx inserting each share of all your orders. The file already have some examples to you follow.

Columns:

  • date: When the order was made using the format "dd/mm/yyyy".
  • order_type: Buy or sell (c/v)
  • code: Share id in stock market.
  • quantity: Quantity bought/selled of the share.
  • price: Price payed at the bought/selled moment.
  • broker: Broker identifier (see the column broker on file broker_data.xlsx for options).

๐Ÿ’ป Setting up environment

1 - Install python.

2 - Clone the repository: git clone https://github.com/ecmatos/stock_income_tax.git

3 - Go to the folder where you cloned the repository.

4 - Create a new virtual environment: python -m venv venv

5 - Activate the virtual environment: venv\Scripts\activate.bat

6 - Install the dependencies listed on requirements.txt: pip install -r requirements.txt

๐Ÿ’ป Running the app

Runnig the app

  • python app.py

๐Ÿ”Ž Resources

The folder files have some other excel files that you can explore:

  • broker_data.xlsx store information about brokers, so if you didn't find your broker on the list, you can add it on the file using the other rows as example.
  • company_data.xlsx contain all the brazilian companies listed in the stock market.

๐Ÿ“„ Consuming the results

The app will create 2 files as result on output folder:

  • output_avg_cost.xlsx : This file contains all information summarized in share code, quantity and average cost.
  • output_descriptions.xlsx : This file contains the standard texts that can be used in the income tax.

๐Ÿ”จ Built with

  • Pandas
  • PyPDF2

stock_income_tax's People

Contributors

ecmatos avatar

Stargazers

Gustavo Passos avatar

Watchers

 avatar

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.