main_marking1/drumb_test3.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 02 Nov 2023 12:37:58 +0000
changeset 473 ac79c2e534bd
parent 424 daf561a83ba6
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
424
Christian Urban <christian.urban@kcl.ac.uk>
parents: 388
diff changeset
     1
import M1._
Christian Urban <christian.urban@kcl.ac.uk>
parents: 388
diff changeset
     2
Christian Urban <christian.urban@kcl.ac.uk>
parents: 388
diff changeset
     3
assert(get_prices(List("BIDU"), 2004 to 2008) ==
388
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     4
   List(List(None), List(None), List(Some(6.35)), 
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     5
        List(Some(12.241)), List(Some(38.188))))
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     6
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     7
424
Christian Urban <christian.urban@kcl.ac.uk>
parents: 388
diff changeset
     8
assert(get_prices(List("GOOG", "AAPL"), 2010 to 2012) ==
388
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     9
   List(List(Some(312.204773), Some(26.782711)), 
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    10
        List(Some(301.0466), Some(41.244694)), 
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    11
        List(Some(331.462585), Some(51.464207))))