Is there a python module to solve/integrate a system of stochastic differential equations?

心不动则不痛 提交于 2019-12-22 04:50:52

问题


I have a system of stochastic differential equations that I would like to solve. I was hoping that this issue was already address. I am a bit concerned about constructing my own solver because I fear my solver would be too slow, and there could be the issues with numerical stability.

Is there a python module for such problems?

If not, is there a standard approach for solving such systems.


回答1:


There is one: http://diffusion.cgu.edu.tw/ftp/sde/

Example from the site:

""" add required Python packages """
from pysde import *
from sympy import *
""" Variables acclaimed """
x,dx=symbols('x dx')
r,G,e,d=symbols('r G epsilon delta')
""" Solve Kolmogorov Forward Equation """
l=sde.KolmogorovFE_Spdf(r*(G-x),e*x*(1-x),0,1)
sol=l.subs({e:r*d})

pprint(sol)


来源:https://stackoverflow.com/questions/14594290/is-there-a-python-module-to-solve-integrate-a-system-of-stochastic-differential

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!