anriseth / hjbsolver.jl Goto Github PK
View Code? Open in Web Editor NEWGeneral solver for Hamilton-Jacobi-Bellman equations
License: Other
General solver for Hamilton-Jacobi-Bellman equations
License: Other
Currently the value and policy arrays are stored in backward time, so v[:, 1]
represents the value function at t=T
and v[:, end]
represents the value function at t=0
.
Redo this so we get it the right way.
Currently only Dirichlet boundaries are allowed.
Generalise to e.g. using the limiting value of the PDE expression on certain parts of the boundary.
Make the code use second-order finite differences for the v_x
term whenever possible. We can for example follow the approach from the paper below.
http://epubs.siam.org/doi/abs/10.1137/060675186
@article{wang2008maximal,
title={Maximal use of central differencing for Hamilton-Jacobi-Bellman PDEs in finance},
author={Wang, J and Forsyth, Peter A},
journal={SIAM Journal on Numerical Analysis},
volume={46},
number={3},
pages={1580--1601},
year={2008},
publisher={SIAM}
}
WARNING: Method definition objective(Any) in module HJBSolver at /home/travis/.julia/v0.5/HJBSolver/src/policyiteration.jl:46 overwritten at /home/travis/.julia/v0.5/HJBSolver/src/policyiteration.jl:62.
WARNING: Method definition objective(Any) in module HJBSolver at /home/travis/.julia/v0.5/HJBSolver/src/policyiteration.jl:62 overwritten at /home/travis/.julia/v0.5/HJBSolver/src/policyiteration.jl:86.
Constant policy approximation, Merton
WARNING: could not attach metadata for @simd loop.
82.104381 seconds (416.48 M allocations: 12.671 GB, 1.27% gc time)
2 facts verified.
Policy iteration, Merton
ERROR: LoadError: LoadError: UndefVarError: hamiltonian not defined
in updatepol!(::Array{Float64,1}, ::Array{Float64,1}, ::HJBSolver.HJBOneDim{Float64}, ::Float64, ::LinSpace{Float64}, ::Float64) at /home/travis/.julia/v0.5/HJBSolver/src/policyiteration.jl:45
Improve the interface to choose between the "constant policy timestepping" and the "policy iteration" solvers.
2D tests are too slow for Travis
1D and 2D use K differently: 1D specifies K which creates K+1 spatial points but in 2D K is the number of points.
Extend the code to handle equations of the form
v_t+\sup_{a\in A}\{b*v_x + 1/2*\sigma^2*v_{xx} - c*v + f\} = 0
Generalise the code so that we can deal with n-dimensional HJB equations.
Initially with a diagonal diffusion operator.
Currently the policy iteration approach loops over each x-value and optimises the control only at that position.
Is it possible (and faster) to run a larger optimisation over the controls on all x-values instead? Maybe by summing together hamiltonian(i,j) for all the indices i (and j in 2D)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.