Exemplo n.º 1
0
 def _get_ewmcorr(X, Y):
     # X and Y have the same structure (and NaNs) when called from _flex_binary_moment()
     return_hook, x_values = _process_data_structure(X)
     return_hook, y_values = _process_data_structure(Y)
     cov = algos.ewmcov(x_values, y_values, com, int(adjust), int(ignore_na), int(min_periods), 1)
     x_var = algos.ewmcov(x_values, x_values, com, int(adjust), int(ignore_na), int(min_periods), 1)
     y_var = algos.ewmcov(y_values, y_values, com, int(adjust), int(ignore_na), int(min_periods), 1)
     corr = cov / _zsqrt(x_var * y_var)
     return return_hook(corr)
Exemplo n.º 2
0
 def _get_ewmcorr(X, Y):
     # X and Y have the same structure (and NaNs) when called from _flex_binary_moment()
     return_hook, x_values = _process_data_structure(X)
     return_hook, y_values = _process_data_structure(Y)
     cov = algos.ewmcov(x_values, y_values, com, int(adjust), int(ignore_na), int(min_periods), 1)
     x_var = algos.ewmcov(x_values, x_values, com, int(adjust), int(ignore_na), int(min_periods), 1)
     y_var = algos.ewmcov(y_values, y_values, com, int(adjust), int(ignore_na), int(min_periods), 1)
     corr = cov / _zsqrt(x_var * y_var)
     return return_hook(corr)
Exemplo n.º 3
0
 def _get_cov(X, Y):
     X = self._shallow_copy(X)
     Y = self._shallow_copy(Y)
     cov = algos.ewmcov(X._prep_values(), Y._prep_values(), self.com,
                        int(self.adjust), int(self.ignore_na),
                        int(self.min_periods), int(bias))
     return X._wrap_result(cov)
Exemplo n.º 4
0
 def _get_cov(X, Y):
     X = self._shallow_copy(X)
     Y = self._shallow_copy(Y)
     cov = algos.ewmcov(X._prep_values(), Y._prep_values(), self.com,
                        int(self.adjust), int(self.ignore_na),
                        int(self.min_periods), int(bias))
     return X._wrap_result(cov)
Exemplo n.º 5
0
 def f(arg):
     return algos.ewmcov(arg,
                         arg,
                         self.com,
                         int(self.adjust),
                         int(self.ignore_na),
                         int(self.min_periods),
                         int(bias))
Exemplo n.º 6
0
 def _ewmvar(v):
     return algos.ewmcov(v, v, com, int(adjust), int(ignore_na),
                         int(min_periods), int(bias))
Exemplo n.º 7
0
 def _ewmvar(v):
     return algos.ewmcov(v, v, com, int(adjust), int(ignore_na), int(min_periods), int(bias))
Exemplo n.º 8
0
 def _cov(x, y):
     return algos.ewmcov(x, y, self.com, int(self.adjust),
                         int(self.ignore_na), int(self.min_periods),
                         1)
Exemplo n.º 9
0
 def _cov(x, y):
     return algos.ewmcov(x, y, self.com, int(self.adjust),
                         int(self.ignore_na), int(self.min_periods),
                         1)
Exemplo n.º 10
0
 def f(arg):
     return algos.ewmcov(arg, arg, self.com, int(self.adjust),
                         int(self.ignore_na), int(self.min_periods),
                         int(bias))