Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdz committed Mar 7, 2023
1 parent 8716de3 commit 197c09c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from tests._unittest_numpy_extensions import NumpyTestCase
from yabte.utilities.simulation.geometric_brownian_motion import gbm_simulate_paths
from yabte.utilities.simulation.heston import heston_simulate_paths
from yabte.utilities.simulation.weiner import weiner
from yabte.utilities.simulation.weiner import weiner_simulate_paths

HAS_SCIPY = True
try:
Expand Down Expand Up @@ -36,7 +36,7 @@ def test_weiner_simple(self):

# simulate data
# p[steps, sims, path]
ws = weiner(n_steps=N, n_sims=M, stdev=1, R=R, rng=self.rng)
ws = weiner_simulate_paths(n_steps=N, n_sims=M, stdev=1, R=R, rng=self.rng)
dws = np.diff(ws, axis=0)

# test weiner properities
Expand All @@ -56,7 +56,7 @@ def test_weiner_simple_ks(self):

# simulate data
# p[steps, sims, path]
ws = weiner(n_steps=N, n_sims=M, stdev=1, R=R, rng=self.rng)
ws = weiner_simulate_paths(n_steps=N, n_sims=M, stdev=1, R=R, rng=self.rng)
dws = np.diff(ws, axis=0)

# normal differences
Expand Down Expand Up @@ -139,7 +139,9 @@ def test_heston_smoke(self):
n_sims=1,
)

x = 1
# TODO: better tests
self.assertEqual(sum(S.shape), 101)
self.assertEqual(sum(v.shape), 101)


if __name__ == "__main__":
Expand Down

0 comments on commit 197c09c

Please sign in to comment.