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秒后跳转登录页面...
玉兔呈祥:2019年08月23日操盘计划(1)...
玉兔呈祥:2019年07月26日操盘计划(1)...
移动端课程