Exercises
- What is the assumption behind don't put all your eggs in one basket?
- What are the measures of risk?
- How do you measure the co-moment between two stock returns?
- Why it is argued that correlation is a better measure than covariance when we evaluate the co-movements between two stocks?
- For two stocks A and B, with two pairs of (σA, σB) and (βA,βB), which pair is important when comparing their expected returns?
- Is it true that variance and correlation of historical returns possess the same sign?
- Find some inefficiency with the following code:
import scipy as sp sigma1=0.02 sigma2=0.05 rho=-1 n=1000 portVar=10 # assign a big number tiny=1.0/n for i in sp.arange(n): w1=i*tiny w2=1-w1 var=w1**2*sigma1**2 +w2**2*sigma2**2+2*w1*w2*rho*sigma1*sigma2 ...
Get Python for Finance - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.