Portfolio analysis and optimization are crucial aspects of modern portfolio theory and investment management. Portfolio analysis assesses the risk and return characteristics of a collection of assets, while portfolio optimization aims to maximize returns for a given level of risk or minimize risk. Harry Markowitz's modern portfolio theory forms the foundation for portfolio optimization, emphasizing diversification and combining assets with different risk and return characteristics. Techniques like mean-variance optimization, risk parity, and factor investing are used to construct portfolios that align with investors' risk preferences and return objectives, ensuring efficient portfolio construction.