How we applied Machine Learning into the Lending Network

During the past few years peer-to-peer lending has become increasingly popular in Scandinavia. Only in Finland the lending rates have increased by five times up to 250meur market. As the major share of the revenue is received by p2p brokers, the usual margin for the lender lies around 10-12%.

Instead of investing with statistic parameters to loan applications, we spent couple of moments re-thinking if

  • application could be built that negotiates with p2p platform and processes loan applications,
  • artificial intelligence could be to adapted to that application giving an advance compared to other investors.

After a short evaluation, the answer was yes for both cases. The first was solved by one of the p2p lender platforms where we received access through their APIs to build our own loan processing system. The second we tried to solve by ourselves.

Gathering the core elements

So we decided to try out to build such an system. The result was a cloud based (aws) 3-tier (httpd, tomcat, mysql) app with dedicated devkit (IntelliJ, mvn, cargo, git). The app itself takes advantage of open libraries (eclipselink, lambda, json, log4j2, jackson) to automate pojo related work. Propably not the most elegant app architecture in the planet but should serve for this rehearsal.

The application itself is built to maintain a dialogue with p2p platform to accept incoming application loans, analyze them and send a loan decision. It is also connected to data mining system that can be used to analyze the loans further and to analyze where would the the investment, risk and the outcome be optimally met.

The application itself builds around LoanBuilder -class that is derived to three subtypes. When the application is started the first subtype takes place Рit tries to answer to the market needs through reasoned rules, requiring very limited data on market conditions. After a running application for week or two, the next subtype takes a place and puts more weight into the market and takes more deterministic behaviour based on the market conditions.

Finally, after couple of months, the 3rd subtype takes a place containing AI based algorithm that is ready to process the statistical model developed with data mining tool. The algorithm’s model itself is built upon decision tree that evaluates different socioeconomics factors and past investments to determine a optimal investement.

The bottom idea is here to show that you do need not to wait outcome data for the app to function. You can reap most of the benefits by using common sense to select variables for the optimal investment and then the simplest possible rules to overcome your targets.

So did it work?

It’s hard to say yet. When glanced into logs, we can see that the application has done several thousand offers and, based on data, those offers that were accepted are slightly above the market rate. Time will tell if the application can assess the risk properly through the ai subtype described in the earlier paragraph.

What’s next

Let’s say that after this rehearsal we propably shall not receive descent buyback, but rather receive insight what kind of new possibilities there relies for private investors and how they could be applied to p2p networks.

Next it’s time to shape up the ai based model and to oversee how it can be fine tuned to respond market conditions better.