失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > python-大智慧price_oscillator指标

python-大智慧price_oscillator指标

时间:2024-04-24 21:27:40

相关推荐

python-大智慧price_oscillator指标

"""Created on Tue May 23 08:57:02 @author: yunjinqi E-mail:yunjinqi@ Differentiate yourself in the world from anyone else."""import pandas as pdimport numpy as npimport datetimeimport time#获取数据df=pd.read_csv('C:/Users/HXWD/Desktop/000001.csv',encoding='gbk')df.columns=['date','code','name','close','high','low','open','preclose','change','change_per','volume','amt']df=df[['date','open','high','low','close','volume','amt']]df.head()def get_price_oscillator(df,short=12,long=26):df['price_oscillator']=100*((df['close'].rolling(short).mean()-df['close'].rolling(long).mean())/df['close'].rolling(short).mean())return dfget_price_oscillator(df)df.tail()

注:需要单独编写文华财经,金字塔,大智慧,通达信,TB,Python平台的指标、策略等,请联系扣扣1733505732,兼职时间:工作日下午18:00-22:00,节假日。

注:计算大量数据,请修改算法。

如果觉得《python-大智慧price_oscillator指标》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。