Skip to content

Data Science Interview Questions for Banking & finance Companies

40 questions weighted to the interview style of banking & finance companies — 7 easy, 29 medium, 4 hard.

How banking & finance companies interview for Data Science

Banks and financial-services firms hire for technology, analytics and QA in their global capability centres. Interviews mix technical rounds with domain questions on banking products, regulation, data quality and risk, and they value process discipline.

This set focuses on SQL for Data Science (8), Machine Learning (6), Deep Learning and NLP (5), MLOps and Model Deployment (4).

HR round Managerial round Technical round Hiring manager round Online assessment (aptitude + technical)
Solved — banking & finance companiesStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
3 questions free Unlock the rest in seconds
01

Your LLM assistant confidently quotes a policy clause that does not exist. Why does this happen and how do you reduce it?

Save to ▾
Show answer
Hallucination is when a model produces confident text that is false or not supported by any source. It happens because the model generates plausible tokens rather than checking facts. Reduce it by grounding answers in retrieved documents, asking the model to cite sources and say I do not know when context is missing, using low temperature, and validating outputs with rules or a second checking step. Measure it with a labelled evaluation set.
02

How is an image represented for a deep learning model?

Save to ▾
Show answer
An image is a numeric array of height by width by channels, where a colour image has three channels, usually RGB, with pixel values from 0 to 255. Libraries differ: OpenCV loads BGR in HWC order, while PyTorch expects tensors in CHW order with a batch dimension in front. Before training you convert to float, scale to 0-1 and normalise with the mean and standard deviation used by the pretrained model.
03

How do you tune hyperparameters?

Save to ▾
Show answer
Use grid search, random search or Bayesian optimisation with cross-validation, starting with a coarse random search and narrowing the promising ranges.
04

What is the difference between UNION and UNION ALL?

Save to ▾
Show answer
Both stack the results of two queries with the same number and type of columns. UNION removes duplicate rows, which needs an extra sort or hash step and is slower. UNION ALL keeps every row, including duplicates, and is faster. Use UNION ALL by default when you know the sets do not overlap or when duplicates matter, such as combining transaction logs from two systems.
05

Write Python code to calculate the sample size per group needed to detect a lift from 5 percent to 5.5 percent conversion.

Save to ▾
Show answer
from statsmodels.stats.power import NormalIndPower from statsmodels.stats.proportion import proportion_effectsize baseline, target = 0.05, 0.055 effect = proportion_effectsize(target, baseline) # Cohen's h n = NormalIndPower().solve_power( effect_size=effect, alpha=0.05, power=0.8, ratio=1.0, alternative='two-sided' ) print(round(n)) # about 31,000 users per group
06

The business asks you to pick a decision threshold for a churn model. How do you choose it?

Save to ▾
Show answer
The default 0.5 is rarely right. I would get the cost of each outcome: the value of saving a churner, the cost of a retention offer, and the team's capacity to contact customers. Then I compute expected profit or precision and recall at many thresholds on validation data and pick the one that maximises value within capacity. I would also check that the chosen threshold stays stable over recent months.
07

A deep network you built from scratch does not learn at all; the loss stays flat from the first epoch. Could weight initialisation be the reason?

Save to ▾
Show answer
If weights start too large, activations and gradients explode; if too small, they vanish, and training stalls. If all weights are equal, every neuron learns the same thing. Good schemes keep the variance of activations stable across layers: Xavier or Glorot initialisation for tanh and sigmoid, and He initialisation for ReLU. Frameworks use sensible defaults, but it matters when building custom layers or very deep networks.
08

Write Pandas code to create lag and rolling features for each customer.

Save to ▾
Show answer
df = df.sort_values(['customer_id', 'month']) g = df.groupby('customer_id')['spend'] df['spend_lag1'] = g.shift(1) df['spend_lag3'] = g.shift(3) # shift first so the current month is not included df['spend_roll3_mean'] = g.transform(lambda s: s.shift(1).rolling(3).mean())
09

