# Computations that differentiate, debug, and document themselves

DevFeed: [Computations that differentiate, debug, and document themselves](<https://devfeed.tech/articles/computations-that-differentiate-debug-and-document-themselves-20161.md>)

Original publisher: [Read original article](<https://blog.janestreet.com/computations-that-differentiate-debug-and-document-themselves/>)

Author: Aditya Srinivasan

Published: 2022-11-17T00:00:00Z

Content type: article

Language: en

Sources: [Jane Street](<https://devfeed.tech/sources/jane-street.md>)

Topics: [Optimization](<https://devfeed.tech/topics/optimization.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [OCaml](<https://devfeed.tech/topics/ocaml.md>), [LaTeX](<https://devfeed.tech/topics/latex.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [debug](<https://devfeed.tech/tags/debug.md>), [latex](<https://devfeed.tech/tags/latex.md>), [ocaml](<https://devfeed.tech/tags/ocaml.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [programming](<https://devfeed.tech/tags/programming.md>)

## AI overview

Jane Street describes a library for numerical computations that can evaluate values, automatically differentiate variables, inspect intermediate results for debugging, and generate LaTeX documentation. The library was designed for computations expressed naturally in OCaml and for the needs of Jane Street's production systems.

## Source excerpt

One of the problems we wrestle with at Jane Street is how to understand and manage the costs associated with the positions we hold: things like margin, financing costs, market risk, regulatory capital requirements, and so on. To that end, we've built systems that estimate these costs and propose ways to reduce them. Essentially, this is a numerical optimization problem.