progs/drumb_sol.scala
changeset 81 ff8d075842d5
parent 64 d6f97b562424
child 82 28c8e17ab83a
equal deleted inserted replaced
80:ea0d0a862a9c 81:ff8d075842d5
    43 
    43 
    44 // test case
    44 // test case
    45 val p_fb = get_prices(List("FB"), 2012 to 2014)
    45 val p_fb = get_prices(List("FB"), 2012 to 2014)
    46 val p = get_prices(List("GOOG", "AAPL"), 2005 to 2012)
    46 val p = get_prices(List("GOOG", "AAPL"), 2005 to 2012)
    47 
    47 
       
    48 get_prices(List("BIDU"), 2004 to 2008)
    48 
    49 
    49 // (2) The first function below calculates the change factor (delta) between
    50 // (2) The first function below calculates the change factor (delta) between
    50 // a price in year n and a price in year n+1. The second function calculates
    51 // a price in year n and a price in year n+1. The second function calculates
    51 // all change factors for all prices (from a portfolio).
    52 // all change factors for all prices (from a portfolio).
    52 
    53