Concurrency Show and Tell


Details
Your mission, should you choose to accept it is fetch stock data for multiple stocks and compute a simple moving average for each one concurrently. Doing this sequentially is a fine first step but the goal is to do it concurrently using your abstraction of choice. Actors, Futures, Threads and Locks, or any other concurrency abstraction is ok to use.
Yahoo provides an HTTP link to download CSV data where s is the symbol and a,b,c,d,e, and f are the start and end dates. The link below downloads a years worth of daily data in CSV fomat from May 9th 2013 to May 9th 2014. The symbols and timeframe aren't that important as long as you obtain data. Some other symbols to use are NFLX, TWTR, AMZN, MSFT, ADBE, CSCO, EBAY, GOOG, TSLA, and so on.
https://ichart.finance.yahoo.com/table.csv?s=AAPL&a=04&b=9&c=2013&d=04&e=9&f=2014&g=d&ignore=.csv
A reasonable input for your program is a list of ticker symbols.
tickers: Seq[String]
e.g. Seq("AAPL", "GOOG", "TWTR")
A reasonable output could be a list of list of doubles
averages: Seq[Seq[Double]]
e.g. Seq(Seq(587.12, 585.35,...), Seq( 509.01, 507.35,...), Seq(35.55, 36.62,...)) where Seq(0) is the average or AAPL and so on. A Tuple or a map with symbol/average is ok too.
Bonus points for:
• Handling HTTP request timeouts or failures.
• Handling partial failures. If one HTTP request fails, then still return data for the other valid requests. An invalid ticker symbol or network bug could cause this.
• Chaining indicators. e.g. Using the simple moving average compute the standard deviation. See this page on Stock Indicators (http://stockcharts.com/help/doku.php?id=chart_school:technical_indicators) for other formulas to use.
Leave a comment if you want to show and discuss your code with the group for about 20 minutes. I think we'll have time for a maximum of four demos including setup and discussion.

Concurrency Show and Tell