Skip to content

Commit 1722df6

Browse files
committed
changed Jesse's code
1 parent ef0ff6b commit 1722df6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/risktools/_sims.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def simOU(s0=5, mu=4, theta=2, sigma=1, T=1, dt=1 / 252, sims=1000, eps=None, se
130130
Time step size in fractions of a year. So a day would be 1/252, where 252 is the number of business
131131
days in a year
132132
sims : int
133-
Number of simulations to run. By default, this is 1000.
133+
Number of simulations to run. By default, this is 1000. Not used if eps is provided.
134134
eps : matrix-like[float]
135135
Random numbers to use for the returns. If provided, mu, sigma, T, dt and sims are ignored.
136136
Must of size (p x sims) where p is the number of periods in T, i.e. int(T/dt).
@@ -152,9 +152,7 @@ def simOU(s0=5, mu=4, theta=2, sigma=1, T=1, dt=1 / 252, sims=1000, eps=None, se
152152
>>> import risktools as rt
153153
>>> rt.simOU()
154154
"""
155-
if eps is None:
156-
sims = sims
157-
else:
155+
if eps is not None:
158156
sims = eps.shape[1]
159157

160158
# number of business days in a year

0 commit comments

Comments
 (0)