GithubHelp home page GithubHelp logo

fin's Introduction

fin

fin is a Trading212 CSV utility that aggregates your transaction CSV files into a couple of output formats.

You can generate an aggregate formatted JSON file that's used by the reporting tool, or you can generate a yahoo formatted CSV file that can be imported into Yahoo Finance.

The tool deals with pies, stock splits and Yahoo ticker symbols. However, it's required by the user to maintain these settings in the config.yaml file. After running the tool for the first time a default config.yaml file will be generated for you.

Note

The goal of this tool is to give a big overview of your portfolio, along with fees and costs. It combines all transactions and comes up with a final tally, as such it's not meant to help with taxes. This also means that for the Yahoo format we don't show all lots, again, just the final tally.

Beware

Trading212 is under no obligation to keep their CSV format the same. History has proven that they do change things from time to time, which either invalidates old CSVs or won't work with new.

We suggest to download new CSVs if you're experiencing problems. This can be done in 1-year increments.

Usage

$ aggregator --help
Usage of aggregator.:
  -config string
        YAML file with configuration for this run
  -pie-only string
        Only output specific pie output
  -skip-pies
        Skip pie separation during output

Most of the settings are actually configured in config.yaml. The flags allow you to override some specific settings.

Config

---
# Required config
input: data # folder where your Trading212 CSVs are stored
output: aggregated_quotes # name of output file (prefix)
format: aggregate # aggregate or yahoo

# Optional config
skip-pies: true # skip splitting by pies (default: false)
pie-only: "" # only generate this pie (default: "")

# Splits is a list of split events relevant to your portfolio
# this is needed to calculate the total stock count
splits:
  - symbol: ABEC
    date: 2022-07-16
    ratio: 20 # for reverse splits, use a decimal ratio

# Symbols is a list of conversions to take Trading212 symbols
# and convert them to the symbols used by Yahoo portfolios
symbols:
  RIO: RIO.L
  SAN: SAN.PA

# Pies allows you split your aggregation into multiple CSVs
# uncomment to use
#pies:
#  - name: Growth
#    symbols:
#      - GOOG
#      - AMZN
#  - name: Dividend
#    symbols:
#      - PEP
#      - JNJ

Reporting

Screenshot of the reporting UI

The project has a reporting tool that can be used to generate a report of your portfolio. It's also available at https://fin.gerben.dev as hosted by GitHub Pages.

It uses jQuery, Bootstrap and Bootstrap Table to generate the report. It has a local file mode using LocalStorage, with the resources coming from a CDN. This means you can just open the report/index.html file in your browser and it will work.

Remember to run the aggregator tool first to create your aggregated_quotes.json file. You can also use the agg.json example output file in this repo to test the reporting tool.

The default currency is set to EUR, but you can use the dropdown to change it to GBP or USD.

Changelog

  • v0.2.4 - 2023-08-01 - Fix stock splits for stocks that are untouched + Update dependencies
  • v0.2.3 - 2023-07-31 - Skip "Currency conversion" action + Deposits has changed fields
  • v0.2.2 - 2023-07-24 - Currency name not in headers anymore
  • v0.2.0 - 2023-06-06 - Added "Interest On Cash" field

fin's People

Contributors

gerbenjacobs avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.