How to use cufflinks?

288 Views Asked by At

I tried the following code in ipython3. But I don't see any figure plotted. Could anybody let me know how to make the figure visible? Thanks.

import pandas as pd
apple_df = pd.read_csv('AAPL.csv', index_col=0, parse_dates=True)
dt_range = pd.date_range(start="2021-05-01", end="2020-05-31")
apple_df = apple_df[apple_df.index.isin(dt_range)]
apple_df.head()

import cufflinks as cf
qf=cf.QuantFig(apple_df,title='Apple Quant Figure',legend='top',name='GS')

qf.add_bollinger_bands(periods=20,boll_std=2,colors=['magenta','grey'],fill=True)
qf.add_sma([10,20],width=2,color=['green','lightgreen'],legendgroup=True)
qf.add_rsi(periods=20,color='java')

qf.iplot()

https://coderzcolumn.com/tutorials/data-science/candlestick-chart-in-python-mplfinance-plotly-bokeh

0

There are 0 best solutions below