Skip to content

Commit

Permalink
TST: Adjust test that fails on OSX
Browse files Browse the repository at this point in the history
Adjust test to avoid failure
  • Loading branch information
bashtage committed Apr 17, 2020
1 parent f2651f8 commit 8279e09
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/tests/univariate/test_rescale.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
def small_data():
rs = np.random.RandomState([2389280, 238901, 382908031])
mod = ZeroMean(None, volatility=GARCH(), distribution=Normal(random_state=rs))
sim = mod.simulate([1e-4, 0.05, 0.90], nobs=1000)
sim = mod.simulate([1e-3, 0.05, 0.90], nobs=1000)
return sim.data


@pytest.fixture(scope="module")
def small_data2():
rs = np.random.RandomState([2389280, 238901, 382908031])
mod = ZeroMean(None, volatility=GARCH(), distribution=Normal(random_state=rs))
sim = mod.simulate([1e-4, 0.05, 0.90], nobs=1000)
sim = mod.simulate([1e-3, 0.05, 0.90], nobs=1000)
return sim.data


@pytest.fixture(scope="module")
def std_data():
rs = np.random.RandomState([2389280, 238901, 382908031])
mod = ZeroMean(None, volatility=GARCH(), distribution=Normal(random_state=rs))
sim = mod.simulate([1e-1, 0.05, 0.90], nobs=1000)
sim = mod.simulate([1.0, 0.05, 0.90], nobs=1000)
return sim.data


Expand All @@ -36,9 +36,9 @@ def test_reproducibility(small_data, small_data2):

def test_blank(small_data, std_data):
small_mod = ZeroMean(small_data, volatility=GARCH(), rescale=False)
small_res = small_mod.fit()
small_res = small_mod.fit(starting_values=np.array([1e-3, 0.05, 0.90]), disp="off")
mod = ZeroMean(std_data, volatility=GARCH(), rescale=False)
res = mod.fit()
res = mod.fit(starting_values=np.array([1, 0.05, 0.90]), disp="off")
assert_allclose(1e3 * small_res.params[0], res.params[0], rtol=5e-3)


Expand Down

0 comments on commit 8279e09

Please sign in to comment.