Skip to content

leo-pfeiffer/portfolio_dashboard

Repository files navigation

Portfolio Dashboard

Custom Portfolio Dashboard for your Degiro account built with Django

Getting started

Build with docker-compose

Run

./setup.sh

from the project root. This will create a .env file (if none exists) and builds the container.

The default port in the environment variables (DJANGO_PORT) is set to 8000.

Migrations are also applied right away and a superuser is created so that you can login.

This superuser has the credentials

username: admin
password: admin

Delete this user and create your own once you're ready.

You should now be able to access the dashboard on localhost:8000.

Run without build

Alternatively, you can run the django directly without building the container. However, this requires to have a Postgres database running on your system.

  1. Generate .env file

You will need a .env file, which you can create by running

sh generate_dotenv.sh

and filling out the environment variables the way you need them.

  1. Create a virtual environment
python -m virtualenv venv
source venv/bin/activate
  1. Install the requirements
pip install -r requirements.txt
  1. Run migrations and generate superuser
python manage.py migrate
python manage.py loaddata ./project/fixtures/admin.json

As before, the default superuser will have the credentials

username: admin
password: admin

Delete this user and create your own once you're ready.

  1. Start the app
python manage.py runserver 0.0.0.0:8000

You should now be able to access the dashboard on localhost:8000.

Loading data

If you have properly configured your Degiro credentials in the .env file, you can fetch your account data from the Degiro API by initiating an ETL process. The ETL process also collects price date from Yahoo finance.

From within your container (or virtual env) run

python manage.py etl 

This will take a few moments (mostly due to the price data being fetched from Yahoo finance).

Once you've run the ETL process, your portfolio data is visible on the dashboard.

Makefile

The Makefile contains a number of convenience PHONY commands that you may use to access certain behaviors more quickly.

For example, to enter the container's bash console, simply run

make bash

Have a look at the Makefile to learn about the other commands.

Screenshots

The app contains a dashboard view for you Degiro Portfolio. Dashboard1 Dashboard2

Technologies

  • Django for the general project setup
  • YFinance to pull price data for stocks
  • PostgreSQL database for persistent storage
  • Docker Compose for containerization
  • SB Admin 2 bootstrap template for the frontend

About

Portfolio Dashboard for your Degiro account built with Django

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors