← Bank of America Interview Insights

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

Intermediate
Jun 2026

Summary

Quant Engineer interview at Bank of America that was pretty heavy on regression theory. They went deep on the math, not just surface-level definitions, so if you're rusty on derivations you'll feel it.

Questions Asked (5)

Q1

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

Data ModelingTechnical Trade-offs
Author's notes

Seemed like a warmup but they actually wanted precision.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start with a clear, concise definition of regression as a supervised learning technique for predicting continuous outcomes. Then explain that linear regression specifically models the linear relationship between input features and a continuous target by fitting a line (or hyperplane) that minimizes the error between predictions and actual values. Use a simple example to illustrate, and connect it to how banks might use it for risk assessment or forecasting.

Pro tip: Emphasize that linear regression captures the conditional mean of the target given the features, and mention that it assumes a linear relationship, independence of errors, and homoscedasticity—showing you understand both its power and limitations. This demonstrates maturity and an ability to assess trade-offs, which is crucial in a banking context.

1. Define regression

Explain that regression is a type of supervised learning used to predict a continuous output variable based on one or more input variables. It models the relationship between dependent and independent variables.

2. Explain linear regression

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

3. What it captures

State that linear regression captures the conditional mean of the target variable given the features, i.e., the expected value of the output for given inputs. It quantifies the average change in the target associated with a one-unit change in a feature, assuming other features are held constant.

4. Assumptions and limitations

Mention key assumptions: linearity, independence of errors, homoscedasticity, and normality of errors. Note that violations can lead to biased or inefficient estimates, and that linear regression may not capture complex non-linear relationships.

5. Practical example

Give a relevant example, such as predicting loan default probability based on income and credit score, or forecasting housing prices. This shows application in a banking 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 sum of squared errors (ordinary least squares) to find the best-fitting line.
  • It captures the conditional mean of the target given the features, not the full distribution.
  • Key assumptions: linearity, independence, homoscedasticity, and normality of residuals.
  • Limitations: sensitive to outliers, may underfit complex relationships, and can be affected by multicollinearity.

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

I listed most of them but fumbled the exogeneity condition.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining OLS and its goal of minimizing squared residuals, then systematically list the classical assumptions (linearity, exogeneity, homoskedasticity, no autocorrelation, full rank, normality) and briefly explain each. Conclude by discussing the consequences when assumptions are violated and how they relate to real-world data modeling, especially in a financial context.

Pro tip: Emphasize that while normality is not required for unbiasedness or consistency, it is needed for exact inference in small samples; in large samples, asymptotic properties often suffice. This shows depth and practical awareness.

1. Define OLS and its objective

Briefly state that OLS estimates coefficients by minimizing the sum of squared residuals, providing the best linear unbiased estimator under certain conditions.

2. List the classical assumptions

Enumerate the key assumptions: linearity in parameters, random sampling, no perfect multicollinearity, zero conditional mean (exogeneity), homoskedasticity, and no autocorrelation. Optionally include normality for inference.

3. Explain each assumption and its purpose

For each assumption, give a one-sentence explanation of what it means and why it matters (e.g., exogeneity ensures unbiasedness, homoskedasticity ensures efficient standard errors).

4. Discuss consequences of violations

Mention what happens if assumptions fail: omitted variable bias, inefficient estimates, invalid standard errors, etc., and briefly note potential remedies.

5. Relate to practical modeling

Connect the assumptions to real-world data challenges, such as heteroskedasticity in financial data, and how robust methods or alternative models can address them.

Key Points to Mention

  • Linearity in parameters: the model is linear in coefficients, not necessarily in variables.
  • Zero conditional mean (exogeneity): the error term has zero expected value given any independent variables; crucial for unbiasedness.
  • Homoskedasticity: constant variance of errors; violation leads to inefficient estimates and incorrect standard errors.
  • No autocorrelation: errors are uncorrelated across observations; important for time-series data.
  • No perfect multicollinearity: independent variables are not perfectly correlated; otherwise, OLS estimates are not unique.
  • Normality of errors: needed for exact t- and F-tests in small samples, but not for unbiasedness or consistency.

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

This is the one I was most nervous about and it actually went fine.

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. Emphasize the assumptions and conditions for the solution to exist.

Pro tip: Connect the derivation to practical implications, such as computational efficiency and numerical stability, and mention how this applies to large-scale data problems in banking.

1. Define the model and objective

State the linear regression model y = Xβ + ε and define the OLS objective as minimizing the residual sum of squares (RSS) = (y - Xβ)^T (y - Xβ).

2. Expand the objective

Expand the RSS expression to y^T y - 2β^T X^T y + β^T X^T X β, which is a quadratic function in β.

