QuantEcon / ContinuousDPs.jl

Continuous state dynamic programming
BSD 3-Clause "New" or "Revised" License
13 stars 10 forks source link

FEAT: Add `LQA` solution method #38

Closed QBatista closed 3 years ago

QBatista commented 3 years ago

Supercedes #31

Some key points regarding the implementation:

  1. Use finite differences instead of forward mode AD to allow for f and g functions with array-like arguments restricted to floats.
  2. Back out implied basis coefficients from the linear quadratic approximation. Although this method doesn't require a basis, this makes the output consistent across solution methods and makes it easier to chain solution methods.
  3. The point around which the approximation is carried out is provided by the user. While the steady-state is a natural point for constructing the approximation, the user may be interested in doing the approximation at some other point. Besides, without imposing restrictions on f and g, it is not always clear what the value of the steady-state shock(s) should be.
codecov[bot] commented 3 years ago

Codecov Report

Merging #38 (6760602) into master (815177f) will increase coverage by 1.12%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
+ Coverage   89.25%   90.37%   +1.12%     
==========================================
  Files           2        2              
  Lines         214      239      +25     
==========================================
+ Hits          191      216      +25     
  Misses         23       23              
Impacted Files Coverage Δ
src/cdp.jl 88.99% <100.00%> (+1.49%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 815177f...6760602. Read the comment docs.

oyamad commented 3 years ago

@QBatista Thanks!

oyamad commented 3 years ago

@QBatista Thanks. Will you run through the notebook one more time (to get rid of Info: Precompiling ContinuousDPs ... from the 1st cell)?

oyamad commented 3 years ago

Please run all the cells...

oyamad commented 3 years ago

@QBatista Great work, thanks!