portfolio beta 
/////////////////////////////////
The portfolio beta is the weighted individual stock beta. 

 beta(portfolio) = w1*beta1 + w2*beta2 + ... + wn*betan

  where beta(portfolio) is the portfolio's beta
        w1    is the weight for stock 1
        beta1 is the beta   for stock 1

            investment for stock 1
      w1=  -------------------------
             total investment 

/////////////////////////////////

Dimson (1979) beta adjustment
/////////////////////////////////
[note: this is optional material]

  Dimson, E., (1979). Risk measurement when shares are subject to infrequent 
           trading, Journal of Financial Economics, 7, 197-226 

     http://www.sciencedirect.com/science/article/pii/0304405X79900138

/////////////////////////////////

Assumption behind the CAPM 
/////////////////////////////////
Assumptions: 

  #1: All investors are risk averse by nature

  #2: Investors have the same time period to evaluate information

  #3: There is unlimited capital to borrow at the risk-free rate of return

  #4: Investments can be divided into unlimited pieces and sizes

  #5: There are no taxes, inflation or transactions costs

/////////////////////////////////

Several R data sets 
/////////////////////////////////

  http://canisius.edu/~yany/RData/ibm.RData

  http://canisius.edu/~yany/RData/dell.RData

  http://canisius.edu/~yany/RData/SP500.RData

  http://canisius.edu/~yany/RData/daily100.RData
 
  http://canisius.edu/~yany/RData/retDIBM.RData

/////////////////////////////////

How to install R on a Mac machine
/////////////////////////////////////////////////

 1) Agrawal,Abhinav, 2014, Programming in R - Getting Started - Installing R and RStudio on a Mac (5m59s)
     (v42k,s4k,t5:59)
       https://www.youtube.com/watch?v=Ywj6yNfc5nM

 2) Data Science with Tom, 2020, How to install R & RStudio on Mac in 2021 - step-by-step walkthrough
    (s1k,v5k,t4:40)
    https://www.youtube.com/watch?v=LanBozXJjOk

 3) Merchant,Emily, 2019, Installing R and RStudio on a Mac (Jan. 2019)
    (v36k,s58,t3:01)
    https://www.youtube.com/watch?v=EmZqlcKkJMM&t=1s

//////////////////////////////////////////////////