Skip to content

Commit 6ccc33c

Browse files
Add files via upload
1 parent 67144ed commit 6ccc33c

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

python/myapp.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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)

python/myapp2.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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)

0 commit comments

Comments
 (0)