424
|
1 |
|
388
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
2 |
|
424
|
3 |
assert(M1.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2000, 100) == 100)
|
|
4 |
assert(M1.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2001, 100) == 27)
|
|
5 |
assert(M1.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2002, 100) == 42)
|
|
6 |
assert(M1.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2003, 100) == 27)
|
|
7 |
assert(M1.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2004, 100) == 38)
|
388
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
8 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
9 |
// 113
|
424
|
10 |
assert((112 to 114).contains(M1.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2005, 100)))
|
388
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
11 |
// 254
|
424
|
12 |
assert((252 to 256).contains(M1.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2006, 100)))
|
388
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
13 |
// 349
|
424
|
14 |
assert((346 to 352).contains(M1.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2007, 100)))
|
388
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
15 |
//11504
|
424
|
16 |
assert((11389 to 11619).contains(M1.investment(List("GOOG", "AAPL", "BIDU"), 1990 to 2017, 100)))
|