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

因子研究 alphalens 是不是daily rebalance? 是否可以調整成搭配因子的頻率? #8

Closed
tej87681088 opened this issue Sep 11, 2023 · 0 comments
Labels
alphalens question Further information is requested

Comments

@tej87681088
Copy link
Contributor

例: 如果是測財報的資料,會變成一年四次rebalance,然後只看第一分群頭組(equal weight)跟最後一分群投組(equal weight)兩個投組的分群效果。

  • rebalance說明,參考TQuant-Lab/lecture/Alphalens .ipynb at main · tejtw/TQuant-Lab (github.com)的持有期報酬率段敘述。
  • 將alphalens.utils.get_clean_factor_and_forward_returns傳入的factor及prices調整為季頻率,並且將periods設定為(1,),理論上就可以得到季的分群效果。
    • 但legend及標題文字還是會顯示'1D',因為這是alphalens的機制。
    • 部分圖形會顯示1 month moving avg的結果,例如:plot_mean_quantile_returns_spread_time_series,在factor及prices調整為季頻率下,1 month moving avg的結果會變成​過去22季的平均。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alphalens question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants