# \#sde

**URL:** https://discourse.julialang.org/tag/sde/176.md?match_all_tags=true&page=2&tags%5B%5D=sde

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 3

---

## [Using EnsembleThreads in DifferentialEquations.jl fails for SDEs with trajectories \> nthreads](https://discourse.julialang.org/t/using-ensemblethreads-in-differentialequations-jl-fails-for-sdes-with-trajectories-nthreads/57831)

<div class="topic-metadata">

**Author:** [@Junkiejim](https://discourse.julialang.org/u/Junkiejim)\
**Replies:** 3\
**Last updated:** [March 24, 2021, 3:19am UTC](https://discourse.julialang.org/t/using-ensemblethreads-in-differentialequations-jl-fails-for-sdes-with-trajectories-nthreads/57831 "2021-03-24T03:19:33Z")

</div>

I’m trying to run some stochastic simulations for a research problem using DifferentialEquations.jl. I’ve had no problem setting up my differential equation, and solving it is fine until I try to setup an ensembleproblem…

---

## [Differentialequations.jl: SDE ensemble solve fails for vector SDEs?](https://discourse.julialang.org/t/differentialequations-jl-sde-ensemble-solve-fails-for-vector-sdes/57631)

<div class="topic-metadata">

**Author:** [@colm-connaughton](https://discourse.julialang.org/u/colm-connaughton)\
**Replies:** 2\
**Last updated:** [March 23, 2021, 2:52pm UTC](https://discourse.julialang.org/t/differentialequations-jl-sde-ensemble-solve-fails-for-vector-sdes/57631 "2021-03-23T14:52:35Z")

</div>

I’ve been using the examples in the documentation to play around with the SDE solvers in DifferentialEquations.jl and have run into trouble trying to run ensemble simulations with vector-valued SDEs (the scalar case work…

---

## [Losses for parameter estimation of Neural SDE](https://discourse.julialang.org/t/losses-for-parameter-estimation-of-neural-sde/50771)

<div class="topic-metadata">

**Author:** [@jlmaccal](https://discourse.julialang.org/u/jlmaccal)\
**Replies:** 15\
**Last updated:** [March 1, 2021, 10:30pm UTC](https://discourse.julialang.org/t/losses-for-parameter-estimation-of-neural-sde/50771 "2021-03-01T22:30:07Z")

</div>

I’m trying to understand the various options for doing parameter estimation on a USDE. I’m completely new to parameter estimation in SDEs, so ELI-dumb-chemist would be appreciated. Background I’m trying to model a physi…

---

## [Return Noise used in SDE Solution](https://discourse.julialang.org/t/return-noise-used-in-sde-solution/56167)

<div class="topic-metadata">

**Author:** [@jshackle](https://discourse.julialang.org/u/jshackle)\
**Replies:** 1\
**Last updated:** [February 28, 2021, 2:33pm UTC](https://discourse.julialang.org/t/return-noise-used-in-sde-solution/56167 "2021-02-28T14:33:22Z")

</div>

Is there anyway to find what noise terms are used in an SDE solver? I’d like to be able to double check the noise is behaving the way I think it is.

---

## [Wiener process for Lorenz system](https://discourse.julialang.org/t/wiener-process-for-lorenz-system/52995)

<div class="topic-metadata">

**Author:** [@AhmedAlreweny](https://discourse.julialang.org/u/AhmedAlreweny)\
**Replies:** 1\
**Last updated:** [January 7, 2021, 3:40pm UTC](https://discourse.julialang.org/t/wiener-process-for-lorenz-system/52995 "2021-01-07T15:40:24Z")

</div>

I want to solve Lorenz system as a SDE with Wiener process added as noise. I was wondering if this is the correct way to represent this problem ? According to my understanding, the diagonal noise added here has the same …

---

## [How to use EnsembleDistributed() in DifferentialEquations.jl](https://discourse.julialang.org/t/how-to-use-ensembledistributed-in-differentialequations-jl/51642)

<div class="topic-metadata">

**Author:** [@jmmm](https://discourse.julialang.org/u/jmmm)\
**Replies:** 2\
**Last updated:** [December 11, 2020, 10:07am UTC](https://discourse.julialang.org/t/how-to-use-ensembledistributed-in-differentialequations-jl/51642 "2020-12-11T10:07:48Z")

</div>

I was following a tutorial in Stochastic Differential Equations · DifferentialEquations.jl (sciml.ai) and tried to modify it to use EnsembleDistributed() to speed up MC simulations. This is from the tutorial: using Dif…

---

## [SDE with diagonal noise](https://discourse.julialang.org/t/sde-with-diagonal-noise/50420)

<div class="topic-metadata">

**Author:** [@AhmedAlreweny](https://discourse.julialang.org/u/AhmedAlreweny)\
**Replies:** 4\
**Last updated:** [November 19, 2020, 1:31pm UTC](https://discourse.julialang.org/t/sde-with-diagonal-noise/50420 "2020-11-19T13:31:53Z")

</div>

I am trying to solve the following SDE: du=f(u,p,t)dt+\\sigma dW, where f(u,p,t) can be written as following: function f(du,u,p,t) #calculate the derivative of the vector at time j p=0.0 for i=1:Nx if i==2 …

---

## [Strange MaxIters (numeric instability?) occured when solving certain SDE](https://discourse.julialang.org/t/strange-maxiters-numeric-instability-occured-when-solving-certain-sde/49392)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 10\
**Last updated:** [November 14, 2020, 3:50pm UTC](https://discourse.julialang.org/t/strange-maxiters-numeric-instability-occured-when-solving-certain-sde/49392 "2020-11-14T15:50:06Z")

</div>

I’ve been solving this equation for a lot of different parameters, but suddenly I am getting occasional ┌ Warning: Interrupted. Larger maxiters is needed. └ @ DiffEqBase /home/torkelloman/.julia/packages/DiffEqBase/V7P1…

---

## [Simulating a stopping time in SDE without using a fixed time span?](https://discourse.julialang.org/t/simulating-a-stopping-time-in-sde-without-using-a-fixed-time-span/45608)

<div class="topic-metadata">

**Author:** [@tzxiong](https://discourse.julialang.org/u/tzxiong)\
**Replies:** 6\
**Last updated:** [November 9, 2020, 9:27am UTC](https://discourse.julialang.org/t/simulating-a-stopping-time-in-sde-without-using-a-fixed-time-span/45608 "2020-11-09T09:27:44Z")

</div>

Hi everyone, I am trying to simulate a stochastic process on \[0,1\] that will hit the boundary with probability 1 in a finite amount of time. The package I am using is the SDE solver in DifferentialEquation.jl. However, …

---

## [MethodError when solving SDE in DifferentialEquations.jl](https://discourse.julialang.org/t/methoderror-when-solving-sde-in-differentialequations-jl/49053)

<div class="topic-metadata">

**Author:** [@Sam\_Power](https://discourse.julialang.org/u/Sam_Power)\
**Replies:** 4\
**Last updated:** [October 26, 2020, 5:35pm UTC](https://discourse.julialang.org/t/methoderror-when-solving-sde-in-differentialequations-jl/49053 "2020-10-26T17:35:14Z")

</div>

Hi, Apologies for not having a more informative title. I’m having a little trouble solving a 2-dimensional SDE in DifferentialEquations.jl. My current code is using DifferentialEquations, ForwardDiff # Solve Chemical …

---

## [Using the noise parameters sol.W.W from an SDE solution throws an error when taking gradients](https://discourse.julialang.org/t/using-the-noise-parameters-sol-w-w-from-an-sde-solution-throws-an-error-when-taking-gradients/47640)

<div class="topic-metadata">

**Author:** [@MikeKlocCZ](https://discourse.julialang.org/u/MikeKlocCZ)\
**Replies:** 3\
**Last updated:** [October 7, 2020, 2:13pm UTC](https://discourse.julialang.org/t/using-the-noise-parameters-sol-w-w-from-an-sde-solution-throws-an-error-when-taking-gradients/47640 "2020-10-07T14:13:03Z")

</div>

I need to work with individual Wiener increments from an SDE solution in my loss function. Whenever I try to get these values from sol.W.W command, the ERROR: type Nothing has no field W pops up when computing the gradie…

---

## [Gradients from an SDE solver with callbacks](https://discourse.julialang.org/t/gradients-from-an-sde-solver-with-callbacks/46317)

<div class="topic-metadata">

**Author:** [@MikeKlocCZ](https://discourse.julialang.org/u/MikeKlocCZ)\
**Replies:** 2\
**Last updated:** [September 11, 2020, 7:49am UTC](https://discourse.julialang.org/t/gradients-from-an-sde-solver-with-callbacks/46317 "2020-09-11T07:49:03Z")

</div>

I am trying to get gradients of the solution of an SDE where a callback function is used in the solve command. It seems that the forward adjoint method is not compatible with the usage of callbacks as I get "ERROR: type…

---

## [Kramer-type SDE - conditionally stop solution process](https://discourse.julialang.org/t/kramer-type-sde-conditionally-stop-solution-process/37866)

<div class="topic-metadata">

**Author:** [@StarecZosima](https://discourse.julialang.org/u/StarecZosima)\
**Replies:** 3\
**Last updated:** [July 19, 2020, 7:08pm UTC](https://discourse.julialang.org/t/kramer-type-sde-conditionally-stop-solution-process/37866 "2020-07-19T19:08:10Z")

</div>

Hi there, I am trying to solve a Kramer-type SDE, simulating a particle in a double well. I use the DifferentialEquations package and it all works well until the particle reaches the top of the barrier and start rollin…

---

## [ForwardDiffSensitivity() and TrackerAdjoint() give different answers](https://discourse.julialang.org/t/forwarddiffsensitivity-and-trackeradjoint-give-different-answers/43254)

<div class="topic-metadata">

**Author:** [@fernando-duarte](https://discourse.julialang.org/u/fernando-duarte)\
**Replies:** 3\
**Last updated:** [July 18, 2020, 10:57pm UTC](https://discourse.julialang.org/t/forwarddiffsensitivity-and-trackeradjoint-give-different-answers/43254 "2020-07-18T22:57:16Z")

</div>

using DiffEqSensitivity, OrdinaryDiffEq, Zygote, StochasticDiffEq # similar to documentation, but out-of-place function fiip(u,p,t) du1 = dx = p\[1\]\*u\[1\] - p\[2\]\*u\[1\]\*u\[2\] du2 = dy = -p\[3\]\*u\[2\] + p\[4\]\*u\[1\]\*u\[2\] ret…

---

## [Solve a SDE using Neural network](https://discourse.julialang.org/t/solve-a-sde-using-neural-network/40177)

<div class="topic-metadata">

**Author:** [@shoudao](https://discourse.julialang.org/u/shoudao)\
**Replies:** 11\
**Last updated:** [May 31, 2020, 3:30pm UTC](https://discourse.julialang.org/t/solve-a-sde-using-neural-network/40177 "2020-05-31T15:30:32Z")

</div>

I am trying to solve SDE using Neural networks recently. I have an idea to solve a SDE in this form: d X\_{t}=f\\left(X\_{t}, t,r,\\mu\_t \\right) d t+g\\left(X\_{t}, t,r,\\mu\_t \\right) d W\_{t} But I am not sure how to impleme…

---

## [Debugging diffeqpy code, remake not defined](https://discourse.julialang.org/t/debugging-diffeqpy-code-remake-not-defined/40421)

<div class="topic-metadata">

**Author:** [@Abolfazl\_Ziaeemehr](https://discourse.julialang.org/u/Abolfazl_Ziaeemehr)\
**Replies:** 1\
**Last updated:** [May 30, 2020, 5:10am UTC](https://discourse.julialang.org/t/debugging-diffeqpy-code-remake-not-defined/40421 "2020-05-30T05:10:09Z")

</div>

I am going to solve a system of SDE using diffeqpy and use EnsembleProblem. I don’t know why I am getting remake not defined error. The code run properly without EnsembleProblem. So I guess the problem should be in pr…

---

## [RDE versus SDE](https://discourse.julialang.org/t/rde-versus-sde/40150)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 7\
**Last updated:** [May 25, 2020, 9:29pm UTC](https://discourse.julialang.org/t/rde-versus-sde/40150 "2020-05-25T21:29:57Z")

</div>

What is the difference between a Random Differential Equation and a Stochastic Differential Equation? I read the documentation of DifferentialEquations.jl, but I cannot wrap my head around it. Thanks. Gordon

---

## [NoiseFunction in DifferentialEquations.jl](https://discourse.julialang.org/t/noisefunction-in-differentialequations-jl/39716)

<div class="topic-metadata">

**Author:** [@fernandoduarte](https://discourse.julialang.org/u/fernandoduarte)\
**Replies:** 2\
**Last updated:** [May 18, 2020, 8:50pm UTC](https://discourse.julialang.org/t/noisefunction-in-differentialequations-jl/39716 "2020-05-18T20:50:21Z")

</div>

I am getting the error “NoiseFunction has no field t” when I try to define my own noise process using NoiseFunction in DifferentialEquations.jl following the example in the documentation here. Here is the code using Di…

---

## [Trying to optimize system of SDE's](https://discourse.julialang.org/t/trying-to-optimize-system-of-sdes/39648)

<div class="topic-metadata">

**Author:** [@Ignacio\_Perez\_Ipina](https://discourse.julialang.org/u/Ignacio_Perez_Ipina)\
**Replies:** 6\
**Last updated:** [May 18, 2020, 8:34pm UTC](https://discourse.julialang.org/t/trying-to-optimize-system-of-sdes/39648 "2020-05-18T20:34:41Z")

</div>

Hello! I’ve been introduced to Julia very recently, and I’ve been trying to adapt my already tested system of equations, with additive noise, based on a Takens-Bogdanov bifurcation. I’ve got this far trying to impro…

---

## [Calculating the analytical solution of an Ornstein-Uhlenbeck SDE](https://discourse.julialang.org/t/calculating-the-analytical-solution-of-an-ornstein-uhlenbeck-sde/37359)

<div class="topic-metadata">

**Author:** [@williamjsdavis](https://discourse.julialang.org/u/williamjsdavis)\
**Replies:** 2\
**Last updated:** [April 10, 2020, 6:04pm UTC](https://discourse.julialang.org/t/calculating-the-analytical-solution-of-an-ornstein-uhlenbeck-sde/37359 "2020-04-10T18:04:25Z")

</div>

I want to compare different SDE solvers against the analytical solution for the Ornstein-Uhlenbeck process. Currently I am doing this by solving numerically first (e.g. Euler-Maruyama), saving the noise, and calculating …

---

## [DifferentialEquations: Enforce that variables are inside a domain (isoutofdomain, PositiveDomain)](https://discourse.julialang.org/t/differentialequations-enforce-that-variables-are-inside-a-domain-isoutofdomain-positivedomain/30452)

<div class="topic-metadata">

**Author:** [@LolianSh](https://discourse.julialang.org/u/LolianSh)\
**Replies:** 1\
**Last updated:** [October 29, 2019, 4:20pm UTC](https://discourse.julialang.org/t/differentialequations-enforce-that-variables-are-inside-a-domain-isoutofdomain-positivedomain/30452 "2019-10-29T16:20:43Z")

</div>

Hi, I am using DifferentialEquations.jl to solve a system of SDEs. This is a model of an electrochemical system, where I have reaction-diffusion equations. My variables are the following (\\theta, CO, OH, S\_t). All of t…

---

## [Stiff SDE and \`DiffEq\`](https://discourse.julialang.org/t/stiff-sde-and-diffeq/26851)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 5\
**Last updated:** [July 31, 2019, 7:20pm UTC](https://discourse.julialang.org/t/stiff-sde-and-diffeq/26851 "2019-07-31T19:20:59Z")

</div>

I’m trying to integrate an SDE with constant, additive, diagonal noise and a “stiff” drift component (the ODE component comes from a singularly perturbed DAE system…). I need to be able to integrate indefinitely (I’m int…

---

## [How to set a fixed stepsize in SDE Monte Carlo problem?](https://discourse.julialang.org/t/how-to-set-a-fixed-stepsize-in-sde-monte-carlo-problem/22744)

<div class="topic-metadata">

**Author:** [@SSkor](https://discourse.julialang.org/u/SSkor)\
**Replies:** 3\
**Last updated:** [April 5, 2019, 4:17pm UTC](https://discourse.julialang.org/t/how-to-set-a-fixed-stepsize-in-sde-monte-carlo-problem/22744 "2019-04-05T16:17:21Z")

</div>

Hello! I’m a new julia user. I try to get a sample of trajectories via stochastic differential equations with fixed length = 1000. So, for Wiener process I did it. traj\_length = 1000.0 n = 100 W = WienerProcess(0.0, …

---

## [When solving non-diagonal noise SDE: Function g called twice in each timestep, changing u inbetween?](https://discourse.julialang.org/t/when-solving-non-diagonal-noise-sde-function-g-called-twice-in-each-timestep-changing-u-inbetween/15618)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [September 28, 2018, 9:39pm UTC](https://discourse.julialang.org/t/when-solving-non-diagonal-noise-sde-function-g-called-twice-in-each-timestep-changing-u-inbetween/15618 "2018-09-28T21:39:23Z")

</div>

In short: When making solving SDEs the noise function seems to be called twice in every timestep, with the variable values being changed in between. This causes out of domain errors when my positive\_domain callback canno…

---

## [Simulating large nontrivial SDE systems: algorithms, reliability and speed](https://discourse.julialang.org/t/simulating-large-nontrivial-sde-systems-algorithms-reliability-and-speed/12082)

<div class="topic-metadata">

**Author:** [@lappet](https://discourse.julialang.org/u/lappet)\
**Replies:** 7\
**Last updated:** [July 3, 2018, 7:30am UTC](https://discourse.julialang.org/t/simulating-large-nontrivial-sde-systems-algorithms-reliability-and-speed/12082 "2018-07-03T07:30:43Z")

</div>

In short, I am interested in the simulation of large systems of nontrivial stochastic differential equations as they arise when applying phase-space methods to interacting quantum systems. As an intro example: when one …

---

## [SDE with matrix values, question on DifferentialEquations.jl](https://discourse.julialang.org/t/sde-with-matrix-values-question-on-differentialequations-jl/10412)

<div class="topic-metadata">

**Author:** [@benkj](https://discourse.julialang.org/u/benkj)\
**Replies:** 4\
**Last updated:** [April 18, 2018, 5:55pm UTC](https://discourse.julialang.org/t/sde-with-matrix-values-question-on-differentialequations-jl/10412 "2018-04-18T17:55:13Z")

</div>

I have the following SDE du = f(u,p,t)dt + sum\_i g\_i(u,p,t) dW\_i where du, f, and g\_i are all matrices, while W\_i are all independent Wiener processes. I have no problem in setting up the ODE when g\_i is zero, but I c…

---

## [Get error when solving SDEs after last update](https://discourse.julialang.org/t/get-error-when-solving-sdes-after-last-update/10137)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 3\
**Last updated:** [April 4, 2018, 1:25pm UTC](https://discourse.julialang.org/t/get-error-when-solving-sdes-after-last-update/10137 "2018-04-04T13:25:54Z")

</div>

I tried rerunning my code after the latest 4.2 update to the DifferentialEquations package. I use the reaction\_network DSL from DiffEqBiological package, from these I generate and solve SDEs with non-diagonal noise. Howe…

---

## [Avoiding high plotting densities when plotting Solutions to SDE with small time steps](https://discourse.julialang.org/t/avoiding-high-plotting-densities-when-plotting-solutions-to-sde-with-small-time-steps/9168)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 8\
**Last updated:** [April 1, 2018, 9:04am UTC](https://discourse.julialang.org/t/avoiding-high-plotting-densities-when-plotting-solutions-to-sde-with-small-time-steps/9168 "2018-04-01T09:04:37Z")

</div>

I am looking at a biochemical reaction networks and how it behaves under noise. The code looks something like: gr() ... prob\_sde = SDEProblem(model,u0,(0.,1000.)) sol = solve(prob\_sde,ImplicitEM(),dt=1//2^(7),callback=c…

---

## [Parallel Monte Carlo Simulations](https://discourse.julialang.org/t/parallel-monte-carlo-simulations/9692)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 0\
**Last updated:** [March 13, 2018, 5:58pm UTC](https://discourse.julialang.org/t/parallel-monte-carlo-simulations/9692 "2018-03-13T17:58:06Z")

</div>

I am simulating a large number of SDEs and looking at the results. Things starts to take quite a while and I figured that I had 8 cores on my computer, might as well try to use them. Unfortunate I cannot get things to wo…

---

## [Solving Stochastic Differential Equations with Same Random Numbers](https://discourse.julialang.org/t/solving-stochastic-differential-equations-with-same-random-numbers/8189)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 3\
**Last updated:** [January 7, 2018, 11:06am UTC](https://discourse.julialang.org/t/solving-stochastic-differential-equations-with-same-random-numbers/8189 "2018-01-07T11:06:56Z")

</div>

One Line Question: How do I use Julia to solve a system of Stochastic Differential Equations were there are correlated terms of noise (or “the same” noise appears in several places) Biological Background: Lets say I hav…

[Previous page](https://discourse.julialang.org/tag/sde/176.md?match_all_tags=true&page=1&tags%5B%5D=sde)

[Next page](https://discourse.julialang.org/tag/sde/176.md?match_all_tags=true&page=3&tags%5B%5D=sde)
