Coder Social home page Coder Social logo

Comments (3)

jlperla avatar jlperla commented on May 8, 2024 2

@chenwilliam77 A less focused project than EconPDEs working on these things is https://github.com/JuliaDiffEq/DiffEqOperators.jl/ which implements fornberg, different upwinding, etc. and the intention is to get very solid lazy operator composition as well. It is implemented largely for matrix-free methods using convolutions (which is a little different than the stencils that @matthieugomez is using) but there are concretizations to structured matrices where appropriate

If you are interested in doing any julia code on these topics, we would love to have you work on using these for finance applications.

from econpdes.jl.

chenwilliam77 avatar chenwilliam77 commented on May 8, 2024

Hi Matthieu,

Perhaps another alternative to the way you're currently implementing the finite differences is to use the Fornberg algorithm. It generates weights for one-dimensional finite differences of arbitrary order and accuracy, for both uniform and non-uniform grids. Then to approximate a mixed derivative, you'd just apply the one-dimensional finite difference in both directions. In the case of a uniform grid, this will yield the standard formula for a mixed derivative approximation. Note that I'm fairly certain this is the way Mathematica implements its finite differences (or so it seemed when I implemented a replication of Di Tella (2017) in Matlab recently).

A Matlab implementation of the Fornberg algorithm is posted here, and if you're interested, then I can try coding it up in Julia for you because I would like to use your tools. My personal research uses continuous-time macrofinance methods, and I'd prefer not to re-invent the wheel!

Best,

William

from econpdes.jl.

FuZhiyu avatar FuZhiyu commented on May 8, 2024

Thanks for the example of mixed derivatives. Before I thought the monotonicity condition of Barles-Souganidis' framework is violated by the mixed derivative, so it would've been a problem for the finite difference method.

So it seems with a fully implicit algorithm we can still handle the cross derivative term (at least when it's not too large)?

from econpdes.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.