© 2016. Capital One Bank - All Rights Reserved.
Loan Decisioning Transformation
Project IDEAL(Intelligent Decisioning Engine for Auto Lending)
Fred Crable, Director, Software [email protected]
2© 2016. Capital One Bank - All Rights Reserved.
About Capital One
• A leading diversified bank – One of the largest Credit Card companies – Top 10 bank in US– Nation’s largest digital bank– 3rd largest independent auto loan provider in US– Largest consumer and commercial banking institution
headquartered in the Washington, DC region• Major operations in 15 US cities, Canada, UK• More than 70 million customer accounts• Business & Leadership
– Ranked #127 on the Fortune 500– Ranked #128 on Forbes
“Most Reputable Companies” list– Listed on The Financial Times “Global 500” (#278)– Ranked Training magazine's “Top 125” companies for
employer-sponsored workforce training and development
2
4Confidential
Pull Credit
• Equifax• Transunion• Experian• Lexis Nexis
*AnalyticModels
• Customer FICO, Debt
• Collateral Loan to Value
• Back/Front-End
• Pricing Tiers
*Policy Engine
• Max $ Financed
• Tiers• Limits• Fees• Exceptions
Pick Best
• Cash Down• Sales Price• Warranty• APR
IDEAL - Fast Data Use Case
*Run 1000’s in Parallel and pick the best
5© 2016. Capital One Bank - All Rights Reserved.
Big Data Use Case 1 – Analyze and Adjust
• Customer• Collateral
Application
• Credit Report• Driver
VariablesCredit
• In/Out of Policy
• Offers• Scores
Model / Policy
• Accept / Reject
• APR, Finance Amount...
Outcome
• Adjust• AvoidAnalyze
Ref
it / T
est
6© 2016. Capital One Bank - All Rights Reserved.
Big Data Use Case #2 – Inventory Search & Scoring
•Inventory•Book ValueSearch
•Model Scoring
•Policy Checks
Model / Policy
•In/Out of Policy
•APR, Finance Amount...
Outcome
7© 2016. Capital One Bank - All Rights Reserved.
Our Implementation over AKKA
• A system that loads a set of services and uses these services in order specified– Operations can run in parallel or in sequence ( if they have dependencies )
• The sequence of operations and order of operations are configuration driven• The initial operation is evaluated and the result set tested to continue • System takes input from Queue or API and kicks-off the sequence • Operation chains can be expressed as data condition tests or model/mathematical
operations (expressed as configuration yaml or json)
8© 2016. Capital One Bank - All Rights Reserved.
Open Source Scoring Platform with Basic Decisioning Workflow
• Runs 10s of thousands of models per second on a single server (4 cores).
• This will scale out with more cores or servers. As they are added this number increases.
• We can add additional actor systems for other asynchronous activities (e.g. Bureaus or external data sources)
9© 2016. Capital One Bank - All Rights Reserved.
AKKA basics
• AKKA helps implement parallel computing easier. Through Actor model.• AKKA helps to implement distributed parallel computing easier.• Develop code as actor and message handling – (Loosely a java thread).
10Confidential
Using an Actor (Java)
public class Calculator implements Receiver { LoggingAdapter log = Logging.getLogger(TypedActor.context().system(), this); public void onReceive(Object msg, ActorRef actor) { log.info("Received Message Q> {}", msg); }}
//Get access to the ActorRefActorRef calActor = TypedActor.get(_system).getActorRefFor(calculator);//pass messagecalActor.tell("Hi'there");
11© 2016. Capital One Bank - All Rights Reserved.
Actor Flow Development – JSON Defined Workflow
APIInitiates /
Blocks
Parallel Operatio
nGroup 1 Element 1
Parallel Operatio
nGroup 1 Element 2
Parallel Operatio
nGroup 1 Element 3
Serial Operatio
nGroup 2 Element 1
Serial Operatio
nGroup 2 Element 2
Message Handler
Supervisor
{ "actorSystemName": ”SimpleSystem", "context": { "type": "Define", "supervision": "Escalate", "router": "RandomPool", "lowerCount": 1, "upperCount": 1, "childrenMode": "Sequential” }, "messageHandler": [ { "name": "MessageHandler1", "desc": "MessageHandler1", "clazz": ”Class1", "group": [ { "name": "g1", "desc": "g1", "order": 1, "context": { "type": "Inherit", "childrenMode": ”Parallel" }, "element": [ { "id": 1, "name": "group1-element1", "desc": ”first actor in sequence", "order": 1, "clazz": [ ”MessageInput" ], "bean": ”Class1Bean" } … ] } ] },
interface Class1Bean <MessageInput, MessageOutput> extends ServiceInterface {…public MessageOutput execute(MessageInput M1)
14© 2016. Capital One Bank - All Rights Reserved.
Actor Workflow Mechanics – Operation and Service Definition
"messageHandler": [ { "name": "ApplicationScoringService", "desc": "ApplicationScoringService", "clazz": "com.capitalone.auto.lo.business.Application", "context": {
"group": [ { "name": "ideal", "desc": "ideal credit pull and decisioning workflow", "order": 1, "context": {
"childrenMode": "Sequential", "carryoverRequest": "true"
}, "element": [
{ "name": "dataService", "desc": ”get credit data and alternate
data", "clazz": [ "CurrentMessage" ], "bean": ”DataService"
},
Define service Bean and
relative order of execution
15© 2016. Capital One Bank - All Rights Reserved.
Actor Workflow Mechanics – Conditional Rules
"conditions": [ {
"id": 1, "name": "Exception", "reference": "any executionElementId",
"watch": { "values": ["throws java.lang.Exception”]
}
},{ "id": 2, "name": "PrescoreResponse", "reference": "executionElementId:1.1.1", "watch": { "values": ["com.capitalone.auto.lo.response.PreScoreResponse[getAppDecision notEquals A]"]
}
},
Define service Bean and
relative order of execution
16© 2016. Capital One Bank - All Rights Reserved.
Actor Workflow Mechanics – Conditional Flow
"consequences": [ {
"id": 1, "order": 1, "name": "Exception", "action": {
"whenMatched": [ "Exception”], "thenGoto": "executionElementId:1.3.1" }
}, {
"id": 2, "order": 2, "name": "PreScoreDecline", "action": {
"whenMatched": [”ModelScoringResponse"], "thenGoto": "executionElementId:1.2.1"
} },
Define service Bean and
relative order of execution
18© 2016. Capital One Bank - All Rights Reserved.
Best Practices
• Plan out your logging strategy with MDC (thread local variable) and use tools like Splunk
• Identify actors like a person, with state and identity• Limit granularity of fan-out or scatter-gather operations• Make sure all actors have the data they need to do their jobs w/o calling
external resources• Make sure actor operations are idempotent• Take checkpoints and use AKKA persistence where applicable
Top Related