JuliaDynamics / DynamicalSystems.jl

Award winning software library for nonlinear dynamics and nonlinear timeseries analysis

Home Page:https://juliadynamics.github.io/DynamicalSystemsDocs.jl/dynamicalsystems/dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Stochastic Dynamical Systems

azev77 opened this issue · comments

Hi, I love your package!
Are there any plans to incorporate stochastic dynamical systems? (unless I missed it)
It can be done nicely in discrete & continuous time.

Hi, thanks for your kind words!

At the moment none of the lead developers of DynamicalSystems.jl has plans to add stochastic systems. From my perspective the reason to not do this is that none of the methods that are currently listed in the documentation are applicable to stochastic systems.

In general creating and evolving "stochastic" systems is already possible since your equations of motion could have random components, and noone would bat an eye. DifferentialEquations.jl (the backend that evolves continuous systems) also has full support for stochastic systems, so in general "implementing stochastic systems" would be no big deal. The difficulty is that scientifically it wouldn't make sense to use e.g. lyapunovs, as this function assumes differentiable vector field. (if you just care about only evolving stochastic systems, you are much better off using DifferentialEquations.jl directly)

I think the best way forwards for this is for you to start listing relevant methods and algorithms that are applicable to stochastic systems, or things that would be interesting to have. And of course, any contribution you'd like to make is welcomed and will be supported. But I don't think anyone already working on DynamicalSystems.jl would implement stochastic systems. Sorry if I let you down, but honesty is always better than promise!

In general creating and evolving "stochastic" systems is already possible since your equations of motion could have random components, and noone would bat an eye.

I would! Not only does it not play nice with adaptivity, it also means the function isn't differentiable so the numerics are all different. If you want to do something like this, you really need to use a SDE or RODE.

That said, the analyses of stochastic dynamical systems are quite intense, so unless someone really dedicated to the field comes along to do it, I wouldn't expect it to randomly get done in a timely manner. But you can indeed simulate it with DifferentialEquations.jl, just not all of the niceties of DynamicalSystems.

I would! Not only does it not play nice with adaptivity, it also means the function isn't differentiable so the numerics are all different. If you want to do something like this, you really need to use a SDE or RODE.

Damn you are right, I apologize! I was too naive for sure! :)

Thanks @Datseris @ChrisRackauckas
Problems in economics (& many other areas) often boil down to solving a dynamical system, which can be decomposed into four categories:

  Discrete Time Continuous Time
Deterministic Recurrence equations Differential equations (DiffEq, EconPDEs)
Stochastic Stochastic recurrence equations Stochastic differential equations

Since these are all types of "dynamical systems" there could be synergies from seeing them under one roof where physicists/economists & everyone in between makes contributions.
For example, economists of use projection & perturbation (& hybrid) methods to solve stochastic recurrence equations. There are synergies, bc these methods are also used for DiffEqs.
Typically, when a researcher writes a paper w/ a new method, they post their Matlab code on their website & it risks being underused/forgotten/unmaintained.

Right now I would like to solve a routine economic consumption/saving model in all four formulations in Julia.
I started solving the continuous deterministic/stochastic models in Julia. Very convenient.
How do you suggest I solve the discrete problems in Julia?

At least me cannot be of much use here. My knowledge for stochastic systems is very limited.

Does "solving" a discrete stochastic system simply mean "evolve it forwards in time"? Because as far as discrete systems are concerned, my answer would be: add a random component in your equations of motion...? Or there is something "specially" different about stochastic discrete systems, besides the equations having a random component?

Even in the case where you want your noise to be something fancy, like e.g. ARFIMA process, just generate your noise first using e.g. https://github.com/Datseris/ARFIMA.jl and use that in your model. That's the only thing I can offer, I really know nothing more about stochastic systems :D