Skip to content

Commit

Permalink
Fixing #91 -- egarch bounds check logic reversed
Browse files Browse the repository at this point in the history
Fixed EGARCH recursion in Cython file to not use sigma2 if == INF.
  • Loading branch information
capellini committed Sep 21, 2015
1 parent 56ad1fb commit c1e41df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/univariate/recursions.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ def egarch_recursion(double[:] parameters,
sigma2[t] = var_bounds[t, 0]
elif sigma2[t] > var_bounds[t, 1]:
if sigma2[t] > DBL_MAX:
sigma2[t] = var_bounds[t, 1] + log(sigma2[t] - var_bounds[t, 1])
else:
sigma2[t] = var_bounds[t, 1] + 1000
else:
sigma2[t] = var_bounds[t, 1] + log(sigma2[t] - var_bounds[t, 1])
std_resids[t] = resids[t] / sqrt(sigma2[t])
abs_std_resids[t] = fabs(std_resids[t])

Expand Down

0 comments on commit c1e41df

Please sign in to comment.