# Finance and Economics Use Cases

**URL:** <https://discourse.julialang.org/t/finance-and-economics-use-cases/9452>\
**Category:** Finance and Economics\
**Created:** [March 2, 2018, 2:14pm UTC](https://discourse.julialang.org/t/finance-and-economics-use-cases/9452 "2018-03-02T14:14:30Z")\
**Posts on this page:** 6\
**Page:** 6

<div class="post-metadata">

**Author:** ![Alec\_Loudenback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alec_loudenback/32/278_2.png) [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Post date:** [January 16, 2023, 3:22am UTC](https://discourse.julialang.org/t/finance-and-economics-use-cases/9452/102 "2023-01-16T03:22:19Z")

</div>

I’m curious (as the developer of Yields.jl) what you are looking for. I’m not intending Yields.jl to be a trading-desk level tool, but I’m wondering if there are features you are looking for that would be a fit for Yields.jl

---

<div class="post-metadata">

**Author:** ![sob](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sob](https://discourse.julialang.org/u/sob)\
**Post date:** [January 16, 2023, 12:55pm UTC](https://discourse.julialang.org/t/finance-and-economics-use-cases/9452/103 "2023-01-16T12:55:28Z")

</div>

Sure. What I eventually want to do is the following.

For USD:

- Set as of date (either today or past date)
- Create a list of instruments that will be used to calibrate the yield curve (meaning, retrieve say the definitions of the first 8 IMM SOFR futures and swap definitions with exact cash flow dates for a set of maturities)
- Calibrate a SOFR discount curve that gives 0 NPV for each of the above instrument, with some external constraints on the shape of curve
- Query that curve for the usual: disount rates, forward rates, etc.

For EUR:

- Same as above except I need to jointly calibrate a EURIBOR and an ESTR curve.

Main point is I need to be instrument aware. Not generic, textbook (Hull or other) instrument, but actual tradable market instrument, with appropriate precision (often the last cashflow of a 1y swap is not exactly at time 1.0, if only for the fact that swaps settle T+1 or T+2).  
My understanding is that only QuantLib C++ (not yet .jl) has the facilities to create the instruments according to their exact definitions.

Which is probably what you’d call trading-desk level. I’m a derivatives trader so I that’s what I’m after, trading level. Not market-making level though (that would be one extra step, and one for which I have no need at this point).

---

<div class="post-metadata">

**Author:** ![Alec\_Loudenback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alec_loudenback/32/278_2.png) [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Post date:** [May 2, 2023, 2:46pm UTC](https://discourse.julialang.org/t/finance-and-economics-use-cases/9452/104 "2023-05-02T14:46:10Z")

</div>

This was discussed a bit on #finance on slack, but Bank of Canada has a pretty healthy set of Julia packages: [Bank of Canada · GitHub](https://github.com/bankofcanada)

---

<div class="post-metadata">

**Author:** ![MHaensel](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@MHaensel](https://discourse.julialang.org/u/MHaensel)\
**Post date:** [March 10, 2024, 4:22pm UTC](https://discourse.julialang.org/t/finance-and-economics-use-cases/9452/105 "2024-03-10T16:22:18Z")

</div>

Not sure whether this is the right thread for this, but I recently wrote a pedagogical notebook how to implement the Sequence Space Jacobian (SSJ) method by [Auclert et al. (2021)](https://www.econometricsociety.org/publications/econometrica/2021/09/01/using-sequence-space-jacobian-solve-and-estimate-heterogeneous) in Julia. Perhaps it is of interest for some people.

- Everything is implemented from scratch, no black box packages
- Various figures from the original paper are replicated
- The _HetBlock_-Jacobian is obtained using Automatic Differentiation (ForwardDiff.jl)
- Emphasis was on simplicity, so I didn’t implement various optimizations that would further increase speed.

Find the notebook [here](https://mhaense1.github.io/SSJ_Julia_Notebook/SSJ_notebook.html).

---

<div class="post-metadata">

**Author:** ![Alec\_Loudenback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alec_loudenback/32/278_2.png) [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Post date:** [March 11, 2024, 4:18am UTC](https://discourse.julialang.org/t/finance-and-economics-use-cases/9452/106 "2024-03-11T04:18:24Z")

</div>

I am curious if you could share a spreadsheet or alternative implementation so I could test/work towards day-level accuracy. I think it should be possible - with a rewrite of Yields.jl into FinanceModels.jl, the fitting of generic instruments is the normal way of using the package now. I’d be happy to explore this further if you could share a reference example that I could follow.

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [March 11, 2024, 1:25pm UTC](https://discourse.julialang.org/t/finance-and-economics-use-cases/9452/107 "2024-03-11T13:25:13Z")

</div>

> [@MHaensel](#):
>
> Perhaps it is of interest for some people.

I’m interested! Thanks a lot.

[Previous page](https://discourse.julialang.org/t/finance-and-economics-use-cases/9452.md?page=5)
