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

Anticor Bug fix for undefined correlation #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Aguspanale
Copy link

Stumbled upon NAN values while using the ANTICOR implementation, the original paper states that :

(page 6)
We note that if sigma1(i) (respectively,
sigma2(j)) is zero over some window then the growth rate of stock i during the second last window (respectively, stock j during the last window) is constant during this window. For sufficiently large windows of time constant growth of any stock i is unlikely. However, in this unlikely case we choose not to move money into or out of such a stock i.12.

To make the implementation take this detail into account, i simply skipped transfers that could have NAN values from an undefined correlation.

Stumbled upon NAN values while using the ANTICOR implementation, the original paper states that :

(page 6)
We note that if sigma1(i) (respectively,
sigma2(j)) is zero over some window then the growth rate of stock i during the second last window (respectively, stock j during the last window) is constant during this window. For sufficiently large windows of time constant growth of any stock i is unlikely. However, in this unlikely case we choose not to move money into or out of such a stock i.12.

To make the implementation take this detail into account, i simply skipped transfers that could have NAN values from an undefined correlation.
@Aguspanale Aguspanale changed the title Update anticor.py Anticor Bug fix for undefined correlation Jul 31, 2024
Copy link
Owner

@Marigold Marigold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks a lot for contribution!

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

Successfully merging this pull request may close these issues.

2 participants