3. Take the derivative

Compute the gradient of RSS with respect to β: ∂RSS/∂β = -2X^T y + 2X^T X β, and set it to zero to obtain the normal equations.

4. Solve the normal equations

Solve X^T X β = X^T y for β, yielding the closed-form estimator β_hat = (X^T X)^{-1} X^T y, assuming X^T X is invertible.

5. Discuss assumptions and implications

Mention the assumptions (e.g., full column rank of X) and practical considerations like using pseudo-inverse or regularization when X^T X is singular.

Key Points to Mention

  • OLS minimizes the sum of squared residuals.
  • The normal equations are derived by setting the gradient to zero.
  • The closed-form solution is β_hat = (X^T X)^{-1} X^T y.
  • Assumption: X has full column rank (no perfect multicollinearity).
  • Computational aspects: matrix inversion can be costly; use QR decomposition or gradient descent for large data.
  • Connection to software engineering: implementing efficient linear regression, handling singular matrices, and 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 your options for dealing with it?

Data ModelingTechnical Trade-offsRoot Cause Analysis
Author's notes

Talked about variance inflation and the instability of coefficient signs, which landed well.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining multicollinearity and explaining its impact on regression coefficients and model interpretability. Then discuss detection methods and a range of solutions, emphasizing trade-offs and practical considerations for a banking context.

Pro tip: In banking, multicollinearity often arises from correlated financial indicators; instead of automatically dropping variables, consider domain-driven feature engineering or regularization to retain predictive power while ensuring model stability and regulatory interpretability.

1. Define multicollinearity

Explain that multicollinearity occurs when two or more predictor variables in a regression model are highly correlated, leading to unstable coefficient estimates.

2. Explain why it's a problem

Discuss how it inflates standard errors, makes coefficients sensitive to small changes in the model, and complicates interpretation of individual predictor effects.

3. Detect multicollinearity

Mention methods like correlation matrices, Variance Inflation Factor (VIF), and condition indices to identify problematic variables.

4. Present solutions

List options such as removing one of the correlated variables, combining them via PCA or factor analysis, using regularization (ridge, lasso), or collecting more data.

5. Discuss trade-offs and context

Emphasize that the best approach depends on the goal: prediction vs. inference, and in banking, consider regulatory requirements and interpretability.

Key Points to Mention

  • Definition: high correlation among predictors
  • Consequences: unstable coefficients, inflated standard errors, reduced interpretability
  • Detection: correlation matrix, VIF > 5 or 10
  • Solutions: remove variables, PCA, regularization (ridge/lasso), partial least squares
  • Trade-offs: bias-variance, interpretability vs. predictive performance
  • Banking context: regulatory need for interpretable models, correlated financial indicators

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

Q5

Compare Lasso and Ridge regularization. When would you choose one over the other, and what's the geometric or probabilistic intuition behind each?

Data ModelingTechnical Trade-offsAlgorithms & Data Structures
Author's notes

My favorite question of the whole thing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining Lasso (L1) and Ridge (L2) regularization, then contrast their mathematical forms, geometric shapes, and probabilistic interpretations. Explain when to choose each based on feature sparsity, multicollinearity, and prediction goals, and tie it back to a practical example relevant to banking or software engineering.

Pro tip: Mention that in practice, Elastic Net often combines both, and that Lasso's sparsity can be a double-edged sword with correlated features—this shows you understand real-world trade-offs beyond textbook definitions.

1. Define Lasso and Ridge

Briefly state that Lasso adds an L1 penalty (sum of absolute weights) and Ridge adds an L2 penalty (sum of squared weights) to the loss function.

2. Explain geometric intuition

Describe how L1 constraint forms a diamond (or polytope) shape leading to sparse solutions at vertices, while L2 forms a circle/sphere resulting in small but non-zero coefficients.

3. Explain probabilistic intuition

Note that Lasso corresponds to a Laplace prior on coefficients, while Ridge corresponds to a Gaussian prior, linking to Bayesian interpretation.

4. Discuss when to choose each

Choose Lasso when you suspect many features are irrelevant and want feature selection; choose Ridge when features are correlated or you want to keep all features with shrinkage.

5. Connect to practical context

Relate to software engineering and banking: e.g., Lasso for high-dimensional sparse data like transaction features, Ridge for multicollinear financial indicators.

Key Points to Mention

  • L1 vs L2 penalty formulas and effect on coefficients
  • Geometric shapes: diamond vs circle and sparsity
  • Probabilistic priors: Laplace vs Gaussian
  • Feature selection vs coefficient shrinkage
  • Multicollinearity handling: Ridge better, Lasso unstable
  • Elastic Net as a hybrid and practical considerations

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