← Bank of America Interview Insights

Bank of America·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Apr 2026

Summary

Quant Engineer interview at Bank of America that went pretty deep into regression theory. Not a coding round, more of a sit-down-and-explain-the-math session. Came out feeling okay but there were a couple moments where I was clearly working through things in real time.

Questions Asked (5)

Q1

What is regression, and specifically what does a linear regression model try to capture?

Data ModelingTechnical Trade-offs
Author's notes

Fine, answered it fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining regression in simple terms, then explain that linear regression models the linear relationship between input features and a continuous target by fitting a line (or hyperplane) that minimizes prediction error. Emphasize that it captures the conditional mean of the target given the inputs, and mention its assumptions and limitations.

Pro tip: Connect the explanation to a practical example, such as predicting loan default risk or interest rates, to show how regression supports decision-making in banking. Also, briefly note that linear regression is a foundational model that underpins more complex techniques, demonstrating awareness of trade-offs.

1. Define regression

Explain that regression is a supervised learning technique used to predict a continuous output variable based on one or more input variables.

2. Describe linear regression

State that linear regression assumes a linear relationship between inputs and output, and finds the best-fitting straight line (or hyperplane) by minimizing the sum of squared errors.

3. Explain what it captures

Clarify that it captures the conditional mean of the target given the inputs, i.e., the expected value of the output for given feature values.

4. Mention assumptions and limitations

Briefly note key assumptions like linearity, independence, homoscedasticity, and normality of errors, and that violations can affect validity.

5. Relate to role/context

Give a relevant example, such as predicting credit risk or housing prices, to show practical application in a banking/software engineering context.

Key Points to Mention

  • Regression predicts continuous outcomes, unlike classification which predicts discrete labels.
  • Linear regression models the relationship as a linear equation: y = β0 + β1x1 + ... + βnxn + ε.
  • It minimizes the residual sum of squares (RSS) or mean squared error (MSE) to find optimal coefficients.
  • It captures the conditional mean E[y|X], not the full distribution.
  • Assumptions: linearity, independence, homoscedasticity, normality of errors, and no multicollinearity.
  • Limitations: sensitive to outliers, assumes linearity, and may underfit complex relationships.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Walk me through the classical assumptions underlying OLS estimation.

Data ModelingTechnical Trade-offs
Author's notes

This is where I started to sweat a little.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by stating the classical assumptions clearly and concisely, then explain why each matters for OLS to be BLUE (Best Linear Unbiased Estimator). Finally, connect the assumptions to practical implications in a software engineering context, such as data quality checks or model validation.

Pro tip: Emphasize that while strict exogeneity is critical for causal inference, in practice many software engineers focus on prediction, where some assumptions (like normality) are less critical. Showing this nuance demonstrates maturity.

1. Define OLS and its goal

Briefly explain that OLS estimates coefficients by minimizing the sum of squared residuals, and the classical assumptions ensure desirable statistical properties.

2. List the classical assumptions

Enumerate the assumptions: linearity in parameters, random sampling, no perfect multicollinearity, zero conditional mean (exogeneity), homoskedasticity, and no autocorrelation (for time series).

3. Explain the consequences of violations

Describe how violating each assumption affects OLS: e.g., omitted variable bias from exogeneity violation, inefficient estimates from heteroskedasticity, etc.

4. Relate to software engineering practice

Discuss how these assumptions translate into data preprocessing, feature engineering, and model diagnostics in a production environment.

5. Conclude with the Gauss-Markov theorem

Summarize that under these assumptions, OLS is BLUE, and note that normality is needed for inference but not for unbiasedness.

Key Points to Mention

  • Linearity in parameters: the model is linear in coefficients, not necessarily in variables.
  • Random sampling: observations are independently and identically distributed (i.i.d.).
  • No perfect multicollinearity: no exact linear relationships among predictors.
  • Zero conditional mean (exogeneity): the error term has zero expected value given any predictor.
  • Homoskedasticity: constant variance of errors across all levels of predictors.
  • No autocorrelation: errors are uncorrelated across observations (especially important for time series).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Derive the OLS closed-form estimator.

Data ModelingAlgorithms & Data Structures
Author's notes

They actually wanted the derivation, not just the formula.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly stating the OLS objective: minimize the sum of squared residuals. Then derive the normal equations using matrix calculus, and solve for the coefficient vector to obtain the closed-form estimator. Finally, briefly mention the assumptions required for the estimator to be valid.

Pro tip: Emphasize the geometric interpretation: OLS projects the response vector onto the column space of the design matrix, which gives the normal equations directly. This shows deeper understanding and connects to linear algebra concepts valued in software engineering.

1. Define the model and objective

State the linear model y = Xβ + ε and define the OLS objective as minimizing the sum of squared residuals: S(β) = (y - Xβ)^T (y - Xβ).

2. Expand the objective

Expand the quadratic form: S(β) = y^T y - 2β^T X^T y + β^T X^T X β. This sets up for differentiation.

3. Differentiate and set to zero

Take the gradient with respect to β: ∂S/∂β = -2X^T y + 2X^T X β. Set it to zero to obtain the normal equations: X^T X β = X^T y.

4. Solve for β

