stratascratch
  • Interview Questions
    • Interview Loops
    • Analytical
    • Algorithm
    • ML Coding
    • Stats Coding
    • Visualization
    • Concept
  • Data Labs
    • Discover
    • Your Notebooks
  • Mock Interview
  • Learn
  • Blog
  • Pricing
  • About
Log in
  • Interview Questions

    • Interview Loops
    • Analytical
    • Algorithm
    • ML Coding
    • Stats Coding
    • Visualization
    • Concept
  • Data Labs

    • Discover
    • Your Notebooks
  • Mock Interview
  • Learn
  • Blog
  • Pricing
  • About
Log inSign up
Back to Projects
  1. Assignment
  2. Your Solution
  3. Solution
  4. Solutions from Users
  5. Discussion

Term Deposit

You must be logged in to download the datasets

J.P. Morgan: Isolate campaign effects via DiD and Instrumental Variables regression. Python, Statsmodels, Scipy, Pandas.

A retail banking institution conducted a series of direct marketing campaigns between 2008 and 2010, reaching customers via phone calls to promote financial products—specifically, term deposits. These efforts generated rich, time-ordered customer-level data now widely used for research and data science education.

Assignment

As a data scientist at J.P. Morgan working with this campaign data, your objective is to derive meaningful and actionable insights from real-world marketing campaign data. By analyzing client features and campaign history, your findings will help inform strategies to improve customer acquisition, optimize outreach channels, and evaluate campaign effectiveness.

This assignment simulates common analytical challenges in retail banking. You are expected to apply rigorous statistical techniques and causal inference methods to deliver trustworthy insights.

The company is interested in answering the following:

  1. Does the communication method (e.g., cellular vs telephone) have a statistically significant effect on term deposit subscriptions?
  2. Does campaign timing (e.g., before vs after summer) causally impact conversion rates?
  3. Can we correct for bias and confounding in campaign data using causal techniques?
  4. How effective are causal inference methods, such as:
    • Difference-in-Differences (DiD)
    • Instrumental Variables (IV)
      in isolating these effects?

Data Description

The file bank-additional-full.csv contains anonymized marketing data collected by a Portuguese retail banking institution between May 2008 and November 2010. It includes 41,188 customer records and the following variables:

  • age – Age of the client
  • job – Occupation type
  • marital – Marital status
  • education – Education level
  • default – Has credit in default
  • housing, loan – Has housing/personal loan
  • contact – Contact communication type (cellular or telephone)
  • month, day_of_week – Timing of last contact
  • duration – Duration of last contact in seconds
  • campaign – Number of contacts during current campaign
  • pdays, previous, poutcome – Previous campaign history
  • emp.var.rate, cons.price.idx, cons.conf.idx, euribor3m, nr.employed – Socioeconomic indicators
  • y – Target: Whether the client subscribed to a term deposit (yes / no)

Practicalities

Use the dataset to apply hypothesis testing and causal inference techniques. Your deliverable should include:

  • A clear explanation of how data was preprocessed
  • Exploratory analysis and relevant visualizations
  • Statistical testing (e.g., A/B testing with confidence intervals)
  • At least one causal inference method (e.g., DiD, IV) with assumptions explained
  • Well-structured and reproducible notebook(s)
  • Interpretation of business implications and limitations
  • Thoughtful commentary on methodological choices