AMS Foundations

Similar documents
Introduction to Computational Finance and Financial Econometrics Probability Theory Review: Part 2

Econ671 Factor Models: Principal Components

Multivariate Tests of the CAPM under Normality

Linear Systems of Differential Equations

AMS Computational Finance

R = µ + Bf Arbitrage Pricing Model, APM

Interpreting Regression Results

Modern Portfolio Theory with Homogeneous Risk Measures

COMPUTING AND DATA ANALYSIS WITH EXCEL. Matrix manipulation and systems of linear equations

Matrix algebra. Econ Pre-Session Math Solutions of Problem Sheet 2 30/08/2017

Regression: Ordinary Least Squares

Ross (1976) introduced the Arbitrage Pricing Theory (APT) as an alternative to the CAPM.

Network Connectivity and Systematic Risk

The Black Litterman Model: A Detailed Exploration

Financial Econometrics Lecture 6: Testing the CAPM model

Lagrange Multiplier Method & Karush-Kuhn-Tucker (KKT) Conditions

Model Mis-specification

Identifying Financial Risk Factors

9. Multivariate Linear Time Series (II). MA6622, Ernesto Mordecki, CityU, HK, 2006.

INVERSE OF A MATRIX [2.2]

Optimal Investment Strategies: A Constrained Optimization Approach

CMU CS 462/662 (INTRO TO COMPUTER GRAPHICS) HOMEWORK 0.0 MATH REVIEW/PREVIEW LINEAR ALGEBRA

ECON4515 Finance theory 1 Diderik Lund, 5 May Perold: The CAPM

Principal Component Analysis (PCA) Our starting point consists of T observations from N variables, which will be arranged in an T N matrix R,

Econ 424 Review of Matrix Algebra

6-2 Matrix Multiplication, Inverses and Determinants

Factor Models for Asset Returns. Prof. Daniel P. Palomar

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note 6

Linear Programming: Chapter 1 Introduction

Network Connectivity, Systematic Risk and Diversification

Introduction to Computational Finance and Financial Econometrics Probability Review - Part 2

18.06 Problem Set 3 Solution Due Wednesday, 25 February 2009 at 4 pm in Total: 160 points.

Revision of the thermal chip simulation, J.E. Akin, Rice University

Foundations of Computer Vision

Structure of the CAPM Covariance Matrix

Collaborative Filtering

Matrix operations Linear Algebra with Computer Science Application

Ch3. TRENDS. Time Series Analysis

Inverse of a Square Matrix. For an N N square matrix A, the inverse of A, 1

Properties of Linear Transformations from R n to R m

Deep Learning in Asset Pricing

Subrings and Ideals 2.1 INTRODUCTION 2.2 SUBRING

A Dynamic Model for Investment Strategy

ASSET PRICING MODELS

EE263 Review Session 1

A SHORT SUMMARY OF VECTOR SPACES AND MATRICES

Markowitz Efficient Portfolio Frontier as Least-Norm Analytic Solution to Underdetermined Equations

CSEP 590 Data Compression Autumn Arithmetic Coding

Inverses of Square Matrices

Multivariate GARCH models.

Algebra 2. Rings and fields. Rings. A.M. Cohen, H. Cuypers, H. Sterk

CHAPTER 6 : LITERATURE REVIEW

P E R E N C O - C H R I S T M A S P A R T Y

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Kevin James. MTHSC 3110 Section 2.2 Inverses of Matrices

Matrices BUSINESS MATHEMATICS

RATING TRANSITIONS AND DEFAULT RATES

Chapter 15 Panel Data Models. Pooling Time-Series and Cross-Section Data

FE670 Algorithmic Trading Strategies. Stevens Institute of Technology

Linear Algebra The Inverse of a Matrix

L1 gives the first component, writes first component in X's P's and 1's (1 represents the empty link and works in the following command):

14 Week 5 Empirical methods notes

Review : Powers of a matrix

Chapter 3. Vector Spaces and Subspaces. Po-Ning Chen, Professor. Department of Electrical and Computer Engineering. National Chiao Tung University

Lecture: Linear algebra. 4. Solutions of linear equation systems The fundamental theorem of linear algebra

MATH 1003 Review: Part 2. Matrices. MATH 1003 Review: Part 2. Matrices

