universal-portfolios icon indicating copy to clipboard operation
universal-portfolios copied to clipboard

Anticor Bug fix for undefined correlation

Open Aguspanale opened this issue 6 months ago • 0 comments

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 avatar Jul 31 '24 15:07 Aguspanale