This project aims to create a financial dashboard containing Yahoo Finance stock information.
In this project, we used many Python libraries such as :
- Ploltly
- Pandas
- Streamlit
- Yahoo Finance
- Datetime
To design this project we opted for a Python library named Streamlit that allows users to design their web application using Python. The advantages of Streamlit are:
- 👌 Simplicity
- 📈 Integrated with data science libraries
- 🆕 Automatic updates
This project is composed of 4 tabs:
- Tab1: Display company info
- Tab2: Display company summary
- Tab3: Display company chart
- Tab4: Compared between companies' stocks
If you want to retrieve data directly from Yahoo Finance you will face this problem:
Yahoo is blocking you and does not allow data retrieval.
To avoid this problem you need to use Yahoo Finance API:
API will provide to Yahoo Finance:
-
User-Agent: This will allow the website to authenticate the user by providing a web browser and it is version and type of operating system used.
example: Mozilla/5.0 (Windows NT 6.1; Win64; x64)
-
Cookie: A cookie will allow the website to remember the user on each visit
-
Crumb: It is a token that will protect the user from Cross-site forgery which is a cyber attack that will execute a command on behalf of the user. By using this token we will ensure that each command executed comes from a trusted part.
Credit: [ranaroussi] (ranaroussi/yfinance#1729)
The client needs to enter company Ticker and the desired interval period.
After entering the desired data the user chooses one of the 4 tabs:
This section displays companies' data from phones, sectors of activity, and countries....
This section will display a summary of the company:
This section is crucial in the app:
It will allow the user to display according to data entered in the desired chart ( Candlestick, Line chart, Bar chart) to display company stocks.
- Candlestick + Bar charts
- Line + Bar charts
- Metrics
PS: The user can use the sidebar to choose the color of the bar chart.
This section allows the user to enter different Tickers and compare the stocks displayed in the line chart.
Thank you for your attention!
Happy Coding 😊