liveBook · Manning

What you will learn in Build a Robo-Advisor with Python (From Scratch)

Automate your financial and investment decisions

by Rob Reider and Alexander Michalka

Chapter by chapter

Chapter 1: The rise of robo-advisors

1.1 What are robo-advisors? · 1.1.1 Key features of robo-advisors · 1.1.2 Comparison of robo-advisors · 1.1.3 Things robo-advisors don’t do · 1.2 Advantages of robo-advisors · 1.2.1 Low fees · 1.2.2 Tax savings · 1.2.3 Avoiding behavioral biases · 1.2.4 Saving time · 1.3 Example: Social Security benefits · 1.4 Python and robo-advising · 1.5 Who might be interested in learning about robo-advising? · 1.6 Summary

What you learn in chapter 1 →

Chapter 2: An introduction to portfolio construction

2.1 A simple example with three assets · 2.2 Computing a portfolio’s expected return and standard deviation · 2.3 An illustration with random weights · 2.4 Introducing a risk-free asset · 2.5 Risk tolerance · 2.6 Appendix · 2.7 No risk-free rate · 2.8 Adding a risk-free rate · 2.9 Summary

What you learn in chapter 2 →

Chapter 3: Estimating expected returns and covariances

3.1 Estimating expected returns · 3.1.1 Historical averages · 3.1.2 CAPM · 3.1.3 Adjusting historical returns for changes in valuation · 3.1.4 Capital market assumptions from asset managers · 3.2 Estimating variances and covariances · 3.2.1 Using historical returns · 3.2.2 GARCH models · 3.2.3 Other approaches · 3.2.4 Subjective estimates · 3.3 Summary

What you learn in chapter 3 →

Chapter 4: ETFs: The building blocks of robo-portfolios

4.1 ETF basics · 4.1.1 ETF strategies · 4.1.2 ETF pricing: Theory · 4.1.3 ETF pricing: Reality · 4.1.4 Costs of ETF investing · 4.2 ETFs vs. mutual funds · 4.2.1 Tradability · 4.2.2 Costs and minimums · 4.2.3 Tax efficiency · 4.2.4 The verdict on mutual funds vs. ETFs · 4.3 Total cost of ownership · 4.3.1 Cost components · 4.4 Beyond standard indices · 4.4.1 Smart beta · 4.4.2 Socially responsible investing · 4.5 Summary

What you learn in chapter 4 →

Chapter 5: Monte Carlo simulations

5.1 Simulating returns in Python · 5.2 Arithmetic vs. geometric average returns · 5.3 Simple vs. continuously compounded returns · 5.4 Geometric Brownian motion · 5.5 Estimating the probability of success · 5.6 Dynamic strategies · 5.7 Inflation risk · 5.8 Fat tails · 5.9 Historical simulations and booststrapping · 5.10 Longevity risk · 5.11 Flexibility of Monte Carlo simulations · 5.12 Appendix · 5.13 Summary

What you learn in chapter 5 →

Chapter 6: Financial planning using reinforcement learning

6.1 A goals-based investing example · 6.2 An introduction to reinforcement learning · 6.2.1 Solution using dynamic programming · 6.2.2 Solution using Q-learning · 6.3 Utility function approach · 6.3.1 Understanding utility functions · 6.3.2 Optimal spending using utility functions · 6.4 Longevity risk · 6.5 Other extensions · 6.6 Summary

What you learn in chapter 6 →

Chapter 7: Measuring and evaluating returns

7.1 Time-weighted vs. dollar-weighted returns · 7.1.1 Time-weighted returns · 7.1.2 Dollar-weighted returns · 7.2 Risk-adjusted returns · 7.2.1 Sharpe ratio · 7.2.2 Alpha · 7.2.3 Evaluating an ESG fund’s performance · 7.2.4 Which is better, alpha or Sharpe ratio? · 7.3 Summary

What you learn in chapter 7 →

Chapter 8: Asset location

8.1 A simple example · 8.2 The tax efficiency of various assets · 8.3 Adding a Roth account · 8.3.1 A simple example with three types of accounts · 8.3.2 An example with optimization · 8.4 Additional considerations · 8.5 Summary

