Skip to content
By Aaron Beckerman

Refinance: reInteractive's finance library

One of our clients needed to do calculations related to loans. For example, if you reduce the interest rate of your loan by 1.1%, but continue to make the same monthly payments, exactly how much shorter will the loan be? Or, more challengingly, if you're making X monthly payments of $Y to pay off a $Z loan, what effective interest rate are you being charged?

There are well-known mathematical formulas that allow us to answer these kinds of questions. (Installment loans like these are called annuities in finance theory.) We couldn't find a pure-Ruby library that implemented them the way we wanted, so we made a gem: Refinance. We've been using it in production for a while, and we just released version 1.0.0.

Numerical analysis is hard, and this company of web developers doesn't fancy parachuting into that warzone. We designed Refinance to be simple and direct, even if that means sacrificing speed, configurability, and numerical stability. Yes, the secant method has significant advantages, but we're okay with boring ol' Newton-Raphson.

We're distributing the source under the MIT License. We'd love for other Ruby programmers to use Refinance, help improve it, and modify it for their own purposes.

Latest Articles by Our Team

Our expert team of designers and developers love what the do and enjoy sharing their knowledge with the world.

We Hire Only the Best

reinteractive is Australia’s largest dedicated Ruby on Rails development company. We don’t cut corners and we know what we are doing.

We are an organisation made up of amazing individuals and we take pride in our team. We are 100% remote work enabling us to choose the best talent no matter which part of the country they live in. reinteractive is dedicated to making it a great place for any developer to work.

Free Community Workshops

We created the Ruby on Rails InstallFest and Ruby on Rails Development Hub to help introduce new people to software development and to help existing developers hone their skills. These workshops provide invaluable mentorship to train developers, addressing key skills shortages in the industry. Software development is a great career choice for all ages and these events help you get started and skilled up.

  • Webinars

    Webinars

    Webinars are our online portal for tips, tricks and lessons learned in everything we do. Make the most of this free resource to help you become a better developer.

    Learn more about webinars

  • Installfest

    Installfest

    The Ruby on Rails Installfest includes a full setup of your development environment and step-by-step instructions on how to build your first app hosted on Heroku. Over 1,800 attendees to date and counting.

    Learn more about Installfest

  • Development Hub

    Development Hub

    The Ruby on Rails Development Hub is a monthly event where you will get the chance to spend time with our team and others in the community to improve and hone your Ruby on Rails skills.

    Learn more about Development Hub

Get the “reinteractive Review” Monthly Email