Estimate average closing price for each year 
///////////////////////////////////////////////////////
1) Using Excel Pivot Table

  Step 1: download IBM's daily historical price 
          a) https://finance.yahoo.com
          b) issue the following line
             .show_ibmDaily(0)

  Step 2: Generate a 'Year' variable by using =year() 
  Step 3: highlight all data set, click 'Insert'-> 'Pivot Table'
  Step 4: Drag 'Year' to 'Rows', and 
               'Close' to 'Values'
  Step 5: choose average from 'Value Field Settings'

2) using Python 
   Step 1: load yfinance module
   Step 2: generate a 'Year' column 
   Step 3: Uinsg grouby() funciotn and mean() funcitons 

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

Estimate annual risk for IBM
///////////////////////////////////////////////////////
Note #1: One type of risk in finance is defined as the sigma 
         (standard deviation) of returns

NOte #2: sigma(annual) = sqrt(252)*std(daily)
         sigma(annual) = sqrt(12)*std(monthly)

1) Using Excel Pivot Table
-------------------------
  Step 1: download IBM's daily historical price 
          a) https://finance.yahoo.com
          b) issue the following line
             .show_ibmDaily(0)

  Step 2:  Generate a 'Year' column by using =year() 
  Step 2B: Generate a 'Return' column 
  Step 3:  highlight all data set, click 'Insert'-> 'Pivot Table'
  Step 4:  Drag 'Year' to 'Rows', and 
               'Return' to 'Values'
  Step 5:  Choose average from 'Value Field Settings'

2) using Python 
   Step 1:  Load yfinance module
   Step 2:  Generate a 'Year' column 
   Step 2B: Generate a 'Ret' column by using shift(1)
   Step 3:  Uinsg grouby() funciotn and mean() funcitons 

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

Searching the final exam schedule (fall 2021) 
///////////////////////////////////////////////////////
Using an R data set called exam2021f.RData

> .sw("exam fall")
   ID           NAME                                      WEBSITE
1 135 exam fall 2021 http://datayyy.com/doc_pdf/exam2021f.pdf    
2 136 exam fall 2021 http://datayyy.com/data_excel/exam2021f.xlsx
3 137 exam fall 2021 http://datayyy.com/data_R/exam2021f.RData   


 Step 1: retrieve the R data set (exam2021f.RData)

 Step 1B: view the structure of the data set

 Step 2:  keyword is "TR8"  or "TR11"

 Step 3:  find the day and time 

 Step 4: write a function 

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