What you learn in chapter 8 →

Chapter 9: Tax-efficient withdrawal strategies

9.1 The intuition behind tax-efficient strategies · 9.1.1 Principle 1: Deplete less tax-efficient accounts first · 9.1.2 Principle 2: Keep tax brackets stable over time · 9.2 Examples of sequencing strategies · 9.2.1 Starting assumptions · 9.2.2 Tax-sequencing code · 9.2.3 Strategy 1: IRA first · 9.2.4 Strategy 2: Taxable first · 9.2.5 Strategy 3: Fill lower tax brackets · 9.2.6 Strategy 4: Roth conversions · 9.3 Additional complications · 9.3.1 Required minimum distributions · 9.3.2 Inheritance · 9.3.3 Capital gains taxes · 9.3.4 State taxes · 9.3.5 Putting it all together · 9.4 Summary

What you learn in chapter 9 →

Chapter 10: Optimization and portfolio construction

10.1 Convex optimization in Python · 10.1.1 Basics of optimization · 10.1.2 Convexity · 10.1.3 Python libraries for optimization · 10.2 Mean-variance optimization · 10.2.1 The basic problem · 10.2.2 Adding more constraints · 10.3 Optimization-based asset allocation · 10.3.1 Minimal constraints · 10.3.2 Enforcing diversification · 10.3.3 Creating an efficient frontier · 10.3.4 Building an ESG portfolio · 10.4 Summary

What you learn in chapter 10 →

Chapter 11: Asset allocation by risk: Introduction to risk parity

11.1 Decomposing portfolio risk · 11.1.1 Risk contributions · 11.1.2 Risk concentration in a “diversified” portfolio · 11.1.3 Risk parity as an optimal portfolio · 11.2 Calculating risk-parity weights · 11.2.1 Naive risk parity · 11.2.2 General risk parity · 11.2.3 Weighted risk parity · 11.2.4 Hierarchical risk parity · 11.3 Implementation of risk-parity portfolios · 11.3.1 Applying leverage · 11.4 Summary

What you learn in chapter 11 →

Chapter 12: The Black–Litterman model

12.1 Equilibrium returns · 12.1.1 Reverse optimization · 12.1.2 Understanding equilibrium · 12.2 Conditional probability and Bayes’ rule · 12.3 Incorporating investor views · 12.3.1 Expected returns as random variables · 12.3.2 Expressing views · 12.3.3 Updating equilibrium returns · 12.3.4 Assumptions and parameters · 12.4 Examples · 12.4.1 Example: Sector selection · 12.4.2 Example: Global allocation with cryptocurrencies · 12.5 Summary

What you learn in chapter 12 →

Chapter 13: Rebalancing: Tracking a target portfolio

13.1 Rebalancing basics · 13.1.1 The need for rebalancing · 13.1.2 Downsides of rebalancing · 13.1.3 Dividends and deposits · 13.2 Simple rebalancing strategies · 13.2.1 Fixed-interval rebalancing · 13.2.2 Threshold-based rebalancing · 13.2.3 Other considerations · 13.2.4 Final thoughts · 13.3 Optimizing rebalancing · 13.3.1 Variables · 13.3.2 Inputs · 13.3.3 Formulating the problem · 13.3.4 Running an example · 13.4 Comparing rebalancing approaches · 13.4.1 Implementing rebalancers · 13.4.2 Building the backtester · 13.4.3 Running backtests · 13.4.4 Evaluating results · 13.5 Summary

What you learn in chapter 13 →

Chapter 14: Tax-loss harvesting: Improving after-tax returns

14.1 The economics of tax-loss harvesting · 14.1.1 Tax deferral · 14.1.2 Rate conversion · 14.1.3 When harvesting doesn’t help · 14.2 The wash-sale rule · 14.2.1 Wash-sale basics · 14.2.2 Wash sales with Python · 14.3 Deciding when to harvest · 14.3.1 Trading costs · 14.3.2 Opportunity cost · 14.3.3 End-to-end evaluation · 14.4 Testing a TLH strategy · 14.4.1 Backtester modifications · 14.4.2 Choosing ETFs · 14.5 Summary

What you learn in chapter 14 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.