29 lines
674 B
Python
29 lines
674 B
Python
#Get stock symbols in a file
|
|
#Get daily quote at end of day
|
|
#Send email, see Jupyter thing on other laptop for sending email
|
|
|
|
#Quandl no more data after 2018 for some reason
|
|
|
|
import quandl
|
|
import numpy as np
|
|
import yfinance as yf
|
|
import plotly.graph_objects as go
|
|
|
|
#Quandl test
|
|
quandl.ApiConfig.api_key = "sEj_5XNt1kyxi27p5nre"
|
|
amazon = quandl.get("WIKI/AMZN")
|
|
print(amazon.head())
|
|
print(amazon.tail(10))
|
|
|
|
#Yfinance tests
|
|
df = yf.download("TSLA", start="2018-11-01", end="2020-10-18", interval="1d")
|
|
fig = go.Figure(
|
|
data=go.Ohlc(
|
|
x=df.index,
|
|
open=df["Open"],
|
|
high=df["High"],
|
|
low=df["Low"],
|
|
close=df["Close"],
|
|
)
|
|
)
|
|
fig.show() |