marking1/drumb_test3.scala
author Christian Urban <urbanc@in.tum.de>
Mon, 27 Nov 2017 01:15:36 +0000
changeset 158 94b11ac19b41
child 169 b37052895281
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
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
val urban_prices = List(List(Some(311.349976), Some(27.505054)), 
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
			List(Some(300.222351), Some(42.357094)), 
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
			List(Some(330.555054), Some(52.852215)))
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
assert(CW6c.yearly_yield(CW6c.get_deltas(urban_prices), 100, 0) == 125)
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
val urban_blchip_portfolio = List("GOOG", "AAPL", "MSFT", "IBM", "FB", "AMZN", "BIDU")
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
val urban_rstate_portfolio = List("PLD", "PSA", "AMT", "AIV", "AVB", "BXP", "CCI", 
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
                                  "DLR", "EQIX", "EQR", "ESS", "EXR", "FRT", "GGP", "HCP") 
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
val urban_rstate_res = CW6c.investment(urban_rstate_portfolio, 1978 to 2017, 100)
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
val urban_blchip_res = CW6c.investment(urban_blchip_portfolio, 1978 to 2017, 100)
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
// the rstate value is 30895 because of a faulty ESS.cvs file
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
assert(urban_rstate_res > 30885 && urban_rstate_res < 30905)
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
assert(urban_blchip_res > 349587 && urban_blchip_res < 349607)