File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import yfinance as yf
2+ import streamlit as st
3+ import pandas as pd
4+
5+ st .write ("""
6+ # Simple Stock Price App
7+
8+ Shown are the stock closing price and volume of Google!
9+
10+ """ )
11+
12+ # https://towardsdatascience.com/how-to-get-stock-data-using-python-c0de1df17e75
13+ #define the ticker symbol
14+ tickerSymbol = 'GOOGL'
15+ #get data on this ticker
16+ tickerData = yf .Ticker (tickerSymbol )
17+ #get the historical prices for this ticker
18+ tickerDf = tickerData .history (period = '1d' , start = '2010-5-31' , end = '2020-5-31' )
19+ # Open High Low Close Volume Dividends Stock Splits
20+
21+ st .line_chart (tickerDf .Close )
22+ st .line_chart (tickerDf .Volume )
Original file line number Diff line number Diff line change 1+ import yfinance as yf
2+ import streamlit as st
3+ import pandas as pd
4+
5+ st .write ("""
6+ # Simple Stock Price App
7+
8+ Shown are the stock **closing price** and ***volume*** of Google!
9+
10+ """ )
11+
12+ # https://towardsdatascience.com/how-to-get-stock-data-using-python-c0de1df17e75
13+ #define the ticker symbol
14+ tickerSymbol = 'GOOGL'
15+ #get data on this ticker
16+ tickerData = yf .Ticker (tickerSymbol )
17+ #get the historical prices for this ticker
18+ tickerDf = tickerData .history (period = '1d' , start = '2010-5-31' , end = '2020-5-31' )
19+ # Open High Low Close Volume Dividends Stock Splits
20+
21+ st .write ("""
22+ ## Closing Price
23+ """ )
24+ st .line_chart (tickerDf .Close )
25+ st .write ("""
26+ ## Volume Price
27+ """ )
28+ st .line_chart (tickerDf .Volume )
You can’t perform that action at this time.
0 commit comments