L0B-Matrix Operations and Python
L0B-Matrix Operations and Python
Economics of Finance
2 / 13
Tables as Matrices
Bond Stock
Mon 54 21
Tue 55 18
Wed 56 27
3 / 13
Example: Asset allocation with investment funds
Portfolio, vector x:
Fund A 0.20
Fund B 0.30
Fund C 0.50
4 / 13
Asset allocation
Question:
• What is the Investor’s current allocation among the three
major asset classes?
• We know that Ax = b:
0.6 0.2 0.0 0.2 0.18
0.4 0.5 0.3 0.3 = 0.38
0.0 0.3 0.7 0.5 0.44
How do we interpret b?
5 / 13
Fund Allocations
6 / 13
Desirable Portfolio
7 / 13
Return and Variance
where
• σij is covariance of asset i with asset j;
• Ri is the return of each asset
Ri = P1 /P0 − 1
8 / 13
Example
Asset A B C
A 0.25 0.078 0.09
σ=
B 0.078 0.35 0.053
C 0.09 0.053 0.48
9 / 13
Expected return
0.10
R = 0.11
0.12
So, the return of portfolio:
10 / 13
Variance
Given that:
0.25 0.078 0.09
σ = 0.078 0.35 0.053
0.09 0.053 0.48
and
0.25
W = 0.10
0.65
Variance of the portfolio can be found by:
WT σW = 0.2620
11 / 13
Check point: Python
12 / 13
Python Notes
13 / 13