This thesis deals with 3 important aspects of optimal investment in real-world financial markets: taxes, crashes, and illiquidity. An introductory chapter reviews the portfolio problem in its historical context and motivates the theme of this work: We extend the standard modelling framework to include specific real-world features and evaluate their significance. In the first chapter, we analyze the optimal portfolio problem with capital gains taxes, assuming that taxes are deferred until the end of the investment horizon. The problem is solved with the help of a modification of the classical martingale method. The second chapter is concerned with optimal asset allocation under the threat of a financial market crash. The investor takes a worst-case attitude towards the crash, so her investment objective is to be best off in the most adverse crash scenario. We first survey the existing literature on the worst-case approach to optimal investment and then present in detail the novel martingale approach to worst-case portfolio optimization. The first part of this chapter is based on joint work with Ralf Korn. In the last chapter, we investigate optimal portfolio decisions in the presence of illiquidity. Illiquidity is understood as a period in which it is impossible to trade on financial markets. We use dynamic programming techniques in combination with abstract convergence results to solve the corresponding optimal investment problem. This chapter is based on joint work with Holger Kraft and Peter Diesinger.