Coder Social home page Coder Social logo

marcopus / degiro-portfolio-rebalancer Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 3.0 75 KB

Portfolio rebalancing for the finicky investor. A tool that keeps your assets allocation well balanced

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
asset-allocation degiro degiro-api investing investment personal-finance portfolio-rebalancer portfolio-rebalancing rebalance rebalancer

degiro-portfolio-rebalancer's Introduction

DEGIRO Portfolio Rebalancer

Portfolio rebalancing for the finicky investor. A tool that keeps your assets allocation well balanced

Disclaimer

This tool is built based on functionalities of the awesome degiro-connector. This author does not intend to in any way use degiro-connector's own credit to endorse or promote this tool.

This tool is experimental and largely untested, and it may be subject to a frequent state of change. Use this tool at your own risk.

Quickstart

Prerequisites

Install python3

Install poetry

Clone this repo:

git clone https://github.com/marcopus/degiro-portfolio-rebalancer.git

Installation

Install dependencies:

poetry install

Configuration

Make a copy of config_template.json under the config directory, give it a name and keep it secret

Open your config file and update username, password, reference_date_from, reference_date_to. The from/to dates should capture the interval where the initial investment was made

If your DEGIRO account uses two-step verification, also update the totp_secret_key (how? check it out here), otherwise remove it

Usage

Run the rebalancer tool:

poetry run python degiro_portfolio_rebalancer.py my_account

where my_account is the name of your json file.

Enjoy!

Contributing

Contributing to this project is welcome (see CONTRIBUTING).

degiro-portfolio-rebalancer's People

Contributors

marcopus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jogster amdens

degiro-portfolio-rebalancer's Issues

Add usage documentation

This is a non exhaustive list of things that need to be documented:

  • two-step verification: how to get the secret key
  • explain what the from/to reference dates mean and how they should be used

Allow product filtering for rebalancing

It may not be desirable to base the rebalancing calculations on the entire portfolio, i.e.

  • there may be products that one may want to exclude from the current asset allocation
  • some products that were originally part of the portfolio may no longer exist

Add a filtering option where the user can specify the specific products on which to base the rebalancing calculations

Rebalancing based on arbitrary asset allocation

This feature is about make portfolio rebalancing based on some arbitrary asset allocations provided by the user. This could be used, for instance, if reference dates are not practical or not desired.

Example

Say we have three funds, A, B and C. The user provides an asset allocation, say like

{
    "A": 20,
    "B": 25,
    "C": 55
}

and the tool makes its rebalancing calculations based on this arbitrary values.

give the app a UI

investigate adding a UI (Dash?)

  • user can enter config data (i.e. login credentials, reference dates, reference weightings, etc.) directly in the app
  • user can alternate between buy/sell and buy-only rebalancing visualization

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.