{"id":28267603,"url":"https://github.com/dipto9999/stock_portfolio_app","last_synced_at":"2026-05-11T07:52:50.202Z","repository":{"id":56764439,"uuid":"474782623","full_name":"Dipto9999/Stock_Portfolio_App","owner":"Dipto9999","description":"Tkinter application which enables users to analyze stock purchase transactions and simulate profits with previous market data.","archived":false,"fork":false,"pushed_at":"2022-10-23T23:27:53.000Z","size":11077,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-20T15:11:29.552Z","etag":null,"topics":["data-science","matplotlib","oop","python","sqlite","statistics","tkinter","ux-design"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dipto9999.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-27T23:13:52.000Z","updated_at":"2024-09-12T19:12:35.000Z","dependencies_parsed_at":"2023-01-20T12:00:49.275Z","dependency_job_id":null,"html_url":"https://github.com/Dipto9999/Stock_Portfolio_App","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Dipto9999/Stock_Portfolio_App","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dipto9999%2FStock_Portfolio_App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dipto9999%2FStock_Portfolio_App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dipto9999%2FStock_Portfolio_App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dipto9999%2FStock_Portfolio_App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dipto9999","download_url":"https://codeload.github.com/Dipto9999/Stock_Portfolio_App/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dipto9999%2FStock_Portfolio_App/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260629615,"owners_count":23038959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","matplotlib","oop","python","sqlite","statistics","tkinter","ux-design"],"created_at":"2025-05-20T15:11:13.302Z","updated_at":"2026-05-11T07:52:50.195Z","avatar_url":"https://github.com/Dipto9999.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stock Portfolio App\n\n## Contents\n\n* [Overview](#Overview)\n    * [Inspiration](#Inspiration)\n* [Design](#Design)\n    * [User Journey](#User-Journey)\n        * [Persona](#Persona)\n        * [Journey Map](#Journey-Map)\n    * [Data Flow](#Data-Flow-Diagram)\n* [Implementation](#Implementation)\n    * [Tradeoffs](#Tradeoffs)\n    * [Classes](#Classes)\n        * [Current Portfolio](#Current-Portfolio)\n    * [SQLite Database](#SQLite-Database)\n* [Demonstration](#Demonstration)\n* [Credit](#Credit)\n\n## Overview\n\nDevelop **Desktop App** driven by **Python** to collect stock data in local **SQLite** database, analyze market trends, visualize stock portfolio activity, and inform my personal transaction behavior. \u003c/br\u003e\n\n\u003cem\u003eThis application is a work-in-progress. It has not been fully developed and consists of software bugs. It can currently be run with limited functionality.\u003c/em\u003e\n\n### Inspiration\n\nThis was inspired primarily by my interest in visualizing and informing my decision-making for my personal **Tax Free Savings Account (TFSA)** investments. \u003cu\u003eThese data insights are not intended to provide professional investment advice\u003c/u\u003e.\u003c/br\u003e\n\nI am a student interested in the technologies used in this application - this in addition serves to practice software design and development when analyzing quantitative data.\u003c/em\u003e\n\n## Design\n\nLet's go over the intended usage and functionality of our final application.\n\n## User Journey\n\nWe're going to zoom out a little bit and consider a simplified \u003cem\u003euser journey\u003c/em\u003e when interacting with this application.\n### Persona\n\nLet's start by going over the target user **Jack**, based upon my personal\n\u003cp\u003e\n    \u003cem\u003e\n        \u003cb\u003eJack - \"A personal investor interested in optimizing their portfolio returns from historical data.\"\u003c/b\u003e\n    \u003c/em\u003e\n\u003c/p\u003e\n\nIt is good practice (and necessary) to consider the actions both preceding and following interaction with the application in depicting the overall journey. I'll have to do more investigation to understand when I typically access my **TFSA** account and how this may influence the design. In general, I am certain that a **Mobile App** would be most accomodating for an enhanced \u003cem\u003euser experience\u003c/em\u003e. For learning purposes, let's continue with the **Desktop App** due to reduced development effort.\n\n### Journey Map\n\nThe following \u003cem\u003euser journey map\u003c/em\u003e depicts potential workflows we're looking to accomplish through this application.\n\nWe intend to create a portfolio during our first interaction. From here on, we're looking to visualize our current portfolio upon starting the application.\n\n\u003cimg align = \"right\" src=\"Images/Design/UserJourney_Map.jpg\" width=\"60%\" height=\"60%\" title=\"User Journey Map\" \u003e\n\n- User Journey \u003ci\u003e0\u003c/i\u003e :\n    - Create Portfolio\n    - Visualize Market History\n    - \u003cem\u003eAnalyze Potential Transactions (TBD)\u003c/em\u003e\n    - Make Stock Transactions\n\n- User Journey \u003ci\u003e1 ... n\u003c/i\u003e :\n    - Visualize Portfolio\n    - Visualize Market History\n    - \u003cem\u003eAnalyze Potential Transactions (TBD)\u003c/em\u003e\n    - Make Stock Transactions ...\n\nThe pages have been wireframed based on the \u003cem\u003euser journey\u003c/em\u003e. In general, we want related actions to be on a single page so that the app is accomodating to Jack's mental space.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003ePages\u003c/th\u003e\n    \u003cth\u003eFunctionality\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003c!-- LandingPage --\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src = \"Images/Design/Wireframes/LandingPage.jpg\"\u003e\u003c/td\u003e\n    \u003ctd\u003eCreate Portfolio\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003c!-- PortfolioPage --\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src = \"Images/Design/Wireframes/PortfolioPage.jpg\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\n        \u003cul\u003e\n            \u003cli\u003eVisualize Portfolio\n            \u003cli\u003e\u003cem\u003eAnalyze Potential Transactions (TBD)\u003c/em\u003e\n            \u003cli\u003eMake Stock Transactions\n        \u003c/ul\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003c!-- MarketPage --\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src = \"Images/Design/Wireframes/MarketPage.jpg\"\u003e\u003c/td\u003e\n    \u003ctd\u003eVisualize Market History\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nLets take a look at this **Data Flow Diagram (DFD)**:\u003c/br\u003e\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"Images/Design/DataFlow_Diagram.jpg\" width=\"70%\" height=\"70%\" title=\"Data Flow Diagram\"\u003e\u003c/p\u003e\n\nWe've designed the \u003cem\u003eapplication backend\u003c/em\u003e to account for :\u003c/br\u003e\n\n\u003cul\u003e\n    \u003cli\u003eData Consistency (i.e. Between \u003cb\u003eSQLite\u003c/b\u003e database \u003cem\u003e-\u003e\u003c/em\u003e \u003cb\u003eGUI\u003c/b\u003e)\u003c/li\u003e\n    \u003cli\u003eData Sparsity (i.e. Is the market closed? Has the stock gone public at this date?)\u003c/li\u003e\n\u003c/ul\u003e\n\n## Implementation\n\nThis **Desktop App** was preceded by an exploratory **Notebook** in the [(`Exploration`)](Exploration) repository. The application itself was developed off of reusable code from a previous [Electrical Company](https://github.com/Dipto9999/Electrical_Company) project. This was heavily refactored and modified to incorporate our intended functionality.\n\n### Tradeoffs\n\nDuring development testing, I realized that **Python** and **SQLite** data transfers result in high system latency. Although convenient for data analytics, visualization, as well as the local database connection, there are most likely faster alternatives for implementation.\n\n### Classes\n\nThrough utilization of **Python**'s **Object Oriented Programming (OOP)** structure, we have abstracted the app functionality in the following components :\n\n* [Market](market.py)\n* [Porfolio](portfolio.py)\n* [GUI](app.py)\n\nThe [(`app.py`)](app.py) \u003cb\u003ePython\u003c/b\u003e file must be run to add, delete, or modify portfolios.\n\n#### Current Portfolio\n\nWhen running the application, we can see here that our portfolio is at a **$1272.8 USD** unrealized loss with a total value of **$2144.4 USD** and is composed exclusively of **TSLA** shares.\n\n\u003cp align = \"center\"\u003e\n    \u003cimg src=\"Images/SQLite/Current_Portfolio.jpg\" width=\"60%\" height=\"60%\" title=\"Current Portfolio\"\u003e\n\u003c/p\u003e\n\n### SQLite Database\n\nWe have included the **SQL** tables in the [(`stock_trades.db`)](stock_trades.db) **SQLite** database.\n\nWe run the `sqlite3 stock_trades.db` and `.tables` commands to identify our table names as specified in the [(`market.py`)](market.py) and [(`portfolio.py`)](portfolio.py) modules.\n\n\u003cp align = \"center\"\u003e\n    \u003cimg src=\"Images/SQLite/SQLite_Tables.jpg\" width=\"80%\" height=\"80%\" title=\"SQLite Tables\"\u003e\n\u003c/p\u003e\n\nLet's query the `Muntakim_balances` table.\n\n\u003cp align = \"center\"\u003e\n    \u003cimg src=\"Images/SQLite/Muntakim_balances.jpg\" width=\"80%\" height=\"80%\" title=\"Muntakim_balances Table Data\"\u003e\n\u003c/p\u003e\n\nWe can see here that our **TSLA** balance (i.e. deposited amount) is **$3416.2**. This is consistent with the data from the portfolio visualization.\n\n## Demonstration\n\nHere is a quick demonstration of the application and creating a new portfolio.\n\nhttps://user-images.githubusercontent.com/52113009/197423041-074e3278-a808-49dd-a7a9-8ad1b2a625b8.mp4\n\n## Credit\n\nThe following links were consulted as reference in this exploration.\n\n* [NeuralNine Youtube Channel](https://www.youtube.com/playlist?list=PL7yh-TELLS1HJzPsb6Xjdse2zbyQ-ocDH)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipto9999%2Fstock_portfolio_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdipto9999%2Fstock_portfolio_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipto9999%2Fstock_portfolio_app/lists"}