Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha10公式有疑问 #2

Closed
huangdongqin opened this issue Aug 9, 2022 · 4 comments
Closed

Alpha10公式有疑问 #2

huangdongqin opened this issue Aug 9, 2022 · 4 comments

Comments

@huangdongqin
Copy link

image
原先这个RANK是没有参数的,源码中传入5应该被忽略
原先研报中是否是
先取5日MAX,再取RANK
(RANK(TSMAX(((RET < 0) ? STD(RET, 20) : CLOSE)^2),5)))

@huangdongqin
Copy link
Author

image
image
估计写研报的也是困了

@wukan1986
Copy link
Owner

t1 = IF((RET < 0), STD(RET, 20), CLOSE)

有以下可能:

  1. (RANK(MAX(t1 ** 2), 5)) # 的确是错的
  2. (RANK(MAX(t1 ** 2, 5))) # 即求的是MAX(..., 5)
  3. (RANK(TSMAX(t1 ** 2, 5))) # 即求的是TSMAX(..., 5)

用哪种还不确定

@wukan1986
Copy link
Owner

我记得网上说Alpha191大量复制于Alpha101,所以我又去找了下101的写法

Alpha#1: (rank(Ts_ArgMax(SignedPower(((returns < 0) ? stddev(returns, 20) : close), 2.), 5)) - 0.5)

所以是TSMAX的可能性更大,不过101中是ts_argmax,这还是有区别的。

如果你也认同是TSMAX,我之后将修改一下

@huangdongqin
Copy link
Author

我记得网上说Alpha191大量复制于Alpha101,所以我又去找了下101的写法

Alpha#1: (rank(Ts_ArgMax(SignedPower(((returns < 0) ? stddev(returns, 20) : close), 2.), 5)) - 0.5)

所以是TSMAX的可能性更大,不过101中是ts_argmax,这还是有区别的。

如果你也认同是TSMAX,我之后将修改一下

我赞同改成RANK(TSMAX(t1**2,5))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants