marking1/drumb_test2.scala
author Christian Urban <urbanc@in.tum.de>
Fri, 19 Jan 2018 14:09:08 +0000
changeset 169 b37052895281
parent 158 94b11ac19b41
child 170 37b1bfcdba79
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     2
val urban_prices1 = CW6c.get_prices(List("BIDU"), 2004 to 2008)
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     3
val urban_prices2 = CW6c.get_prices(List("GOOG", "AAPL"), 2010 to 2012)
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     6
assert(CW6c.get_deltas(urban_prices1) == 
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     7
       List(List(None), List(None), 
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     8
	    List(Some(0.9277165354330709)), List(Some(2.119679764725104))))
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    10
assert(CW6c.get_deltas(urban_prices2) == 
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    11
       List(List(Some(-0.03573992567129673), Some(0.5399749442411563)), 
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    12
	    List(Some(0.10103412653643493), Some(0.2477771728154912))))