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

Beta Indicator Can Get Stuck at Zero #8460

Open
4 tasks done
DerekMelchin opened this issue Dec 12, 2024 · 0 comments · May be fixed by #8466
Open
4 tasks done

Beta Indicator Can Get Stuck at Zero #8460

DerekMelchin opened this issue Dec 12, 2024 · 0 comments · May be fixed by #8466
Labels

Comments

@DerekMelchin
Copy link
Collaborator

Expected Behavior

The Beta indicator is rarely exactly zero.

Actual Behavior

The Beta indicator can get initialized at zero and say there forever.
For example, in this backtest, over 50% of the assets in the universe have a Beta of 0 by the end of the backtest.
image

Potential Solution

Consider adjusting this guard

_targetDataPoints.Samples == _referenceDataPoints.Samples

in ComputeNextValue so that it looks for the timestamps of the rolling window that should match.

Reproducing the Problem

Run this backtest. It demonstrates the issue for a single asset. The ComputeNextValue chart shows _targetDataPoints.Samples != _referenceDataPoints.Samples, which means ComputeBeta never runs.

System Information

QC Cloud.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue
@JosueNina JosueNina linked a pull request Dec 13, 2024 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants