progs/trade.scala
changeset 35 9fea5f751be4
parent 18 87e55eb309ed
equal deleted inserted replaced
34:40424bbe109e 35:9fea5f751be4
    39 
    39 
    40 
    40 
    41 
    41 
    42 // some test cases
    42 // some test cases
    43 
    43 
    44 //query_comp("GOOG")
    44 //query_company("GOOG")
    45 
    45 
    46 // some more test cases
    46 // some more test cases
    47 /*
    47 /*
    48 val indices = List("GOOG", "AAPL", "MSFT", "IBM", "FB", "YHOO", "AMZN", "BIDU")
    48 val indices = List("GOOG", "AAPL", "MSFT", "IBM", "FB", "YHOO", "AMZN", "BIDU")
    49 
    49 
    50 for (name <- indices) {
    50 for (name <- indices) {
    51   val times = query_comp(name)
    51   val times = query_company(name)
    52   println(s"Buy ${name} on ${times._1} and sell on ${times._2}")
    52   println(s"Buy ${name} on ${times._1} and sell on ${times._2}")
    53 }
    53 }
    54 */
    54 */
    55 
    55 
    56 
    56