testing1/drumb_test7.scala
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 06 Aug 2019 00:12:34 +0100
changeset 270 38e13601cb1b
parent 248 e8d966b1826d
child 281 32dfd2ca577b
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
130
d272307e6c02 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
248
e8d966b1826d updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     2
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2000, 100) == 100)
e8d966b1826d updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     3
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2001, 100) == 27)
e8d966b1826d updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     4
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2002, 100) == 42)
e8d966b1826d updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     5
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2003, 100) == 27)
e8d966b1826d updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     6
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2004, 100) == 38)
e8d966b1826d updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     7
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2005, 100) == 113)
e8d966b1826d updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     8
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2006, 100) == 254)
e8d966b1826d updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     9
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2007, 100) == 349)