Banking Firm: Code Review & R Package Development

Cartoon of a robot standing in front of a server
Client

Banking Firm

Sector

Financial

The Challenge

The client came to Jumping Rivers having already written the code for their problem in VBA. They were trying to evaluate four measurements for agreements with their clients in the UK. Although they had technically solved the problem, VBA is limited in speed. Hence running it on a data set containing 3,000 agreements was taking twenty minutes. The end goal was to run it on 3,000,000 agreements. They estimated that for this data set, the code would take several days to run.

The Project

The client contacted Jumping Rivers looking to re-write and improve on their code. They had already evaluated that R was the tool for the job, and with Jumping Rivers’ knowledge and experience they decided we were the team for the job.

Our Results

Having looked at the problem, Jumping Rivers estimated that if written in R, the code would take not days, but hours to run. We suggested a flexible solution that made use of R’s excellent functionality for performing a task iteratively. In testing, we shortened the running time for the data set containing 3,000 agreements from 20 minutes to 30 seconds, over twenty times faster.

In the end, we cut the total run time for the full 3,000,000 agreements down to seven hours, meaning the client was able to evaluate their four measurements. In addition, Jumping Rivers ensured that the code was packaged as an R package, and was part of a reproducible workflow, giving the clients the chance to inspect the code themselves, and use it for future problems.