indicators.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:machine-learning-for-trading 作者: arjun-joshua 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号