专栏名称: 机器学习研究会
机器学习研究会是北京大学大数据与机器学习创新中心旗下的学生组织,旨在构建一个机器学习从事者交流的平台。除了及时分享领域资讯外,协会还会举办各种业界巨头/学术神牛讲座、学术大牛沙龙分享会、real data 创新竞赛等活动。
目录
相关文章推荐
爱可可-爱生活  ·  【Whispo:一款AI驱动的语音听写工具, ... ·  2 天前  
爱可可-爱生活  ·  欢迎收听「爱可可AI前沿快报」,用最通俗的语 ... ·  5 天前  
宝玉xp  ·  //@梁斌penny:没错,认罪认罚是上策, ... ·  5 天前  
新机器视觉  ·  YOLOv8预测参数详解(全面详细、重点突出 ... ·  6 天前  
新机器视觉  ·  YOLOv8预测参数详解(全面详细、重点突出 ... ·  6 天前  
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

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