GithubHelp home page GithubHelp logo

stock-summary's Introduction

Introduction

This project provides a simple (some would argue elementary) view into financial portflio performance based on a running ledger of "Buy" and "Sell" orders. I made this because I missed the old Google Finance Summary view that gave me a quick glance into overall performance for stocks I hold. This is completely as-is and probably has a bunch of bugs, but it works for my needs!

Market data is obtained using the Alpha Vantage API through a a small API client (alphavantage.py)

Dependencies

  • Python3
  • flask
  • requests

Running

  • Obtain an Alpha Vantage API key

  • Add a config.py file to the root directory with a single line: API_KEY = "[[ your alpha vantage API key ]]"

  • Add your ledger to a portfolio.csv file with the format date,order_type,symbol,num_shares,share_price,commission

    • date - YYYY-MM-DD as ISO-8601 intended
    • order_type - "Buy" or "Sell"
    • symbol - ticker symbol of the security
    • num_shares - number of shares bought / sold
    • share_price - price per share
    • commission - commission (if any)
  • python server.py

  • Go to the addres shown in your terminal window to view the summary table

Todo

  • Add support for stock dividends / cash balance (these can be entered manually in the ledger as a $0 "Buy" for now)
  • Extend API client to include coverage of other endpoints (like crypto)
  • Add sort of basic things like being able to sort the table, add securities via web FE, etc.
  • Write tests

stock-summary's People

Contributors

blattus avatar

Watchers

Hareesh Ganesan 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.