Notebook
In [9]:
import talib
import matplotlib.pyplot as pyplot
import pandas as pd
In [10]:
# Get year-to-date closing price data for TSLA
data = get_pricing(
    'TSLA',
    fields='close_price',
    start_date="2017-01-01", 
    end_date="2017-06-15", 
    frequency='daily'
)
data.plot(use_index=False)
pyplot.title('TSLA Close Price')
Out[10]:
<matplotlib.text.Text at 0x7fca433e4350>
In [11]:
# Compute RSI using TSLA closing price Series
tsla_RSI = talib.RSI(data)
In [12]:
# Plot RSI
pyplot.plot(tsla_RSI)
pyplot.title('TSLA RSI')
Out[12]:
<matplotlib.text.Text at 0x7fca431d59d0>
In [13]:
s2 = pd.Series(tsla_RSI)
s2.index = data.index
In [15]:
s2.plot()
Out[15]:
<matplotlib.axes._subplots.AxesSubplot at 0x7fca4323e190>