Factor Analysis of Data Matrices

CFG Simplification. (simplify) 1. Eliminate useless symbols 2. Eliminate -productions 3. Eliminate unit productions

Section 1 (closed-book) Total points 30

The Linear Regression Model

Systems of Equations 1. Systems of Linear Equations

T i t l e o f t h e w o r k : L a M a r e a Y o k o h a m a. A r t i s t : M a r i a n o P e n s o t t i ( P l a y w r i g h t, D i r e c t o r )

Math 1B03/1ZC3 - Tutorial 2. Jan. 21st/24th, 2014

b 1 b 2.. b = b m A = [a 1,a 2,...,a n ] where a 1,j a 2,j a j = a m,j Let A R m n and x 1 x 2 x = x n

7.6 The Inverse of a Square Matrix

Heteroscedasticity and Autocorrelation

REPEATED MEASURES. Copyright c 2012 (Iowa State University) Statistics / 29

Section Matrices and Systems of Linear Eqns.

(a) Compute the projections of vectors [1,0,0] and [0,1,0] onto the line spanned by a Solution: The projection matrix is P = 1

arxiv: v1 [math.co] 7 Jul 2014

GMM - Generalized method of moments

MODULE 8 Topics: Null space, range, column space, row space and rank of a matrix

chapter 11 ALGEBRAIC SYSTEMS GOALS

Lecture 13. Simple Linear Regression

ECON Homework #2 - ANSWERS. Y C I = G 0 b(1 t)y +C = a. ky li = M 0

MFE Financial Econometrics 2018 Final Exam Model Solutions

MODEL ANSWERS TO THE THIRD HOMEWORK

STAT 3008 Applied Regression Analysis Tutorial 1: Introduction LAI Chun Hei

Linear Algebra Practice Problems

INVERSE OF A MATRIX [2.2] 8-1

Labor-Supply Shifts and Economic Fluctuations. Technical Appendix

Miloš Kopa. Decision problems with stochastic dominance constraints

Linear Systems of n equations for n unknowns

Estimating Covariance Using Factorial Hidden Markov Models

Section 3.3. Matrix Rank and the Inverse of a Full Rank Matrix

Generalized Autoregressive Score Models

Monoids. Definition: A binary operation on a set M is a function : M M M. Examples:

Chapter 3 Relational Model

Math 414 Lecture 1. Reading assignment: Text: Pages 1-29 and Scilab Users Guide: Sections 1-3.

Review Let A, B, and C be matrices of the same size, and let r and s be scalars. Then

Transcription:

