Skip to content

Anticor Bug fix for undefined correlation#111

Open
Aguspanale wants to merge 1 commit intoMarigold:masterfrom
Aguspanale:master
Open

Anticor Bug fix for undefined correlation#111
Aguspanale wants to merge 1 commit intoMarigold:masterfrom
Aguspanale:master

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