We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We can simply calculate factor scores for each asset in a universe, where LEAN manages the required dataset and rebalancing for us.
class FactorAlgorithm(QCAlgorithm): def __init__(self): universe_settings.resolution = Resolution.DAILY universe = self.add_universe( lambda fundamentals: [f.symbol for f in sorted(fundamentals, key=lambda f: f.market_cap)[-10:]] ) universe.add_factors([InverseCorrelation(252, Field.OPEN)]) class InverseCorrelation(CrossAssetFactor): def update(self, data): factor_value_by_symbol = 1/data.dropna(axis=1).corr().abs().sum() return factor_value_by_symbol / factor_value_by_symbol.sum()
Not currently supported
N/A
master
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
We can simply calculate factor scores for each asset in a universe, where LEAN manages the required dataset and rebalancing for us.
Actual Behavior
Not currently supported
Potential Solution
N/A
Reproducing the Problem
System Information
Checklist
master
branchThe text was updated successfully, but these errors were encountered: