code: def pearson_correlation(self):
          x, y, dt = self.data
          X, Y = np.array(x), np.array(y)
          ''' Compute Pearson Correlation Coefficient. '''
          # Normalise X and Y
          X -= X.mean(0)
          Y -= Y.mean(0)
          # Standardise X and Y
          X /= X.std(0)
          Y /= Y.std(0)
          # Compute mean product
          return (np.mean(X*Y) ** 2) * 10f pearson_correlation(self):
          x, y, dt = self.data
          X, Y = np.array(x), np.array(y)
          ''' Compute Pearson Correlation Coefficient. '''
          # Normalise X and Y
          X -= X.mean(0)
          Y -= Y.mean(0)
          # Standardise X and Y
          X /= X.std(0)
          Y /= Y.std(0)
          # Compute mean product
          return (np.mean(X*Y) ** 2) * 100
docs: Compute Pearson Correlation Coefficient.