Preface
Acknowledgments
Acronyms
1
Return Calculations
1.1
The Time Value of Money
1.1.1
Future value, present value and simple interest
1.1.2
Multiple compounding periods
1.1.3
Effective annual rate
1.2
Asset Return Calculations
1.2.1
Assets
1.2.2
Simple returns
1.2.3
Continuously compounded returns
1.3
Portfolios and Portfolio Returns
1.3.1
Multiperiod portfolio returns and rebalancing
1.3.2
Continuously Compounded Portfolio Returns
1.4
Return Calculations with Data in R
1.4.1
Representing time series data using
xts
objects
1.4.2
Calculating returns
1.4.3
Calculating portfolio returns from time series data
1.4.4
Downloading financial data from the internet
1.5
Further Reading: Return Calculations
1.6
Appendix: Properties of Exponentials and Logarithms
1.7
Problems: Return Calculations
2
Review of Random Variables
2.1
Random Variables
2.1.1
Discrete random variables
2.1.2
Continuous random variables
2.1.3
The cumulative distribution function
2.1.4
Quantiles of the distribution of a random variable
2.1.5
R functions for discrete and continuous distributions
2.1.6
Shape characteristics of probability distributions
2.1.7
Linear functions of a random variable
2.1.8
Value-at-Risk: An introduction
2.2
Bivariate Distributions
2.2.1
Discrete random variables
2.2.2
Bivariate distributions for continuous random variables
2.2.3
Independence
2.2.4
Covariance and correlation
2.2.5
Bivariate normal distributions
2.2.6
Expectation and variance of the sum of two random variables
2.3
Multivariate Distributions
2.3.1
Discrete random variables
2.3.2
Continuous random variables
2.3.3
Independence
2.3.4
Dependence concepts
2.3.5
Linear combinations of
\(N\)
random variables
2.3.6
Covariance between linear combinations of random variables
2.4
Further Reading: Review of Random Variables
2.5
Problems: Review of Random Variables
3
Matrix Algebra Review
3.1
Matrices and Vectors
3.2
Basic Matrix Operations
3.2.1
Addition and subtraction
3.2.2
Scalar multiplication
3.2.3
Matrix multiplication
3.2.4
The identity matrix
3.2.5
Diagonal, lower triangular and upper triangular matrices
3.3
Representing Summation Using Matrix Notation
3.4
Systems of Linear Equations
3.4.1
Rank of a matrix
3.4.2
Partitioned matrices and partitioned inverses
3.5
Positive Definite Matrices
3.5.1
Matrix square root
3.6
Multivariate Probability Distributions Using Matrix Algebra
3.6.1
Random vectors
3.6.2
Covariance matrix
3.6.3
Correlation matrix
3.6.4
Variance of linear combination of random vectors
3.6.5
Covariance between linear combination of two random vectors
3.6.6
Variance of a vector of linear functions of a random vector
3.6.7
Multivariate normal distribution
3.7
Portfolio Math Using Matrix Algebra
3.8
Derivatives of Simple Matrix Functions
3.9
Further Reading: Matrix Algebra Review
3.10
Problems: Matrix Algebra Review
4
Time Series Concepts
4.1
Stochastic Processes
4.1.1
Stationary stochastic processes
4.1.2
Non-Stationary processes
4.1.3
Ergodicity
4.2
Multivariate Time Series
4.2.1
Stationary and ergodic multivariate time series
4.3
Time Series Models
4.3.1
Moving average models
4.3.2
Autoregressive Models
4.3.3
Autoregressive Moving Average Models
4.3.4
Vector Autoregressive Models
4.4
Forecasting
4.5
Further Reading: Time Series Concepts
4.6
Exercises: Time Series Concepts
5
Descriptive Statistics for Financial Data
5.1
Univariate Descriptive Statistics
5.1.1
Example data
5.1.2
Time plots
5.1.3
Descriptive statistics for the distribution of returns
5.1.4
QQ-plots
5.1.5
Shape Characteristics of the Empirical Distribution
5.1.6
Outliers
5.1.7
Box plots
5.2
Time Series Descriptive Statistics
5.2.1
Sample Autocovariances and Autocorrelations
5.2.2
Time dependence in volatility
5.3
Bivariate Descriptive
5.3.1
Scatterplots
5.3.2
Sample covariance and correlation
5.3.3
Sample cross-lag covariances and correlations
5.4
Rolling descriptive statistics
5.4.1
Practical issues associated with rolling estimates
5.5
Stylized facts for daily and monthly asset returns
5.6
Further Reading: Descriptive Statistics
5.7
Problems: Descriptive Statistics
6
The Gaussian White Noise Return Model
6.1
GWN Model Assumptions
6.1.1
Regression model representation
6.1.2
Location-Scale model representation
6.1.3
The GWN model in matrix notation
6.1.4
The GWN model for continuously compounded returns
6.1.5
GWN model for simple returns
6.2
Monte Carlo Simulation of the GWN Model
6.2.1
Simulating returns on more than one asset
6.3
Scenario Analysis
6.4
Further Reading: The GWN Return Model
6.5
Problems: The GWN Return Mode
7
Estimation of The GWN Model
7.1
Estimators and Estimates
7.2
Finite Sample Properties of Estimators
7.2.1
Bias
7.2.2
Precision
7.2.3
Estimated standard errors
7.3
Asymptotic Properties of Estimators
7.3.1
Consistency
7.3.2
Asymptotic Normality
7.3.3
Central Limit Theorem
7.3.4
Asymptotic Confidence Intervals
7.4
Estimators for the Parameters of the GWN Model
7.5
Statistical Properties of the GWN Model Estimates
7.5.1
Bias
7.5.2
Precision
7.5.3
Sampling Distributions and Confidence Intervals
7.6
Using Monte Carlo Simulation to Understand the Statistical Properties of Estimators
7.6.1
Evaluating the Statistical Properties of
\(\hat{\mu}\)
Using Monte Carlo Simulation
7.6.2
Evaluating the Statistical Properties of
\(\hat{\sigma}_{i}^{2}\)
and
\(\hat{\sigma}_{i}\)
Using Monte Carlo simulation
7.6.3
Evaluating the Statistical Properties of
\(\hat{\sigma}_{ij}\)
and
\(\hat{\rho}_{ij}\)
by Monte Carlo simulation
7.7
Sampling distributions of
\(\hat{\mu}\)
and
\(\hat{\Sigma}\)
7.7.1
Sampling distribution of
\(\hat{\mu}\)
7.7.2
Sampling distribution of the elements of
\(\hat{\Sigma}\)
7.7.3
Joint sampling distribution between
\(\hat{\mu}\)
and
\(\mathrm{vech}(\hat{\Sigma})\)
7.8
Further Reading: Estimation of The GWN Model
7.9
Problems: Estimation of The GWN Model
8
Estimating Functions of GWN Model Parameters
8.1
Functions of GWN Model Parameters
8.2
Estimation of Functions of GWN Model Parameters
8.2.1
Bias
8.2.2
Consistency
8.3
Asymptotic normality
8.3.1
The numerical delta method
8.3.2
the delta method for vector valued functions (advanced)
8.3.3
The delta method explained
8.4
Resampling
8.5
The Jackknife
8.5.1
The jackknife for vector-valued estimates
8.5.2
Pros and Cons of the Jackknife
8.6
The Nonparametric Bootstrap
8.6.1
Bootstrap bias estimate
8.6.2
Bootstrap standard error estimate
8.6.3
Bootstrap confidence intervals
8.6.4
Performing the Nonparametric Bootstrap in R
8.6.5
Pros and cons of the nonparametric bootstrap
8.7
Using Monte Carlo Simulation to Evaluate Delta Method, Jackknife and Bootstrap Standard Errors
8.8
Further Reading: Delta Method and Resampling
8.9
Problems: Delta Method and Resampling
9
Hypothesis Testing in the GWN Model
9.1
Review of General Principles
9.1.1
Steps for hypothesis testing
9.1.2
Hypothesis tests and decisions
9.1.3
Significance level and power
9.2
Hypothesis Testing in the GWN Model
9.2.1
Coefficient tests
9.2.2
Model specification tests
9.2.3
Data for hypothesis testing examples
9.3
Tests for Individual Parameters: t-tests and z-scores
9.3.1
Exact tests under normality of data
9.3.2
Exact tests with
\(\sigma\)
unknown
9.3.3
Z-scores under asymptotic normality of estimators
9.3.4
Relationship between hypothesis tests and confidence intervals
9.4
Coefficient tests between model coefficients for two assets
9.4.1
Test for equal means between two assets
9.4.2
Test for equal Sharpe ratios between two assets
9.5
Wald tests for general linear hypotheses (advanced)
9.6
Model Specification Tests
9.6.1
Tests for normality
9.6.2
Tests for no autocorrelation
9.6.3
Tests for constant parameters
9.6.4
Tests for constant parameters based on rolling estimators
9.7
Using Monte Carlo Simulation to Understand Hypothesis Testing
9.8
Using the Bootstrap for Hypothesis Testing
9.9
Further Reading: Hypothesis Testing in the GWN Model
9.10
Problems: Hypothesis Testing in the GWN Model
10
Modeling Daily Returns with the GARCH Model
10.1
Engle’s ARCH Model
10.1.1
The ARCH(1) Model
10.1.2
The ARCH(p) Model
10.2
Bollerslev’s GARCH Model
10.2.1
Statistical Properties of the GARCH(1,1) Model
10.3
Maximum Likelihood Estimation
10.3.1
The Likelihood Function
10.3.2
The Maximum Likelihood Estimator
10.3.3
Invariance Property of Maximum Likelihood Estimators
10.3.4
The Precision of the Maximum Likelihood Estimator
10.3.5
Asymptotic Properties of Maximum Likelihood Estimators
10.3.6
Computing the MLE Using Numerical Optimization Methods
10.4
Estimation of ARCH-GARCH Models in R Using rugarch
10.5
Forecasting Conditional Volatility from ARCH Models
10.5.1
Forecasting daily return volatility from the GARCH(1,1) model
10.5.2
Forecasting multi-day return volatility using a GARCH(1,1) model
10.6
Forecasting VaR from ARCH Models
10.7
Further Reading: GARCH Model
10.8
Problems: GARCH Model
11
Introduction to Portfolio Theory
11.1
Assumptions About Returns and Investor Risk Preferences
11.2
Portfolios of Two Risky Assets
11.2.1
The Portfolio Problem
11.2.2
Portfolio Value-at-Risk
11.2.3
The set of feasible portfolios
11.2.4
Computing the global minimum variance portfolio
11.2.5
Correlation and the shape of the portfolio frontier
11.3
Efficient portfolios with two risky assets
11.3.1
Optimal portfolios
11.4
Efficient portfolios with a risk-free asset
11.4.1
Portfolios with one risky asset and one risk-free asset
11.4.2
Portfolios with one risky asset and one risk-free asset with different borrowing and lending rates
11.5
Efficient portfolios with two risky assets and a risk-free asset
11.5.1
Solving for the Tangency Portfolio
11.5.2
Mutual Fund Separation
11.5.3
Interpreting Efficient Portfolios
11.5.4
Efficient Portfolios and Value-at-Risk
11.6
Application to Real World Portfolios
11.7
Further Reading: Introduction to Portfolio Theory
11.8
Appendix: Review of Optimization and Constrained Optimization
11.9
Problems: Introduction to Portfolio Theory
12
Portfolio Theory with Matrix Algebra
12.1
Portfolios with
\(N\)
Risky Assets
12.1.1
Portfolio return and risk characteristics using matrix notation
12.1.2
Large portfolios and diversification
12.2
Determining the Global Minimum Variance Portfolio Using Matrix Algebra
12.2.1
Alternative derivation of global minimum variance portfolio
12.3
Determining Mean-Variance Efficient Portfolios Using Matrix Algebra
12.3.1
Alternative derivation of an efficient portfolio
12.4
Computing the Mean-Variance Efficient Frontier
12.4.1
Algorithm for computing efficient frontier
12.5
Computing Efficient Portfolios of N risky Assets and a Risk-Free Asset Using Matrix Algebra
12.5.1
Computing the tangency portfolio using matrix algebra
12.5.2
Alternative derivation of the tangency portfolio
12.5.3
Mutual fund separation theorem again
12.6
Computational Problems with Very Large Portfolios
12.7
Portfolio Analysis Functions in R
12.8
Application to Vanguard Mutual Fund
12.9
Further Reading: Portfolio Theory with Matrix Algebra
12.10
Problems: Portfolio Theory with Matrix Algebra
13
Portfolio Theory with Short Sales Constraints
13.1
Overview of Short Selling
13.2
Portfolio Theory with Short Sales Constraints in a Simplified Setting
13.2.1
Two Risky Assets
13.2.2
One risky asset and a risk-free asset
13.2.3
Two risky assets and risk-free asset
13.3
Portfolio Theory with Short Sales Constraints in a General Setting
13.3.1
Multiple risky assets
13.3.2
Portfolio optimization imposing no-short sales constraints
13.4
Quadratic Programming Problems
13.4.1
No short sales global minimum variance portfolio
13.4.2
No short sales minimum variance portfolio with target expected return
13.4.3
No short sales tangency portfolio
13.5
Application to Vanguard Mutual Funds
13.6
Further Reading: Portfolio Theory with Short Sales Constraints
13.7
Problems: Portfolio Theory with Short Sales Constraints
14
Portfolio Risk Budgeting
14.1
Risk Budgeting Using Portfolio Variance and Portfolio Standard Deviation
14.1.1
Case 1: uncorrelated assets
14.1.2
Case 2: correlated assets
14.1.3
The general case of
\(N\)
assets
14.2
Euler’s Theorem and Risk Decompositions
14.2.1
Homogenous functions of degree one
14.2.2
Euler’s theorem
14.2.3
Risk decomposition using Euler’s theorem
14.2.4
Interpreting marginal contributions to risk
14.3
Portfolio risk reports
14.4
Understanding Portfolio Volatility Risk Decompositions
14.4.1
\(\sigma-\rho\)
decomposition for
\(\mathrm{MCR}_{i}^{\sigma}\)
14.4.2
\(\sigma-\beta\)
decomposition for
\(\mathrm{MCR}_{i}^{\sigma}\)
14.5
Risk Budgeting for Optimized Portfolios
14.6
Risk Parity Portfolios
14.7
Further Reading: Portfolio Risk Budgeting
14.8
Problems: Portfolio Risk Budgeting
15
Statistical Analysis of Portfolios
15.1
Statistical Analysis of Portfolios: Two Assets
15.1.1
Estimation error in the portfolio frontier
15.1.2
Statistical properties of the global minimum variance portfolio
15.1.3
Statistical properties of the Sharpe ratio and the tangency portfolio
15.2
Statistical Analysis of Portfolios: General Case
15.3
Rolling Analysis of Portfolios
15.4
Further Reading: Statistical Analysis of Portfolios
15.5
Problems: Statistical Analysis of Portfolios
16
Single Index Model
16.1
Motivation
16.2
William Sharpe’s SI Model
16.2.1
Economic interpretation of the SI model
16.2.2
Statistical properties of returns in the SI model
16.2.3
SI model and portfolios
16.2.4
The SI model in matrix notation
16.3
Monte Carlo Simulation of the SI Model
16.4
Estimation of SI Model
16.4.1
Plug-in principle estimates
16.4.2
Least squares estimates
16.4.3
Simple linear regression in R
16.4.4
Maximum likelihood estimates
16.5
Statistical Properties of SI Model Estimates
16.5.1
Bias
16.5.2
Precision
16.5.3
Sampling distribution and confidence intervals.
16.6
Further Reading: Single Index Model
16.7
Problems: Single Index Model
17
Glossary
18
Solution
19
References
Introduction to Computational Finance and Financial Econometrics with R
Chapter 18
Solution