-
Notifications
You must be signed in to change notification settings - Fork 1
Home
1. Allows user to manage their stock portfolio
2. Allows developers to leverage AlphaVantage to fetch real time global stock data
3. Uses matplotlib to plot various graphs that user can use to research their stock holdings
4. Leverages tkinter to show meu options, Tree View, right/left click operations, mouse hover operation
5. Various show/hide techniques for plots
PorfolioManager Feature Description
1. I developed this on Win7 using Python 3.8.2 32-bit on Win 7
2. Make sure you have PIP (latest version I have used is 3)
1. Verify by executing:
pip --version
2. If pip isn’t already installed, then first try to bootstrap it from the standard library:
python -m ensurepip --default-pip
3. Ensure pip is up to date
python -m pip install --upgrade pip
3. install following:
1. pip install alpha_vantage
2. pip install pandas
3. pip install matplotlib
4. pip install tkcalendar
4. In addition I have used tkinter module for graphics, which is available as standard library
5. Before you execute Portfolio Manager
1 Create a sub-directory 'scriptdata' in the same folder where you copied the source code (.py files)
2. Get developer key from Alpha Vantage website: https://www.alphavantage.co/support/#support
6. First use of Portfolio Manager
1. Use menu 'Help->Add Key & Data Folder' and provide the Alpha Vantage key & path where you want to keep data files
2. The folder you specify is used to store CSV files retrieved from Alpha Vantage in 'Test' mode of application
7. General description of Portfolio Manager application using alpha vantage to manage stock portfolio & do research
- File->New, Clears opened portfolio, if any, and resets all parameters within the application
- File->Open, Opens an existing portfolio file and render data in tree
- File->Save, Saves current scripts in tree as portfolio to a a CSV format file
- Manage Portfolio->Add New Script, Adds a new script to tree. 1.1 This will popup a dialog box 1.2 User the search combo to find a script 1.3 Provide other informatiion in the entry fields
- Manage portfolio->Delete selected script from portfolio. 2.1 Entire data is deleted from Tree for the currently selected script, but the file is not updated
- Manage portfolio->Get Quote 3.1 Popup a dialog box to research and add a new script 3.2 Search a script using search combo box 3.2 Get current quote from market using Get Quote button 3.3 Add the current script to your portfolio in the memory 3.4 You can see various graphs by selecting the check boxes and clicking Show selected Graphs button
- Manage Portfolio->Refresh selected script from tree. 4.1 This fetches current market price from AlphaVantage and updates the current value for that script 4.2 TO DO: Automate using timer
- Manage Portfolio->Portfolio Performace 5.1 Opens a popup dialog 5.2 Plots a graph for all scripts showing - Performance from the date of purchase to current date
1. Research->Graphs
1.1 Opens a popup dialog
1.2 Allows you to search for a script
1.3 You can provide several parameters depending on the Tech Indicator graph you want to see
1.4 Select the specific Tech Indicator and start date from where you want to see the plot
1.5 This overlaps the graphs you select, allowing you to do comparative research
1.6 You can clear a specific graph or clear all graphs
1.7 You can right click on any graph to select that graph
- Help->Add Key&Data Folder,
- Popus a dialog
- Provide your AlphaVantage key
- Select the folder where you have downloaded files to be used for 'Off-line' mode
- Help-> Test Mode (On/Off). Toggle the test mode. 1.1 In Test mode we use downloaded files to load specific script data. This is helpful during demos and testing 1.2 In online mode all data is fetched from market using AlphaVantage
- Help->Download data (That will be used in Off-line mode)
- Currently you can download data of three BSE stocks/scripts and Apple from NASDAQ
- TO DO: Add a search combo to allows search of a script and then use that script for download
-
Mouse right click->Delete, Deletes the currently selected portfolio entry from tree only. Data is not deleted from opened portfolio file
-
Mouse right click->Modify, Modify selected script from tree. 2.1. Opens a popup dialog
2.2. You can change the quantity, rate, commission etc. Based on the values the cost of investment will be updated
2.3. This will also take current market price and update all current value field in Tree -
Mouse right click->Script Performance.
3.1. Opens a submenu allowing you to select which graph you want to see
3.2. Currently following graphs are shown for the selected script
* Script performance: Plots datewise datewise value of the script
* Candlestick OHLC: plots traditional candlestick graph, shpwing datewise comparison of Open, High, Low and close prices
* Buy & Sell predication: Uses back testing algorithm to plot graph showing when to buy & sell
* Returns: For the selected period this will plot daily and cumulative returns graph
3.3. You can see other Tech Indicator graphs by selecting the specific one that you want to see
* Hover mouse on the plotted line to see the data at that point
* Use Right/Left click on the line to see Detail Graph, Analysis Graphs or you can clear the current graph