❤️ Sentiment Alpha 情感类阿尔法因子

Sentiment data quantifies the emotions of the masses towards a stock or market in general. This is based on data collected from various online platforms including newspapers, news websites, social media (Facebook, Twitter), blogs, and discussion forums.

This investor psychology can be a leading indicator of stock price movements.

BRAIN provides sentiment and social media data, which are data fields that quantify whether mentions of companies across various sources or SNS are negative/positive through natural language processing analysis.

情感数据用于量化大众对某只股票或整体市场的情绪倾向。这类数据采集自各类线上平台,包括报纸、新闻网站、社交媒体(脸书、推特)、博客以及论坛。

投资者的这种心理倾向,可作为股价走势的先行指标

BRAIN 平台提供情感数据与社交媒体数据,这两类数据字段会通过自然语言处理分析,量化不同渠道或社交平台中相关企业舆情的正负倾向。

🔊 Volume-Based Sentiment Alpha 量价结合型情感阿尔法因子

You can find effective signals by utilizing the relationship between volume and sentiment. Abnormally frequent mentions of a particular stock in internet spaces, compared to its trading volume, might be a signal of future price movements. This hypothesis is based on the insight that excessive attention can often be a signal of overheating/undervaluation.

你可以通过挖掘成交量与市场情绪的关联关系,捕捉有效的交易信号。当某只股票在网络平台的舆情提及频次,与其实际成交量出现异常偏离时,这一现象或可作为预判股价未来走势的信号。

这一假设的核心逻辑在于:市场对个股的关注度若出现过度倾斜,往往可以视作判断个股处于过热状态或估值洼地的信号。

🧮 ts_regression(y, x, lookback_days, rettype=0) Operator

Given a set of two variables’ values (X: the independent variableY: the dependent variable) over a course of lookback_days, an approximating linear function can be defined, such that sum of squared errors on this set assumes minimal value. Through this operation, you can determine the level of Y in relation to X, considering the trend over the lookback_days. By setting the rettype (the default is 0), you can use other parameters related to linear regression in addition to the Error Term.

ts_regression (y, x, lookback_days, rettype=0) 算子

该算子会基于回溯窗口期(lookback_days) 内的两组变量值(X:自变量,Y:因变量),拟合出一条最优线性函数 —— 即让该组数据的残差平方和最小化的线性近似函数。

通过这一算子,你可结合回溯窗口期内的趋势特征,判定 Y 变量相对于 X 变量的变动水平。通过设置rettype参数(默认值为 0),除残差项(Error Term) 外,你还可调取线性回归的其他相关参数。

🔥 Let's try it out!

scl12_buzz is a data field that quantifies the amount of sentiment. It represents how frequently each stock is being mentioned on the internet. While there can be various ways to compare how much sentiment exists compared to transaction volume (volume) over the lookback_days, as we've seen before, in this case, using ts_regression(y, x, lookback_days) is the most effective method. Try comparing these two data fields using ts_regression. If the direction is different from what you expected, you can flip the PnL shape by adding a - in front of the Alpha.

scl12_buzz 是用于量化舆情情感规模的核心数据字段,具体表征每只股票在网络平台的提及频次。正如我们此前探讨的,尽管有多种方法可对比回溯窗口期(lookback_days)内舆情热度与成交量(volume)的匹配度,但在本场景下,使用 ts_regression(y, x, lookback_days) 是最有效的方法。

你可尝试通过该算子对这两类数据字段进行回归分析:若最终得出的收益曲线(PnL)方向与预期不符,只需在阿尔法因子(Alpha)前添加负号(-),即可翻转收益曲线的形态。

🔥Task: Try simulating an Alpha comparing the two data fields scl12_buzz and volume using ts_regression.

Hint: To understand the relative size of scl12_buzz compared to volume, in ts_regression(y,x,lookback_days)scl12_buzz should be y and volume should be x.

Answer: ts_regression(-scl12_buzz,volume,250)

🔥任务:尝试通过 ts_regression 算子构建一个阿尔法因子(Alpha),用以对比 scl12_buzzvolume 这两个数据字段的关系。

提示:若要衡量 scl12_buzz 相对于 volume 的相对规模,在 ts_regression(y,x,lookback_days) 中,应将 scl12_buzz 设为因变量(y)、volume 设为自变量(x)。

参考答案

答案ts_regression(-scl12_buzz,volume,250)

 免责声明

本翻译文档基于 WorldQuant BRAIN 平台官方教程(链接:https://platform.worldquantbrain.com/simulate/tutorial)进行翻译,仅用于个人学习、研究使用,不涉及任何商业用途、盈利行为及公开传播行为。

  1. 本翻译文档力求忠实原文含义,但因语言差异、个人理解等因素,可能存在表述偏差。如需精准理解教程内容,请以 WorldQuant BRAIN 平台发布的英文原版教程为准。
  2. 文档中涉及的专业术语、策略方法、操作指引等内容,其知识产权、解释权均归 WorldQuant 相关方所有,本人不享有任何相关权利。
  3. 严禁将本翻译文档用于商业转载、出版发行、付费分享等侵权行为,如违反上述规定,由此产生的一切法律责任、纠纷及后果,均由使用者自行承担,与本翻译者无关。
  4. 本翻译者不对因使用本翻译文档所产生的任何直接或间接损失(包括但不限于数据错误、操作失误、策略失效等)承担责任。

本免责声明的最终解释权归本翻译者所有。

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