Coder Social home page Coder Social logo

ap-browning / persisters Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 28 KB

Supplementary code for "Persistence as an optimal hedging strategy"

MATLAB 100.00%
bacterial-persistence hedging mathematical-finance stochastic-differential-equations optional-control

persisters's Introduction

persisters

Supplementary code for the preprint "Persistence as an optimal hedging strategy" available on bioRxiv

Code

Requirements

  • MATLAB

Files

  • The file Persisters.m is a script run to produce results in the main document. To reproduce results in the main document, only this file needs to be modified.
    • To switch environment, modify line 22. For example, Env = Envs{3} corresponds to environment 3, the Poisson environment.
  • The file Parameters.m stores non-environment specific parameters.
  • The file StateEquations.m stores non-environment specific state equations (namely, the state equations for n and theta).
  • The Environments directory contains environment specific code for each of the following environments:
    1. Constant (Env_1_Constant.m)
    2. Monod (Env_2_Monod.m)
    3. Poisson (Env_3_Poisson.m)
    4. Ornstein-Uhlenbeck (Env_4_OrnsteinUhlenbeck.m) (results in supporting material only)
    5. Duffing (Env_5_Duffing.m) (results in supporting material only)
  • The Environment directory also contains the file EnvironmentSeed.m which is called to return the random number generator (RNG) seed used to reproduce results in the paper.
  • The HJB directory contains code used to solve the HJB PDE for the persister problem.
    • The file HJB_Persisters.m is called to solve the PDE
    • The file HJB_Forward_Persisters.m is called to solve the SDE forward, coupling the control to the solution of the PDE
    • The file HJB_CreateGrid.m is called to create the spatial mesh
    • The file BoundaryExtension.m is called to approximate derivatives on the boundary through linear interpolation.
    • Details on the solution technique, including the boundary approximation method, are provided in the supporting material document.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.