qlib icon indicating copy to clipboard operation
qlib copied to clipboard

Label calculation

Open igor17400 opened this issue 2 years ago • 3 comments

❓ Questions and Help

In the following documentation it says the following

In the Alpha158, Qlib uses the label Ref($close, -2)/Ref($close, -1) - 1 that means the change from T+1 to T+2, rather than Ref($close, -1)/$close - 1, of which the reason is that when getting the T day close price of a china stock, the stock can be bought on T+1 day and sold on T+2 day.

However, in Aplha360 should we use the same equation - Ref($close, -2)/Ref($close, -1) - 1 - for label? Or should we use Ref($close, -1)/$close - 1 ?

In this other page from the documentation it says,

  • For ic

The Pearson correlation coefficient series between label and prediction score. In the above example, the label is formulated as Ref($close, -1)/$close - 1. Please refer to Data Feature for more details.

Are those two formulas related? Shouldn't them be the same?

igor17400 avatar Apr 16 '22 19:04 igor17400

Thanks for your reporting. @SunsetWolf will fix this BUG.

you-n-g avatar May 06 '22 09:05 you-n-g

@you-n-g and @SunsetWolf if it is of any help I can fix this documentation. I just need to undersand what exactly is wrong.

Is it the IC definition? Or the equation that should be used in Aplha360 which should be Ref($close, -1)/$close - 1 ?

igor17400 avatar May 10 '22 21:05 igor17400

Sorry for taking so long to reply to you, I have made changes to this issue in this PR.

SunsetWolf avatar Jun 08 '22 04:06 SunsetWolf

This issue is stale because it has been open for three months with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

github-actions[bot] avatar Sep 06 '22 06:09 github-actions[bot]