Final project for Intro to CS class.

Overview

Financial Analysis Web App

https://share.streamlit.io/mayurk1/fin-web-app-final-project/webApp.py

1. Project Description

This project is a technical analysis web app made using the Streamlit framework. It allows for a user to perform various analysis methods given a ticker and input parameters. The following indicators are supported: Moving Average, Exponential Moving Average, and Moving Average Convergence Divergence. Additionally, a function to plot Moving Average crossovers of user provided windows is also provided (extra credit?). The app allows for charts with the range of current date and up to 999 days in the past.

2. Project Selection

I chose this project as I enjoy analyzing stock data and wanted to learn more about making a web app with visualizations. Through making this app, I learned the basics of web app development and how to use various frameworks. Additionally, I leveraged Python libraries and APIs to collect stock data. I learned how to develop a data collection and analysis pipeline using a stock data API. Finally, I learned how to apply Classes to a real world application through this project.

3. Future Considerations

If I had an opportunity to redo this project, I would make the visualizations more robust by allowing for user manipulation. Further, in order to improve performance and memory, I would implement a caching feature to prevent unnecessary API calls. These changes would be made in order to improve the quality of the data visualizations and provide a long term solution for this web app given the limitations of the free API. Further, I would use a more robust API as the current one is limited in number of calls and does not adjust historic data for stock split prices.

4. How to Run the Web App

The web app is currently hosted on the Streamlit servers at the following URL:

https://share.streamlit.io/mayurk1/fin-web-app-final-project/webApp.py

No additional setup or changes should be needed in order for the app to run.

How to Use the Web App

To start, enter a ticker in the text box in the sidebar (if the sidebar is not visible, press the arrow in the top left corner). SPY is set as the default value if no input is provided. Next, select the type of Technical Analysis you would like to do. Depending on the selection, a set of parameters will be provided below. Next, provide the delta value, which is the number of days from the current day to collect data on. The application will pull the daily adjusted closing values of the provided ticker. Next, adjust the sliders for the given Technical Analysis selection. There are default values for some TAs. In order to revert them, select a different dropdown item and select the original again.

Please wait ~1 second after hitting 'Run' for the app the update.

API Limitations: due to the limitations of the (free) API, historic stock price data is NOT retroactively updated for stock splits.

NOTE: please enter logical selections, if a specific chart is not possible, the system will not graph the line. Hit 'Run' to create a new graph after updating the inputs.

If an incorrect ticker is provided, the system will display an error message. In order to clear this, provide valid inputs in the sidebar and hit 'Run' again.

5. Challenges

The main challenge of this project was finding and using an appropriate framework. Having tried Flask and Django before settling on Streamlit, the process of creating a web app can be very tedious. Further, creating and setting up the proper logic was difficult as I had to account for various user inputs and selections, without having the entire page crash. One of the biggest issues I faced was a proper implementation of updating the sidebar fields given the user selection. I overcame these issues by implementing a Streamlit form in order to prevent user inputs from conflicting with each other.

6. Cited Sources

The official documentations of the Streamlit, Alpaca, and numpy APIs were extensively used. The Streamlit documentation greatly helped in the formulation of the web app elements and implementation of the logic. The Alpaca Markets API and documentation was used in order to pull market data. Finally, the third resource was used to assist in the creation of moving average plots from stock data.

https://docs.streamlit.io/

https://alpaca.markets/docs/

https://www.datacamp.com/community/tutorials/moving-averages-in-pandas

Description of Files

webApp.py

Main web app driver file. Contains the page objects and form logic.

tradingMethods.py

Class to perform the technical analysis functions. Takes in ticker, deltas, and related features.

config.py

Holds references to API keys.

requirements.txt

Necessary Python libraries.

Owner
Mayur Khanna
Biomedical Informatics M.S. Candidate at University of Chicago | Python | JavaScript | Bioinformatics
Mayur Khanna
Hyperbolic Procrustes Analysis Using Riemannian Geometry

Hyperbolic Procrustes Analysis Using Riemannian Geometry The code in this repository creates the figures presented in this article: Please notice that

Ronen Talmon's Lab 2 Jan 08, 2023
An efficient PyTorch library for Global Wheat Detection using YOLOv5. The project is based on this Kaggle competition Global Wheat Detection (2021).

Global-Wheat-Detection An efficient PyTorch library for Global Wheat Detection using YOLOv5. The project is based on this Kaggle competition Global Wh

Chuxin Wang 11 Sep 25, 2022
[CVPR 2021] MetaSAug: Meta Semantic Augmentation for Long-Tailed Visual Recognition

MetaSAug: Meta Semantic Augmentation for Long-Tailed Visual Recognition (CVPR 2021) arXiv Prerequisite PyTorch = 1.2.0 Python3 torchvision PIL argpar

