diff -r 50a3b874008a -r 1616d06a0893 testing1/drumb_test6.scala --- a/testing1/drumb_test6.scala Sat Dec 15 13:46:54 2018 +0000 +++ b/testing1/drumb_test6.scala Sat Dec 15 23:58:12 2018 +0000 @@ -1,21 +1,9 @@ -//println("starting test now") +//val urban_deltas = get_deltas(get_prices(List("GOOG", "AAPL"), 2010 to 2012)) -/* -import scala.concurrent._ -import scala.concurrent.duration._ -import ExecutionContext.Implicits.global -import scala.language.postfixOps - -val urban_prices = List(List(Some(71.539941), None), - List(Some(76.974614), None), - List(Some(65.226685), Some(6.35)), - List(Some(78.354649), Some(12.241)), - List(Some(85.517645), Some(38.188))) +val ds_urban = List(List(Some(-0.03573992567129673), Some(0.539975124774038)), + List(Some(0.10103412653643493), Some(0.24777709700099845))) -val urban_prices = List(List(Some(311.349976), Some(27.505054)), - List(Some(300.222351), Some(42.357094)), - List(Some(330.555054), Some(52.852215))) -assert(get_deltas(urban_prices) == List(List(Some(-0.03573992567129673), Some(0.5399749442411563)), - List(Some(0.10103412653643493), Some(0.2477771728154912)))) +assert(yearly_yield(ds_urban, 100, 0) == 125) +assert(yearly_yield(ds_urban, 100, 1) == 117)