You added an index but the query is still slow. How do indexes work, and when do they fail to help or even hurt?

Save to ▾
Show answer
An index is a separate sorted structure, usually a B-tree, that lets the database find rows without scanning the whole table, like a book index. It speeds up filters, joins and sorting on the indexed columns. Indexes cost storage and slow down inserts, updates and deletes because each index must be updated. They may be ignored for low-selectivity columns or when a function is applied to the column in WHERE.
10

What should you log for a production prediction service?

Save to ▾
Show answer
For each request, log a request ID, timestamp, model version, input features or a hash of them, the prediction and score, and latency. Log errors and fallback use separately. Do not log raw personal data unless needed and allowed; mask it. Aggregate these logs into dashboards for traffic, latency percentiles, error rate and score distribution. Joining logged predictions with later outcomes gives the data for monitoring and retraining.
11

What is bootstrapping in statistics?

Save to ▾
Show answer
Bootstrapping estimates the uncertainty of a statistic by resampling your data with replacement many times, computing the statistic on each resample, and looking at the spread of results. It gives confidence intervals for things with no simple formula, like the median, a ratio or a model metric such as AUC. It needs no normality assumption, but it relies on the sample being representative and can be slow on very large data.
12

Explain exponential smoothing and the Holt-Winters method.

Save to ▾
Show answer
Simple exponential smoothing forecasts with a weighted average of past values where weights decay exponentially, so recent points matter more. Holt's method adds a smoothed trend component. Holt-Winters adds a seasonal component as well, either additive or multiplicative. Each component has a smoothing parameter between 0 and 1 that is fitted to the data. These models are fast, easy to explain and strong baselines for retail and demand data.
13

You target-encoded a city column and validation AUC jumped from 0.72 to 0.95. What do you suspect?

Save to ▾
Show answer
Target encoding replaces each category with the average target value for that category, for example the churn rate per city. It handles high-cardinality columns compactly. The main risk is leakage: if a row's own target is included in its encoding, the model sees the answer and overfits. Prevent it with out-of-fold encoding, smoothing toward the global mean for rare categories, and fitting only on training data.
14

Write NumPy code for non-maximum suppression on a set of boxes and scores.

Save to ▾
Show answer
import numpy as np def nms(boxes, scores, thr=0.5): x1, y1, x2, y2 = boxes.T areas = (x2 - x1) * (y2 - y1) order = scores.argsort()[::-1] keep = [] while order.size: i = order[0] keep.append(i) w = np.maximum(0, np.minimum(x2[i], x2[order[1:]]) - np.maximum(x1[i], x1[order[1:]])) h = np.maximum(0, np.minimum(y2[i], y2[order[1:]]) - np.maximum(y1[i], y1[order[1:]])) inter = w * h iou = inter / (areas[i] + areas[order[1:]] - inter) order = order[1:][iou < thr] return keep
15

Write SQL to pivot order counts by status into columns using CASE WHEN.

Save to ▾
Show answer
SELECT DATE_TRUNC('month', order_date) AS month, SUM(CASE WHEN status = 'delivered' THEN 1 ELSE 0 END) AS delivered, SUM(CASE WHEN status = 'cancelled' THEN 1 ELSE 0 END) AS cancelled, SUM(CASE WHEN status = 'returned' THEN 1 ELSE 0 END) AS returned FROM orders GROUP BY 1 ORDER BY 1;
16

Your image classifier trained on 2,000 images memorises the training set within 5 epochs. What do you try?

Save to ▾
Show answer
With so little data, I would use transfer learning from a pretrained model like ResNet or EfficientNet and fine-tune only the top layers first. I would add data augmentation such as flips, crops and colour changes, use dropout and weight decay, and apply early stopping on validation loss. Collecting more labelled images or using a smaller model also helps. I would check for duplicate images across train and validation sets too.
17

What is the difference between hard voting and soft voting in ensembles?

