Skip to content

Commit

Permalink
Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
dbischof90 committed Jul 12, 2017
1 parent cbde5d5 commit 4b83793
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
###### A library to estimate and simulate Stochastic Differential Equations.

This library is a collection of statistical methods to simulate and estimate non-deterministic differential equations. Inference of SDEs is a topic I personally find very interesting but while the tools for their deterministic counterparts are well-developed (and especially well-implemented), stochastic differential equations lack a common tool set in Python.

![Alt text](misc/cirpaths.png?raw=true)
Currently implemented are strong schemes with different properties and besides the Euler scheme they all have first-order convergence.
12 changes: 6 additions & 6 deletions examples/simulate_cir.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ def cir_diffusion(x, c):
return np.sqrt(x) * c


cir_process = SDE(cir_drift, cir_diffusion, timerange=[0,10])
cir_process = SDE(cir_drift, cir_diffusion, timerange=[0,2])

euler_path = np.zeros([100, 2001])
platen_path = np.zeros([100, 2001])
euler_path = np.zeros([10, 2001])
platen_path = np.zeros([10, 2001])

print("Run time estimation between Euler and Platen discretization of an CIR process.")

parameter = {'a': 2, 'b': 0.5, 'c' : 0.2}
parameter = {'a': 2, 'b': 2.5, 'c' : 0.2}
t = time()
for i in range(100):
for i in range(10):
tmp = []
for path in Euler(cir_process, parameter, steps = 2000):
tmp.append(path)
euler_path[i] = tmp
print("Euler: " + str(time() - t))

t = time()
for i in range(100):
for i in range(10):
tmp = []
for path in Platen(cir_process, parameter, steps = 2000):
tmp.append(path)
Expand Down
Binary file added misc/cirpaths.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4b83793

Please sign in to comment.