mattools.py 文件源码

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

项目:finance_news_analysis 作者: pskun 项目源码 文件源码
def get_mat_movingstd(tsmat, periods):
    mstd = np.empty(shape = tsmat.shape)
    mstd.fill(np.NAN)
    for i in xrange(tsmat.shape[0]):
        j = i - periods + 1
        if j < 0:
            j = 0
        mstd[i,:] = np.nanstd(tsmat[j:i+1,:], 0)
    return mstd
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号