Save to ▾
Show answer
In hard voting each model predicts a class and the majority wins. In soft voting each model gives class probabilities, they are averaged, and the class with the highest average wins. Soft voting usually works better because it uses each model's confidence, but it needs calibrated probabilities from all models. Hard voting is simpler and works even with models that only output labels.
18

Write SQL to show each customer's first order date, last order date and the gap between them in days.

Save to ▾
Show answer
SELECT customer_id, MIN(order_date) AS first_order, MAX(order_date) AS last_order, MAX(order_date) - MIN(order_date) AS days_between, COUNT(*) AS orders FROM orders GROUP BY customer_id ORDER BY days_between DESC; -- PostgreSQL: DATE minus DATE gives days; use DATEDIFF in other engines
19

Write SQL to find the median order value per city.

Save to ▾
Show answer
SELECT city, PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY amount) AS median_amount FROM orders GROUP BY city; -- PERCENTILE_CONT interpolates; PERCENTILE_DISC returns an actual value
20

Write SQL to find duplicate emails in a users table.

Save to ▾
Show answer
SELECT email, COUNT(*) AS cnt FROM users GROUP BY email HAVING COUNT(*) > 1 ORDER BY cnt DESC;
21

Tell me about a time an experiment result changed a product decision.

Save to ▾
Show answer
Situation: the team was confident a redesigned home page would increase orders. Task: I owned the experiment design and analysis. Action: I set conversion as primary and session length and refunds as guardrails, ran it for two full weeks and found no lift in orders but a drop for older app versions. Result: we fixed the performance issue, retested, and shipped a version that raised orders by about 1.5 percent.
22

Write a prompt template for classifying customer support tickets.

Save to ▾
Show answer
System: You classify support tickets for an e-commerce company. Categories: payment, delivery, refund, account, other. Rules: choose exactly one category; if unsure, choose other; do not invent details. Return JSON with fields category and reason, reason under 20 words. Then two short examples showing a ticket and the expected JSON. User: Ticket: {ticket_text}. Keep the template fixed and test it on 100 labelled tickets before rollout.
23

What is the difference between ROW_NUMBER, RANK and DENSE_RANK?

Save to ▾
Show answer
All three number rows within a window ordered by some column. ROW_NUMBER gives unique numbers even for ties: 1, 2, 3. RANK gives tied rows the same rank and skips the next numbers: 1, 1, 3. DENSE_RANK gives ties the same rank without gaps: 1, 1, 2. Use ROW_NUMBER to pick exactly one row per group, and DENSE_RANK for questions like the second highest distinct salary.
24

How do you pull large data from a SQL database into Pandas efficiently?

Save to ▾
Show answer
Push as much work as possible into SQL: filter, aggregate and select only needed columns before pulling. Use pd.read_sql with a SQLAlchemy engine and chunksize to stream large results. For very large extracts, export to Parquet from the warehouse and read that, which is much faster than row-by-row transfer. Set dtypes like category early, and never use SELECT star on a big table from a notebook.
25

Your fraud model has 99 percent accuracy, but the business says it catches almost no fraud. Why?

Save to ▾
Show answer
If only 1 percent of transactions are fraud, a model that predicts not fraud for everything is 99 percent accurate and useless. Accuracy hides the minority class. I would check the confusion matrix, recall on fraud cases and precision-recall AUC. Then fix it with class weights, resampling or a lower decision threshold, and choose the threshold based on the cost of missed fraud versus false alerts.
26

Tell me about a time you deployed a model under a tight deadline.

Save to ▾
Show answer
Situation: a pricing model had to go live before a sale in ten days. Task: deploy safely in that window. Action: I cut scope to batch scoring instead of real-time, reused our standard Docker and Airflow template, wrote tests for the key features and set up a dashboard for score distribution. Result: it went live two days early and ran without incidents during the sale. Real-time scoring followed a month later.
27

Your random forest is accurate but too slow at prediction time for a real-time API. What do you do?