51 Nov 11, 2022
Official code of Team Yao at Multi-Modal-Fact-Verification-2022

Official code of Team Yao at Multi-Modal-Fact-Verification-2022 A Multi-Modal Fact Verification dataset released as part of the De-Factify workshop in

Wei-Yao Wang 11 Nov 15, 2022
Locally Enhanced Self-Attention: Rethinking Self-Attention as Local and Context Terms

LESA Introduction This repository contains the official implementation of Locally Enhanced Self-Attention: Rethinking Self-Attention as Local and Cont

Chenglin Yang 20 Dec 31, 2021
This application explain how we can easily integrate Deepface framework with Python Django application

deepface_suite This application explain how we can easily integrate Deepface framework with Python Django application install redis cache install requ

Mohamed Naji Aboo 3 Apr 18, 2022
Official Repository for our ECCV2020 paper: Imbalanced Continual Learning with Partitioning Reservoir Sampling

Imbalanced Continual Learning with Partioning Reservoir Sampling This repository contains the official PyTorch implementation and the dataset for our

Chris Dongjoo Kim 40 Sep 18, 2022
Full Transformer Framework for Robust Point Cloud Registration with Deep Information Interaction

Full Transformer Framework for Robust Point Cloud Registration with Deep Information Interaction. arxiv This repository contains python scripts for tr

12 Dec 12, 2022
This repository contains the code for TABS, a 3D CNN-Transformer hybrid automated brain tissue segmentation algorithm using T1w structural MRI scans

This repository contains the code for TABS, a 3D CNN-Transformer hybrid automated brain tissue segmentation algorithm using T1w structural MRI scans. TABS relies on a Res-Unet backbone, with a Vision

6 Nov 07, 2022
This is an (re-)implementation of DeepLab-ResNet in TensorFlow for semantic image segmentation on the PASCAL VOC dataset.

DeepLab-ResNet-TensorFlow This is an (re-)implementation of DeepLab-ResNet in TensorFlow for semantic image segmentation on the PASCAL VOC dataset. Up

19 Jan 16, 2022
Denoising Diffusion Probabilistic Models

Denoising Diffusion Probabilistic Models Jonathan Ho, Ajay Jain, Pieter Abbeel Paper: https://arxiv.org/abs/2006.11239 Website: https://hojonathanho.g

Jonathan Ho 1.5k Jan 08, 2023
Interacting Two-Hand 3D Pose and Shape Reconstruction from Single Color Image (ICCV 2021)

Interacting Two-Hand 3D Pose and Shape Reconstruction from Single Color Image Interacting Two-Hand 3D Pose and Shape Reconstruction from Single Color

75 Dec 02, 2022
Simulating Sycamore quantum circuits classically using tensor network algorithm.

Simulating the Sycamore quantum supremacy circuit This repo contains data we have obtained in simulating the Sycamore quantum supremacy circuits with

Feng Pan 46 Nov 17, 2022
Cancer Drug Response Prediction via a Hybrid Graph Convolutional Network

DeepCDR Cancer Drug Response Prediction via a Hybrid Graph Convolutional Network This work has been accepted to ECCB2020 and was also published in the

Qiao Liu 50 Dec 18, 2022
AdaMML: Adaptive Multi-Modal Learning for Efficient Video Recognition

AdaMML: Adaptive Multi-Modal Learning for Efficient Video Recognition [ArXiv] [Project Page] This repository is the official implementation of AdaMML:

International Business Machines 43 Dec 26, 2022
A Pythonic library for Nvidia Codec.

A Pythonic library for Nvidia Codec. The project is still in active development; expect breaking changes. Why another Python library for Nvidia Codec?

Zesen Qian 12 Dec 27, 2022
Code release for ConvNeXt model

A ConvNet for the 2020s Official PyTorch implementation of ConvNeXt, from the following paper: A ConvNet for the 2020s. arXiv 2022. Zhuang Liu, Hanzi

Meta Research 4.6k Jan 08, 2023
Pytorch implementation of face attention network

Face Attention Network Pytorch implementation of face attention network as described in Face Attention Network: An Effective Face Detector for the Occ

Hooks 312 Dec 09, 2022
Improving Factual Consistency of Abstractive Text Summarization

Improving Factual Consistency of Abstractive Text Summarization We provide the code for the papers: "Entity-level Factual Consistency of Abstractive T

61 Nov 27, 2022
Recommendationsystem - Movie-recommendation - matrixfactorization colloborative filtering recommendation system user

recommendationsystem matrixfactorization colloborative filtering recommendation

kunal jagdish madavi 1 Jan 01, 2022