专栏名称: 机器学习研究会
机器学习研究会是北京大学大数据与机器学习创新中心旗下的学生组织,旨在构建一个机器学习从事者交流的平台。除了及时分享领域资讯外,协会还会举办各种业界巨头/学术神牛讲座、学术大牛沙龙分享会、real data 创新竞赛等活动。
目录
相关文章推荐
人工智能那点事  ·  担心的事发生了!可可西里“网红狼”疑被轧死, ... ·  2 天前  
宝玉xp  ·  //@翻译驴://@刘昕RUC:大爷是好大爷 ... ·  2 天前  
爱可可-爱生活  ·  //@爱可可-爱生活:欢迎参与~-20241 ... ·  4 天前  
爱可可-爱生活  ·  「AI说:“优化”是什么?」在我的存在之中, ... ·  4 天前  
51好读  ›  专栏  ›  机器学习研究会

【学习】股票向量:从机器学习到市盈率

机器学习研究会  · 公众号  · AI  · 2017-05-28 20:11

正文



点击上方“机器学习研究会”可以订阅哦
摘要
 

转自:爱可可-爱生活

The post is the first in a series where I learn about ML by applying it to the stock market. You can find the code for this blog post here.


Word2Vec is a simple but surprisingly powerful algorithm.

It builds word vectors to represent word meanings. And it learns these meanings solely by the surrounding words. You can then use these word vectors as the input to make machine learning algorithms perform better and find interesting abstractions.

What happens if we apply Word2Vec to the stock market?

Choosing the Stock2Vec Window

In Word2Vec the window for each word is the surrounding words. For Stock2Vec how should we pick the surrounding stocks for each stock?

The stock market has plenty of variables to choose from: price, volume, moving average, etc. After talking it through with my friend Yuhi, who works in finance, we chose price-to-earnings. Price-to-earnings represents the market’s expectations for the growth of the company.

Hopefully it will learn something!

Building Stock2Vec

While reading the API documentation for Quantopian’s Zipline I came across the Quandl Wiki Dataset which has up to 40 years of end-of-day data for 3000 companies for free. I combined the price data with fundamentals data purchased from Sharadar. Then I used postgres to merge the data. The preprocessing code is here.

I adapted the embeddings project that was part of the Udacity Deep Learning Class I just finished last week :), trained the model on FloydHub, and visualized the results with TensorBoard. You can find the training code here.


链接:

https://medium.com/towards-data-science/stock2vec-from-ml-to-p-e-2e6ba407c24


原文链接:

http://weibo.com/1402400261/F5aFIo6PU?from=page_1005051402400261_profile&wvr=6&mod=weibotime&type=comment#_rnd1495972513908

“完整内容”请点击【阅读原文】
↓↓↓