Save to ▾
Show answer
First measure where the time goes. Then reduce trees and maximum depth and check the accuracy loss. Switch to a gradient boosting model, which often needs fewer, smaller trees. Compile the model with tools like ONNX Runtime or Treelite. Cache features or precompute scores for known users. If accuracy allows, a simpler logistic regression may meet the latency budget easily. Always compare options on the same validation set.
28

Soon after a new model version went live, customer complaints spiked. How do you roll back safely and learn from it?

Save to ▾
Show answer
Roll back immediately to the previous registry version through the deployment pipeline, rather than editing servers by hand, and confirm metrics recover. Then investigate offline: compare predictions of both versions on the same traffic, check feature pipelines and data changes, and review what the offline evaluation missed. Add the failing cases to the test set, and use canary or shadow rollout with alert thresholds for future releases.
29

Your feature computation on millions of rows uses only one CPU core. Would you use threads or processes to speed it up?

Save to ▾
Show answer
Because of the GIL, threads in CPython do not run Python bytecode in parallel. Threads are fine for I/O-bound work like calling APIs or reading many files. For CPU-bound work like feature computation on chunks, multiprocessing or joblib runs separate processes on separate cores. The cost is process start-up time and copying data between processes. Many NumPy and Pandas operations already release the GIL internally, so measure before adding complexity.
30

What do temperature and top-p control in LLM generation?

Save to ▾
Show answer
Both control randomness when the model picks the next token. Temperature scales the probabilities: low values like 0 to 0.3 make output focused and repeatable, high values make it more varied and creative. Top-p, nucleus sampling, keeps only the smallest set of tokens whose probabilities add up to p, such as 0.9, and samples from them. For extraction and classification use low temperature; for brainstorming use higher values.
31

Why are NumPy arrays faster than Python lists?

Save to ▾
Show answer
They store same-type values in contiguous memory and run vectorised operations in compiled C, avoiding Python loop overhead and per-object type checks.
32

You assign values to a filtered DataFrame and Pandas shows a SettingWithCopyWarning. What is going on and how do you fix it?

Save to ▾
Show answer
The warning appears when you assign values to something that may be a copy of a slice instead of the original DataFrame, for example df[df.age > 30]['flag'] = 1. The original may not change. Fix it by using a single .loc call, like df.loc[df.age > 30, 'flag'] = 1, or by taking an explicit .copy() when you really want a separate DataFrame. Copy-on-write in newer Pandas versions makes this behaviour more predictable.
33

How do you use groupby with multiple aggregations?

Save to ▾
Show answer
df.groupby('region').agg(total=('sales','sum'), avg=('sales','mean')) gives named aggregations per group in one pass.
34

How do you deploy and monitor a machine learning model?

Save to ▾
Show answer
Package the model behind an API with versioning, track latency and errors, monitor input drift and prediction quality, and automate retraining with rollback.
35

What is an autoencoder and what is it used for?

Save to ▾
Show answer
A network that compresses inputs into a small latent code and reconstructs them; used for denoising, dimensionality reduction and anomaly detection.
36

What is transfer learning?

Save to ▾
Show answer
Reusing a model pretrained on a large dataset and fine-tuning it on a smaller task-specific dataset, saving data, time and compute.
37

Write Python code to fit a Holt-Winters model and forecast the next 12 months.

Save to ▾
Show answer
from statsmodels.tsa.holtwinters import ExponentialSmoothing s = df.set_index('month')['sales'].asfreq('MS') train, test = s[:-12], s[-12:] model = ExponentialSmoothing( train, trend='add', seasonal='mul', seasonal_periods=12 ).fit() forecast = model.forecast(12) mae = (forecast - test).abs().mean() print(forecast.round(1), 'MAE:', round(mae, 1))
38

Which activation functions do you know and when to use them?

Save to ▾
Show answer
ReLU for hidden layers, sigmoid for binary outputs, softmax for multi-class outputs and tanh when zero-centred outputs help; Leaky ReLU avoids dead neurons.
39

What is DBSCAN and when is it better than K-means?

