def defineData(startDate = '01-01-2008', stopDate = '31-12-2009', symList = ['AAPL']):
"""
@Summary: Create a Series of a single stock price
@param startDate: starting date
@param stopDate: end date
@param symList: List of a single stock symbol
@returns a Series containing the prices with the specified dates as indices
"""
dates = pd.date_range(startDate, stopDate)
df = get_data(symList, dates)
data = df.ix[:,1] # First column is SPY by default
return data
indicators.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录