<jupyter_start><jupyter_text>Merged "SET_EOD_2010_2016" to single CSV file<jupyter_code>data = pd.read_csv('merged_2014_2017.csv')
data['Date'] = pd.to_datetime(data['Date'], format='%Y-%m-%d')
data.head()
data.info()
stock = data.loc[(data['Date'].dt.year==2016) & (data['Ticker']=='ADVANC')]
stock = stock.set_index('Date')
stock.drop('Volume', axis=1).plot()<jupyter_output><empty_output><jupyter_text>Time Series Plot with datetime Objects<jupyter_code>data = [go.Scatter(x=stock.index, y=stock.Close)]

iplot(data)<jupyter_output><empty_output><jupyter_text>Time Series With Rangeslider<jupyter_code>trace_high = go.Scatter(
    x=stock.index,
    y=stock.High,
    name = "ADVANC High",
    line = dict(color = '#17BECF'),
    opacity = 0.8)

trace_low = go.Scatter(
    x=stock.index,
    y=stock.Low,
    name = "ADVANC Low",
    line = dict(color = '#7F7F7F'),
    opacity = 0.8)

data = [trace_high,trace_low]

layout = dict(
    title='Time Series with Rangeslider',
    xaxis=dict(
        rangeselector=dict(
            buttons=list([
                dict(count=1,
                     label='1m',
                     step='month',
                     stepmode='backward'),
                dict(count=6,
                     label='6m',
                     step='month',
                     stepmode='backward'),
                dict(step='all')
            ])
        ),
        rangeslider=dict(),
        type='date'
    )
)

fig = dict(data=data, layout=layout)
iplot(fig, filename = "Time Series with Rangeslider")<jupyter_output><empty_output><jupyter_text>Candlestick Charts<jupyter_code>trace = go.Candlestick(x=stock.index,
                       open=stock.Open,
                       high=stock.High,
                       low=stock.Low,
                       close=stock.Close)

iplot([trace], filename='simple_candlestick')
sma35 = SMA(stock, timeperiod=35, price='Close')
sma15 = SMA(stock, timeperiod=15, price='Close')
sma15.tail()
trace_vol = go.Bar(
            x=stock.index,
            y=stock.Volume
    )

iplot([trace_vol])
trace_SMA15 = go.Scatter(
    x=sma15.index,
    y=sma15.values,
    name = "ADVANC SMA15",
    line = dict(color = '#17BECF'),
    opacity = 0.8)

trace_SMA35 = go.Scatter(
    x=sma35.index,
    y=sma35.values,
    name = "ADVANC SMA35",
    line = dict(color = '#7F7F7F'),
    opacity = 0.8)

data = [trace_SMA15, trace_SMA35, trace]

layout = dict(
    title='Time Series with Rangeslider',
    xaxis=dict(
        rangeselector=dict(
            buttons=list([
                dict(count=1,
                     label='1m',
                     step='month',
                     stepmode='backward'),
                dict(count=6,
                     label='6m',
                     step='month',
                     stepmode='backward'),
                dict(step='all')
            ])
        ),
        rangeslider=dict(),
        type='date'
    )
)

fig = dict(data=data, layout=layout)
iplot(fig, filename = "Time Series with Rangeslider")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1437929905011464, 'fraction_numerical': 0.02522109400589584, 'mean_word_length': 2.224920802534319, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '22683', 'license': 'Apache-2.0', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1036, 'n_words': 163, 'path': 'data_preprocess.ipynb', 'repo_name': 'pcrete/stock_prediction_using_contextual_information', 'size': '3053'}