Optimization methods play a central role in financial modeling. This textbook is devoted to explaining how state-of-the-art optimization theory, algorithms, and software can be used to efficiently solve problems in computational finance. It discusses some classical mean-variance portfolio optimization models as well as more modern developments such as models for optimal trade execution and dynamic portfolio allocation with transaction costs and taxes. Chapters discussing the theory and efficient solution methods for the main classes of optimization problems alternate with chapters discussing their use in the modeling and solution of central problems in mathematical finance. This book will be interesting and useful for students, academics, and practitioners with a background in mathematics, operations research, or financial engineering. The second edition includes new examples and exercises as well as a more detailed discussion of mean-variance optimization, multi-period models, and additional material to highlight the relevance to finance.