Yangami

导航

 

2021年8月12日

摘要: “归纳拓展维度,演绎拓展深度”,高维度看低维度如同降维打击。在投资中深度可以看作指标、算法,维度可以看作另类数据、多样资产。在深度与维度之外还有一层级别,什么是级别,级别就是在海滩上看大海与在飞机上看大海的区别,高级别者透视低级别者如同降维打击。GEB强调的高层次与低层次之间的规律就是级别的体现,“ 阅读全文
posted @ 2021-08-12 21:22 Yangami 阅读(336) 评论(0) 推荐(0)
 

2021年6月1日

摘要: #获取指定周期的日期列表 'W、M、Q' def get_period_date(peroid,start_date, end_date): #设定转换周期period_type 转换为周是'W',月'M',季度线'Q',五分钟'5min',12天'12D' stock_data = get_pri 阅读全文
posted @ 2021-06-01 22:35 Yangami 阅读(56) 评论(0) 推荐(0)
 
摘要: def qujizhi(data): Qu,Ql=np.percentile(data,0.75),np.percentile(data,0.25) a_min,a_max=Ql-1.5*(Qu-Ql),Qu+1.5*(Qu-Ql) data=np.clip(data,a_min,a_max) re 阅读全文
posted @ 2021-06-01 20:32 Yangami 阅读(76) 评论(0) 推荐(0)
 
摘要: dic={} for st in set([i[0] for i in pd.Panel(df_factor_pre_train).to_frame().index.tolist()]): df=pd.Panel(df_factor_pre_train).to_frame().query('code 阅读全文
posted @ 2021-06-01 20:30 Yangami 阅读(93) 评论(0) 推荐(0)
 

2020年12月25日

摘要: df.resample('1h',on='news_time').sum().emo 阅读全文
posted @ 2020-12-25 21:45 Yangami 阅读(171) 评论(0) 推荐(0)
 

2020年12月10日

摘要: np.random.permutation(len(df)) 随机训练样本的方法 阅读全文
posted @ 2020-12-10 22:01 Yangami 阅读(121) 评论(0) 推荐(0)
 
摘要: 1 if not p1.empty: 2 pass 3 else: 4 p1_weekend = datetime.fromtimestamp(unix-unix_weekend).strftime("%Y-%m-%d") 5 p1 = get_price(index[each],start_dat 阅读全文
posted @ 2020-12-10 21:30 Yangami 阅读(899) 评论(0) 推荐(0)
 

2020年9月27日

摘要: for k , v in dic.items(): print(k,v) 这种办法速度慢 阅读全文
posted @ 2020-09-27 14:38 Yangami 阅读(105) 评论(0) 推荐(0)
 
摘要: 文档中如是写: Panel.dropna(axis=0, how='any', inplace=False) Drop 2D from panel, holding passed axis constant. Parameters: axis : int, default 0 Axis to hol 阅读全文
posted @ 2020-09-27 11:15 Yangami 阅读(127) 评论(0) 推荐(0)
 

2019年6月7日

摘要: 本地代码是.ipynb格式的转换到博客上很麻烦,这里展示部分代码,了解更多可以查看我的git-hub:https://github.com/Yangami/Python-for-Statisticians/tree/master/Numpy 股票数据分析 股票数据分析 股票数据分析 股票数据分析 任 阅读全文
posted @ 2019-06-07 08:48 Yangami 阅读(431) 评论(0) 推荐(0)