Assuming X^T X is invertible, solve the normal equations: β_hat = (X^T X)^{-1} X^T y. This is the OLS closed-form estimator.

5. Discuss assumptions and properties

Mention key assumptions: linearity, exogeneity, no perfect multicollinearity, homoscedasticity, and no autocorrelation. Under these, OLS is BLUE (Best Linear Unbiased Estimator) by Gauss-Markov theorem.

Key Points to Mention

  • The normal equations: X^T X β = X^T y
  • The closed-form solution: β_hat = (X^T X)^{-1} X^T y
  • Geometric interpretation: projection of y onto column space of X
  • Assumption of full column rank (no perfect multicollinearity) for invertibility
  • Gauss-Markov theorem and BLUE properties
  • Computational considerations: using QR decomposition or pseudo-inverse for numerical stability

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

Why is multicollinearity a problem in regression, and what are some ways to deal with it?

Data ModelingTechnical Trade-offsRoot Cause Analysis
Author's notes

Talked about variance inflation and how the coefficient estimates get unstable, signs can flip, and numerically the matrix inversion gets sketchy.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining multicollinearity and explaining its consequences in regression, such as unstable coefficient estimates and inflated standard errors. Then, discuss practical detection methods and remedies, emphasizing trade-offs and context-specific choices. Tailor your answer to a software engineering role by highlighting computational and implementation aspects.

Pro tip: Mention that multicollinearity doesn't affect predictive performance but harms interpretability, and in a banking context, interpretability is often critical for regulatory compliance. Also, suggest using domain knowledge to decide whether to drop or combine features.

1. Define multicollinearity

Explain that multicollinearity occurs when two or more predictor variables in a regression model are highly correlated, making it difficult to isolate their individual effects.

2. Explain why it's a problem

Discuss how multicollinearity leads to unstable coefficient estimates, inflated standard errors, and reduced statistical power, which complicates interpretation and inference.

3. Detection methods

Mention techniques like correlation matrices, variance inflation factor (VIF), and condition number to identify multicollinearity.

4. Remedies and trade-offs

List common solutions such as removing or combining variables, using regularization (ridge regression), principal component analysis (PCA), or collecting more data, and discuss their trade-offs.

5. Contextual application

Relate to the banking domain: emphasize that interpretability is crucial for regulatory and business decisions, so remedies should preserve interpretability when possible.

Key Points to Mention

  • Definition: high correlation among predictors
  • Consequences: unstable coefficients, inflated standard errors, difficulty in interpretation
  • Detection: correlation matrix, VIF > 5 or 10, condition number
  • Remedies: feature selection, dimensionality reduction (PCA), regularization (ridge, lasso), centering
  • Trade-offs: bias-variance trade-off, interpretability vs. predictive performance
  • Banking context: regulatory need for interpretable models, so prefer simple solutions like removing correlated features

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

Compare L1 and L2 regularization. What are the differences in behavior, and when would you prefer one over the other?

Technical Trade-offsData ModelingAlgorithms & Data Structures
Author's notes

This one got pretty involved.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining L1 and L2 regularization mathematically, then contrast their effects on model coefficients and sparsity. Discuss practical implications such as feature selection, computational efficiency, and robustness, and conclude with when to prefer each based on problem characteristics and domain constraints.

Pro tip: In banking, where interpretability and regulatory compliance are critical, emphasize that L1's feature selection can simplify model explanations, but also mention that L2 is often preferred when all features are relevant and multicollinearity is a concern.

1. Define L1 and L2

Clearly state that L1 adds the sum of absolute weights to the loss, while L2 adds the sum of squared weights. Mention that L1 promotes sparsity (many weights become exactly zero) and L2 promotes small but non-zero weights.

2. Explain behavioral differences

Discuss how L1 leads to feature selection and simpler models, while L2 distributes weight more evenly and handles correlated features better. Note that L1 is non-differentiable at zero, requiring subgradient methods, while L2 is smooth and easier to optimize.

3. Discuss practical implications

Cover computational aspects: L1 can be solved with techniques like coordinate descent or LARS, L2 with gradient descent. Mention that L1 is robust to outliers in features, while L2 is sensitive but provides stability.

4. When to prefer each

Prefer L1 when you need a sparse model for interpretability or when you suspect many features are irrelevant. Prefer L2 when all features contribute and you want to prevent overfitting without eliminating features, or when features are highly correlated.

5. Mention Elastic Net

Briefly note that Elastic Net combines L1 and L2, often used when there are multiple correlated features or when you want a balance between sparsity and stability.

Key Points to Mention

  • L1 regularization (Lasso) adds penalty equal to absolute value of coefficients; L2 (Ridge) adds penalty equal to square of coefficients.
  • L1 induces sparsity and can be used for feature selection; L2 does not produce zero coefficients but shrinks them.
  • L1 is more robust to outliers in features; L2 is sensitive but provides smoother solutions.
  • L2 handles multicollinearity better by distributing weights among correlated features; L1 tends to pick one arbitrarily.
  • Computational differences: L1 requires special optimization (e.g., subgradient, coordinate descent), L2 has closed-form solutions in some cases.
  • Elastic Net combines both penalties and is useful when there are correlated features or when you want both sparsity and stability.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.