Code Monkey home page Code Monkey logo

Comments (3)

chenwilliam77 avatar chenwilliam77 commented on May 14, 2024

Hi azev77,

We haven't worked on continuous-time methods in a while, and we are currently busy with other projects. As a result, it is unlikely in the near term that we can provide as many examples as Ben Moll has.

However, we do have a continuous-time implementation of Krusell Smith that uses solve_hjb and solve_kfe. Note though that these two functions are not "exhaustive" approaches for solving the HJB and KFE, and depending on the nature of the problem at hand, you may need to use a different numerical approach.

from dsge.jl.

azev77 avatar azev77 commented on May 14, 2024

@chenwilliam77, thanks for your response.

  1. The continuous-time Krusell Smith example in tests gives an error.
    test/models/heterogeneous/krusell_smith_ct/krusell_smith_ct.jl
julia> m = KrusellSmithCT()
ERROR: UndefVarError: SteadyStateParameterArray not defined
  1. Ofcourse I don't expect as many examples as Moll's website.
    I mean one very simple, working example such lifecycle...

from dsge.jl.

chenwilliam77 avatar chenwilliam77 commented on May 14, 2024

This is our bad; we forgot to update the name of a type from one of our other packages ModelConstructors.jl. If you switch every instance of SteadyStateParameterArray to SteadyStateParameterGrid in src/models/heterogeneous/krusell_smith_ct/krusell_smith_ct.jl (there should only be a few), then the model should be instantiate correctly. I've made this fix on a dev branch, but there are other extant changes that have been made to that branch which cannot be merged just yet into the main package, so I can't just make a new release with this bug fix at the moment.

FYI, the test script appears to use other deprecated functions from ModelConstructors.jl, so you should test the model works by simply calling in REPL

using DSGE
m = KrusellSmithCT()

During instantiation, the steady state should be solved.

If you also want to linearize, then you'll need to add using ForwardDiff, BasisMatrices to the src/DSGE.jl script. Unfortunately, it looks like the developers on DSGE.jl who implemented KrusellSmithCT didn't fully implement the linearization code and thus forgot to add these two dependencies. Running

T, R, C = solve(m)

will deliver the linearization, where

ds_t = (T * s_t) * dt + R * dW_t + C

Let me know if this works, and I can close the issue if it does.

from dsge.jl.

Related Issues (20)

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.