Last Updated on April 3, 2023 by mishou
I. Getting a ticker from Yhoo! finance

II. Retriving the data
# create subplots
from plotly.subplots import make_subplots
import plotly.graph_objects as go
fig = make_subplots(rows=3, cols=1,subplot_titles=("Nikkei225","Toyota", "Fast Retailing"))
fig.append_trace(go.Scatter(
x=nikkei225.index,
y=nikkei225.Close,
showlegend=False
), row=1, col=1)
fig.append_trace(go.Scatter(
x=toyota.index,
y=toyota.Close,
showlegend=False
), row=2, col=1)
fig.append_trace(go.Scatter(
x=fastretail.index,
y=fastretail.Close,
showlegend=False
), row=3, col=1)
fig.update_layout(height=600, width=600, title_text="Stacked Subplots")
fig.show()
You can see the full code here:
https://colab.research.google.com/drive/1NSi0_1fubv8lif81swoa-6-7WVS8k1ba?usp=sharing
To be contined.