df1=get_price('600779.XSHG',end_date='2018-05-19', frequency='1m', fields='avg', skip_paused=False, fq='none', count=240) df2=get_price('600779.XSHG',end_date='2018-05-19', frequency='1m', fields=['volume','money'], skip_paused=False, fq='none', count=240)
import pandas as pd series1=df1['avg'] series2=df2['money']/df2['volume'] avg_df=pd.DataFrame({'avg1':series1[:-1],'avg2':series2[:-1]}) avg_df = avg_df.reset_index(drop=True)
avg_df = avg_df.cumsum().apply(lambda x: x/(avg_df.index+1.0))
# avg_df['走势']=df1['avg'].values[:-1]
avg_df.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x7f84843d1e90>
本社区仅针对特定人员开放
查看需注册登录并通过风险意识测评
5秒后跳转登录页面...
交易匠人:震荡行情多耐心,黄金早间有望延续...
交易匠人:黄金震荡回踩1708,有波段机会
借花(感恩节)献佛 感恩回顾
美股再次暴跌,但黄金却无动于衷
移动端课程