Skip to content

Instantly share code, notes, and snippets.

@ShaneLee
Last active December 27, 2019 15:34
Show Gist options
  • Save ShaneLee/d3dbde63094748aa387016c2e2022bff to your computer and use it in GitHub Desktop.
Save ShaneLee/d3dbde63094748aa387016c2e2022bff to your computer and use it in GitHub Desktop.
def get_data(stock):
data = pd.DataFrame()
if stock['type'] == 'index':
data = wb.DataReader(stock['ticker'], 'stooq', start=START_DATE)['Close']
return get_simulation(data)
data = wb.DataReader(stock['ticker'], 'yahoo', start=START_DATE)['Adj Close']
return get_simulation(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment