Growing a DSL for financial calculations

The story of how my colleague and I ‘discovered’ a Scala DSL for writing complex mortgage calculations.

Abstract

Rabobank is a Dutch multinational banking and financial services company headquartered in Utrecht, the Netherlands. One of their services is providing mortgage loans. Determining the height of the loans involves some rather complex calculations. They were struggling to represent these calculations in an understandable and reliably testable way for both domain experts and developers. We helped them develop an internal DSL in Scala that allows them to express these complex calculations in an idiomatic way that is not just easy to read for both developers and business analysts, but more testable as well. Harnessing functional programming principles and the strong Scala compiler, it also provides full typesafety with a syntax that lies very close to human language, allowing fully typesafe constructs such as ‘amount per month’ and ‘amount per year’. In this talk, I will explain the concepts behind the DSL, how we implemented them without adding any dependencies to the project (except ScalaTest, of course), and the design decisions we had to make along the way.

Deliveries

  • HBO-ICT Job & Student event Rotterdam
    7 October 2016
    [event]
  • Ordina Innoveer Jij Mee sessie
    19 May 2016
    [aftermovie]
  • Typelevel Summit Oslo
    4 May 2016
    [event] [slides] [video]
  • Appril Festival
    13 April 2016
    [event]
  • Brabant Scala Meetup
    31 March 2016
    [event]
  • Codestar Launch Event
    24 March 2016
    [event] [partial video]
  • Scala Utrecht Meetup
    23 November 2015

Updated: