.. _mv_portfolios: Mean-Variance Portfolio Optimization ------------------------------------ This section provides several self-contained Jupyter notebooks which discuss the modeling of typical features in mean-variance (M-V) portfolio optimization. * `Data Preparation `_. This notebook prepares the example data that is used throughout the other modeling notebooks. The data is based on historical returns for 462 stocks from the S&P 500 and incorporates shrinkage for the first moment. Basic Markowitz model ^^^^^^^^^^^^^^^^^^^^^ There exist three different basic kinds of M-V models, depending on which quantity is to be optimized, and which quantity is constrained: * `Maximizing Return `_. We show a basic M-V problem where we maximize the expected return subject to a prescribed maximum variance. * `Minimizing Variance `_. We show a basic M-V problem where we minimize the expected variance subject to a prescribed minimum expected return. * `Maximizing Utility `_. We show a basic M-V problem where we optimize a combination of risk and return, parametrized by a risk-aversion coefficient. Factor models ^^^^^^^^^^^^^ Another set of tools for representing risk are *factor models*, which comprise a combination of market risks and idiosyncratic risk information on the assets. Such representations can be used either as part of the objective function, or to formulate constraints on the admissible variance: * `Factor model in the objective `_. * `Factor model in the constraints `_. Portfolio constraints ^^^^^^^^^^^^^^^^^^^^^ The following notebooks explain how to model certain portfolio features on top of the above base formulations: * `Minimum Buy-In `_. Tiny transaction sizes can be avoided by enforcing a minimum amount whenever a position is opened. * `Cardinality Constraints `_. To avoid scattering the investment across too many assets, one can impose *cardinality constraints* on the portfolio, that is, bounding the number of open positions. * `Enforcing Diversification `_. To increase diversification, one can impose bounds on the individual positions and enforce that a given minimum number of positions is traded. * `Leverage by Short-Selling `_. We show how to incorporate short-selling into the base model and how to add limits on the total short-sell (e.g., 130/30 strategy). * `Leverage by Borrowing Cash `_. We include a risk-free asset (e.g., money market) that can be used for leveraging long positions within prescribed bounds. * `Limiting Turnover `_. If a given portfolio is to be rebalanced, we show how to limit the turnover, that is, the total change to the starting portfolio. * `Round Lot Constraints `_. Securities are often traded in *lots* (i.e., a fixed number of units). To avoid small positions, one might also require a minimum number of units if a position is opened. * `Sector Allocations `_. The stock market comprises different sectors (Technology, Financial Services, Healthcare, etc.), industry groups, industries, and sub-industries. We demonstrate how to limit exposure to individual sectors. Transaction costs and slippage ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For trading assets on the market, it is possible to incorporate further pricing mechanisms into the optimization model: * `Investing with Transaction Costs `_. We show how to include fixed-charges and proportional transaction costs. * `Rebalancing with Transaction Costs `_. Instead of starting from an all-cash position, we show how to rebalance an existing portfolio subject to fixed-charges and proportional costs. * `Market Impact Costs `_. Huge transactions can affect the market price by itself, and in this notebook we show one standard approach for modeling such slippage. .. toctree:: :maxdepth: 1 :caption: Portfolio features :hidden: modeling_notebooks/mean_covariance modeling_notebooks/basic_model_maxmu modeling_notebooks/basic_model_minsigma modeling_notebooks/basic_model_maxutility modeling_notebooks/factor_models_objective modeling_notebooks/factor_models_constraint modeling_notebooks/minimum_buy_in modeling_notebooks/concentration modeling_notebooks/diversification modeling_notebooks/leverage_short_selling modeling_notebooks/leverage_borrow modeling_notebooks/turnover modeling_notebooks/round_lots modeling_notebooks/sector_allocation modeling_notebooks/transaction_costs modeling_notebooks/rebalancing modeling_notebooks/market_impact