424
|
1 |
|
388
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
2 |
val urban_prices = List(List(Some(312.204773), Some(26.782711)),
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
3 |
List(Some(301.0466), Some(41.244694)),
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
4 |
List(Some(331.462585), Some(51.464207)))
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
5 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
6 |
|
424
|
7 |
assert(M1.get_deltas(urban_prices) == List(List(Some(-0.03573991804411003), Some(0.539974575389325)),
|
388
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
8 |
List(Some(0.10103414222249969), Some(0.24777764141006836))))
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
9 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
10 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
11 |
//get_prices(List("BIDU"), 2004 to 2008)
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
12 |
val urban_prices2 = List(List(None), List(None),
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
13 |
List(Some(6.35)), List(Some(12.241)),
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
14 |
List(Some(38.188)))
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
15 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
16 |
|
424
|
17 |
assert(M1.get_deltas(urban_prices2) == List(List(None), List(None),
|
388
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
18 |
List(Some(0.9277165354330709)),
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
19 |
List(Some(2.119679764725104))))
|