Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
playing with ipython notebook and yahoo stock data
# -*- coding: utf-8 -*-
# <nbformat>2</nbformat>
# <codecell>
import datetime as dt
import pandas as pd
# <codecell>
symbol = 'vcadx'
starting_value = 10000
# <codecell>
symbol_pd = pd.read_csv('yahoo-data/' + symbol + '.csv', names=None, index_col='Date', parse_dates=True)
symbol_pd = symbol_pd.sort_index()
# <codecell>
adj_close = symbol_pd['Adj Close']
first_price = adj_close.ix[0]
shares = starting_value / first_price
# <codecell>
adj_close = adj_close * shares
# <codecell>
adj_close.plot()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.