Git Product home page Git Product logo

pyportfolioanalytics's Introduction

Python Portfolio Analytics

status

A portfolio tracker featuring account transactions, historical allocation, dividends and splits management and endless performance metrics. ➡️ Go to web app

Input example

Date Ticker Order Price Quantity Fee
2019-10-01 CASH.USD deposit 1 100000 0
2019-10-11 AAPL purchase 234.52 88 35
2019-11-25 MSFT purchase 148.3 250 25
2019-12-04 AAPL sale 262.08 50 20
2020-01-06 FB purchase 208 100 10
2020-01-25 CASH.USD withdrawal 1 30000 0

Develop

Test locally in conda environment:

$ git clone https://github.com/simprecicchiani/iPortfolio.git
$ cd iPortfolio
$ conda env create -f .environment.yml
$ conda activate ppa

Alternatively with pip in a virtual environment (python>=3.9):

$ git clone https://github.com/simprecicchiani/iPortfolio.git
$ cd iPortfolio
$ pip install -r requirements.txt

Run the web app locally with

$ streamlit run app/main.py

Open either /tests/yf_test.ipynb (uses Yahoo Finance, slower, support multicurrency) or /tests/av_test.ipynb (requires a free Alpha Vantage API key).

Newest version /tests/pdr_test.ipynb with pandas-datareader.

Built with

Python 3.9 and additional packages (leveraging pandas DatetimeIndex feature)

To Do

  • Migration to Alpha Vantage
  • Portfolio builder UI (not available)
  • Data sanity check (not available)
  • Portfolio dashboard (early stage)
  • Multicurrency portfolio (done in yf variant)

Further development

  • Portfolio Technicals
  • Lots of charts
  • Indicators (Sharpe Ratio, Beta, VaR, etc)
  • Sector Exposure (stocks only)

pyportfolioanalytics's People

Contributors

simprecicchiani avatar

Stargazers

 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.