when I apply pd.rolling_corr on some data set, I find the correlation matrix generated has values like -1.0000000000074845. I know it is about floating accuracy, but I do not know the usual way to deal with it in practice? For example this value is less than -1 so I can not find the positions that have exact -1 value. Also the matrix won't pass the check that all values are between [-1,1].



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.