Save to ▾
Show answer
DBSCAN is a density-based clustering algorithm. It groups points that have at least min_samples neighbours within distance eps, and marks isolated points as noise. Unlike K-means, it does not need the number of clusters, finds clusters of any shape, and handles outliers. It struggles when clusters have very different densities and in high dimensions. It suits location data, like finding delivery hotspots from GPS points.
40

Explain the Law of Large Numbers.

Save to ▾
Show answer
As the number of independent trials grows, the sample average converges to the true expected value, which is why larger samples give more stable estimates.

Banking & finance companies (18)

Banking & finance

Goldman Sachs

Data Science interview questions

  • 40 questions
  • 5 rounds

Bengaluru, Hyderabad, Mumbai

View questions
Banking & finance

JP Morgan Chase

Data Science interview questions

  • 40 questions
  • 5 rounds

Mumbai, Bengaluru, Hyderabad

View questions
Banking & finance

Morgan Stanley

Data Science interview questions

  • 40 questions
  • 5 rounds

Mumbai, Bengaluru

View questions
Banking & finance

Barclays

Data Science interview questions

  • 40 questions
  • 4 rounds

Pune, Chennai, Noida +1

View questions
Banking & finance

HSBC

Data Science interview questions

  • 40 questions
  • 4 rounds

Hyderabad, Pune, Bengaluru

View questions
Banking & finance

American Express

Data Science interview questions

  • 40 questions
  • 5 rounds

Gurugram, Bengaluru

View questions
Banking & finance

Wells Fargo

Data Science interview questions

  • 40 questions
  • 4 rounds

Hyderabad, Bengaluru, Chennai

View questions
Banking & finance

Citi

Data Science interview questions

  • 40 questions
  • 5 rounds

Pune, Chennai, Mumbai +2

View questions
Banking & finance

Deutsche Bank

Data Science interview questions

  • 40 questions
  • 5 rounds

Pune, Bengaluru, Mumbai +1

View questions
Banking & finance

Standard Chartered

Data Science interview questions

  • 40 questions
  • 4 rounds

Chennai, Bengaluru, Mumbai

View questions
Banking & finance

HDFC Bank

Data Science interview questions

  • 40 questions
  • 4 rounds

Mumbai, Chennai, Bengaluru

View questions
Banking & finance

ICICI Bank

Data Science interview questions

  • 40 questions
  • 4 rounds

Mumbai, Hyderabad, Chennai +1

View questions
Banking & finance

Kotak Mahindra Bank

Data Science interview questions

  • 40 questions
  • 4 rounds

Mumbai, Bengaluru

View questions
Banking & finance

Axis Bank

Data Science interview questions

  • 40 questions
  • 4 rounds

Mumbai, Bengaluru

View questions
Banking & finance

State Bank of India

Data Science interview questions

  • 40 questions
  • 4 rounds

Mumbai, Navi Mumbai

View questions
Banking & finance

Fidelity Investments

Data Science interview questions

  • 40 questions
  • 4 rounds

Bengaluru, Chennai, Gurugram

View questions
Banking & finance

UBS

Data Science interview questions

  • 40 questions
  • 4 rounds

Pune, Mumbai, Hyderabad

View questions
Banking & finance

BNY

Data Science interview questions

  • 40 questions
  • 4 rounds

Pune, Chennai

View questions

Frequently asked questions

How are Data Science interviews at banking & finance companies different?

Banks and financial-services firms hire for technology, analytics and QA in their global capability centres. Interviews mix technical rounds with domain questions on banking products, regulation, data quality and risk, and they value process discipline.

Which banking & finance companies are covered?

This page links to 18 banking & finance companies, including Goldman Sachs, JP Morgan Chase, Morgan Stanley, Barclays, HSBC, American Express, Wells Fargo, Citi. Each has its own page with rounds and a separate practice set.

What rounds should I expect?

Common rounds at these companies include: HR round; Managerial round; Technical round; Hiring manager round; Online assessment (aptitude + technical). The exact process varies by company and role.