Portfolio Copy and Modification - Quant Trader Interview Question
Difficulty: Medium
Category: Code Analysis
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: python, copy, data-structures, portfolio-management
Problem Description
You are developing a trading algorithm in Python and need to copy a portfolio object. The portfolio object contains a nested list representing positions in different assets. Consider the following code snippet:
After executing this code, will portfolio_a be affected by the modification made to portfolio_b? In other words, will the number of AAPL shares in portfolio_a also change?
Practice this medium trader interview question on MyntBit - the all-in-one quant learning platform with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.