ams-5-sol-04-m.nb AMS 5 - Foundations Factor Models Robert J. Frey Research Professor Stony Brook University, Applied Mathematics and Statistics frey@ams.sunysb.edu Exercises for Class 3. The Chapters refer to Luenberger s Investment Science. February 2006 Mathematica Tutorial A matrix in Mathematica is represented by a list of equal length lists. The function "MatrixForm" is useful for displaying both vectors and matrices in a user friendly form. v = 8, 2, 3<; q = 88, 2, 0<, 84, 0, 6<, 80, 8, 9<<; MatrixForm@vD MatrixForm@qD i y 2 j z k 3 { i 2 0 y 4 0 6 j z k 0 8 9 { In Mathematica vectors are treated as one-dimnsional objects not as row or column vectors per se. Thus, the bilinear form v T Qv can be entered as v.q.v 78

ams-5-sol-04-m.nb 2 The "Solve" function attempts to solve an equation or system of equations symbolically. It returns its results as a list of a list of production rules. Each top-level list represents a solution.? Solve Solve@eqns, varsd attempts to solve an equation or set of equations for the variables vars. Solve@ eqns, vars, elimsd attempts to solve the equations for vars, eliminating the variables elims. More For this system of equations there are four possible solutions. Each solution consists of two production rules. Solve@8y == a x 2 + b, y ã c x2 2 + d<, 8x, x2<d è!!!!!!!!!!!!!!! è!!!!!!!!!!!!!!! è!!!!!!!!!!!!!!! è!!!!!!!!!!!!!!! -b + y -d + y -b + y -d + y 99x Ø - Å è!!! ÅÅ, x2 Ø - Å è!!! ÅÅ =, 9x Ø - Å è!!! ÅÅ, x2 Ø Å è!!! ÅÅ =, a c a c è!!!!!!!!!!!!!!! è!!!!!!!!!!!!!!!! è!!!!!!!!!!!!!!! è!!!!!!!!!!!!!!! -b + y -d + y -b + y -d + y 9x Ø Å è!!! ÅÅ, x2 Ø - Å è!!! ÅÅ =, 9x Ø Å è!!! ÅÅ, x2 Ø Å è!!! ÅÅ == a c a c "Outer" is usually used to perform an outer product of two vectors, although it generalizes to other operations and to more complex list structures.? Outer Outer@f, list, list2,... D gives the generalized outer product of the listi, forming all possible combinations of the lowestlevel elements in each of them, and feeding them as arguments to f. Outer@f, list, list2,..., nd treats as separate elements only sublists at level n in the listi. Outer@f, list, list2,..., n, n2,... D treats as separate elements only sublists at level ni in the corresponding listi. More MatrixForm@Outer@Times, 8x, x2, x3<, 8y, y2<dd i x y x2 y j k x3 y x y2 y x2 y2 z x3 y2 { A numerical matrix may be inverted with "Inverse".

ams-5-sol-04-m.nb 3? Inverse Inverse@mD gives the inverse of a square matrix m. More qi = Inverse@qD; MatrixForm@qiD MatrixForm@q.qiD i 2 ÅÅÅ 3 5 20-0 3 0-3 40 20 5 5 5 j k - 4 y z { i 0 0 y 0 0 j z k 0 0 { There are two common statistical functions used : "Mean" and "Variance". General::spell : Possible spelling error: new symbol name "and" is similar to existing symbol "And". More Syntax::tsntxi : "Variance." is incomplete; more input is needed. More There are two common statistical functions used : "Mean" and "Variance".? Mean? Variance Mean@listD gives the statistical mean of the elements in list. More Variance@listD gives the statistical variance of the elements in list. More Chapter 7, Problem 2 Here's the data we are given in the problem. nriskfree = 0.; nmarketreturn = 0.8; mncovariance = 880.04, 0.0<, 80.0, 0.02<<; vnmarketportfolio = 80.5, 0.5<;

ams-5-sol-04-m.nb 4 The market variance is a function of the covariance and the market portfolio, both of which are known. nvarmarket = vnmarketportfolio.mncovariance.vnmarketportfolio 0.02 The gradient of the Langrangian implies that Q x r r f. Once we know the returns to within proportionality, we can then solve for them using the CAPM and the fact that the market portfolio has a b of. 8pA, pb< = mncovariance.vnmarketportfolio; sol = First@ Solve@ 8 l pa ã ba HnMarketReturn - nriskfreel, l pb ã bb HnMarketReturn - nriskfreel, ã 8bA, bb<.vnmarketportfolio <, 8l, ba, bb<d D General::spell : Possible spelling error: new symbol name "bb" is similar to existing symbol "ba". More 8l Ø 4., ba Ø.25, bb Ø 0.75< Once the b's are known, the CAPM can be used to compute the asset returns. ra = nriskfree + HbA ê. soll HnMarketReturn - nriskfreel rb = nriskfree + HbB ê. soll HnMarketReturn - nriskfreel 0.2 0.6 As a final check, we verify that the asset returns when taken in proportion to the market portfolio yield the market return. nmarketreturn ã 8rA, rb<.vnmarketportfolio True

ams-5-sol-04-m.nb 5 Chapter 7, Problem 6 Here are the data provided in the table and text of the problem in form appropriate for computation. vnassetprice = 8.50, 2.<; vnassetshares = 800, 50<; vnassetreturn = 80.5, 0.2<; vnassetsdev = 80.5, 0.09<; mncorrelation = 88, ê 3<, 8 ê 3, <<; mncovariance = Outer@Times, #, #D &@vnassetsdevd mncorrelation; First, the market portfolio is computed as the proportion of each asset's market capitalizaion. vnmarketportfolio = # Å Plus üü # &@vnassetprice vnassetsharesd 80.333333, 0.666667< The expected rate of return and standard deviation are computed from the market portfolio applied to the expect asset returns and asset covariances. nmarketreturn = vnassetreturn.vnmarketportfolio nmarketsdev = è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! vnmarketportfolio.mncovariance.vnmarketportfolio!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 0.3 0.09 Letting "rf" represent the risk free rate, we can solve for ba and bb in terms of the risk free rate.

ams-5-sol-04-m.nb 6 sol = First@ Solve@ 8 vnassetreturnpt - rf ã ba HnMarketReturn - rfl, vnassetreturnp2t - rf ã bb HnMarketReturn - rfl <, 8bA, bb< D D. H-0.5 +. rfl. H-0.2 +. rfl 9bA Ø - ÅÅ ÅÅÅ, bb Ø - ÅÅ ÅÅÅ = 0.3 -. rf 0.3 -. rf However, if we now weight these b's by the market portfolio, then we find the result is independent of the value of "rf". Simplify@H8bA, bb< ê. soll.vnmarketportfoliod. Any risk free rate works in satisfying the requirement that the market has a b of. Thus, the risk free rate is indeterminate. Chapter 7, Problem 8 The key returns are: Note that nmarketreturn = 0.33; nriskfree = 0.09; and by the definition of b E[I Å p pêê M(r c m r ê m)] = E[H ÅÅÅÅ c L E[Hp pêê L(r m r ê m)] = ÅÅÅÅ 2 ( Å 20 + Å 6 ) 20 s m 2 b = E[I Å p pêê M(r c m r ê 2 m)] / s m = ÅÅÅÅ 2 ( Å 20 + Å 6 ) 20 nbeta = ÅÅÅÅ 2 i j ÅÅ k 20 + ÅÅ y z 20. 6 { General::spell : Possible spelling error: new symbol name "nbeta" is similar to existing symbol "Beta". More.25

ams-5-sol-04-m.nb 7 We can now determine the CAPM return. ncapmreturn = nriskfree + nbeta HnMarketReturn - nriskfreel 0.36 The actual rate of return projected is nexpectedreturn = ÅÅÅÅ 2 0.35 i j ÅÅ 24 k 20 + ÅÅ 24 y z -. 6 { Thus, the project falls slightly short of the return required by the CAPM. Chapter 8, Problem 2 The data for the problem are as follows. vnreturn = 80.5, 0.20<; nriskfree = 0.0; mnfactorloadings = 88, 2, <, 8, 3, 4<<; If we assume that the CAPM applies to the factors, then the excess factor returns are vnfactorexcessreturns = Inverse@mnFactorLoadingsPAll, 82, 3<TD.HvnReturn - nriskfreel 80.02, 0.0< We can now construct l = {l 0, l, l 2 } by simply prepending the risk free rate to the factor returns. vnlambda = Prepend@vnFactorExcessReturns, nriskfreed 80., 0.02, 0.0< When we apply l to the original APT factor loadings we recover the original expected returns.

ams-5-sol-04-m.nb 8 vnreturn ã mnfactorloadings.vnlambda True Chapter 8, Problem 4 This the well-known statistical results for the sample mean and sample variance. Any text on mathematical statistics will provide a proof. Intuitively, however, we are using the sample, rather than true, mean in the computation of the sample variance and have lost a degree of freedom, i.e., we have n and not n independent data points. Chapter 8, Problem 6 Here is the raw data for the problem: two-years of monthly returns, expressed as percentages. vnmonthlyreturn = 8.0, 0.5, 4.2, -2.7, -2.0, 3.5, -3., 4.,.7, 0., -2.4, 3.2, 4.2, 4.5, -2.5, 2., -.7, 3.7, 3.2, -2.4, 2.7, 2.9, -.9,.<; nsamplesize = Length@vnMonthlyReturnD; The mean and standard deviation of return are nmonthlymean = Mean@vnMonthlyReturnD nmonthlysdev = è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Variance@vnMonthlyReturnD!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!. 2.6866 Using the approximation suggested in the text, the annualized mean and standard deviation are nannualizedmean = 2 nmonthlymean nannualizedsdev = è!!!!!!! 2 nmonthlysdev 2. 9.28955

ams-5-sol-04-m.nb 9 The standard deviations of the monthly estimates are nmonthlymeansdev = nmonthlysdev ë è!!!!!!!!!!!!!!!!!!!!!!!!!!!! nsamplesize nmonthlyvarsdev = I è!!! 2 nmonthlysdev 2 M ë è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! nsamplesize - 0.547392 2.206