# HG changeset patch # User Christian Urban # Date 1510243471 0 # Node ID 53c769a78a1e2514448ce90e23a0f6bdd3c610c4 # Parent c08ba57a7f53ba19d58a344c986ab683b9f9b8d3 updated diff -r c08ba57a7f53 -r 53c769a78a1e LINKS --- a/LINKS Wed Nov 08 22:36:42 2017 +0000 +++ b/LINKS Thu Nov 09 16:04:31 2017 +0000 @@ -6,7 +6,8 @@ BufferOverflow http://seclists.org/oss-sec/2017/q2/344 - +Data sources +https://www.forbes.com/sites/bernardmarr/2016/02/12/big-data-35-brilliant-and-free-data-sources-for-2016/#60d25011b54d ========= Intro Videos https://www.youtube.com/watch?v=ugHsIj60VfQ (30:00 slide about functions) diff -r c08ba57a7f53 -r 53c769a78a1e pics/cplus1.jpg Binary file pics/cplus1.jpg has changed diff -r c08ba57a7f53 -r 53c769a78a1e pics/cplus2.jpg Binary file pics/cplus2.jpg has changed diff -r c08ba57a7f53 -r 53c769a78a1e pics/gateway.jpg Binary file pics/gateway.jpg has changed diff -r c08ba57a7f53 -r 53c769a78a1e pics/mand1.png Binary file pics/mand1.png has changed diff -r c08ba57a7f53 -r 53c769a78a1e pics/mand2.png Binary file pics/mand2.png has changed diff -r c08ba57a7f53 -r 53c769a78a1e pics/mand3.png Binary file pics/mand3.png has changed diff -r c08ba57a7f53 -r 53c769a78a1e pics/mand4.png Binary file pics/mand4.png has changed diff -r c08ba57a7f53 -r 53c769a78a1e pics/robotron.jpg Binary file pics/robotron.jpg has changed diff -r c08ba57a7f53 -r 53c769a78a1e pics/sun.jpg Binary file pics/sun.jpg has changed diff -r c08ba57a7f53 -r 53c769a78a1e progs/lecture1.scala --- a/progs/lecture1.scala Wed Nov 08 22:36:42 2017 +0000 +++ b/progs/lecture1.scala Thu Nov 09 16:04:31 2017 +0000 @@ -302,23 +302,26 @@ // obtaining a webpage val url = """https://nms.kcl.ac.uk/christian.urban/""" +val url = """http://api.postcodes.io/postcodes/CR84LQ""" Source.fromURL(url)("ISO-8859-1").mkString -// function for looking up stockmarket data -def price_lookup(symbol: String) : String = { - val url = "https://download.finance.yahoo.com/d/quotes.csv?s=" + symbol + "&f=snl1" - Source.fromURL(url).mkString.drop(1).dropRight(2) +// a function for looking up constituency data +def consty_lookup(pcode: String) : String = { + val url = "http://api.postcodes.io/postcodes/" + pcode + Source.fromURL(url).mkString.split(",")(16) } -price_lookup("GOOG") -price_lookup("AAPL") +consty_lookup("CR84LQ") +consty_lookup("WC2B4BG") -val companies = - List("GOOG", "AAPL", "MSFT", "IBM", "FB", "YHOO", "AMZN", "BIDU") +val places = + List("CR84LQ", "WC2B4BG", "KY169QT", "CB11LY", "CB39AX") -for (s <- companies) println(price_lookup(s)) +for (s <- places) println(consty_lookup(s)) + + // A Web Crawler @@ -328,7 +331,6 @@ // regular expression "https?://[^"]*" import io.Source -import scala.util.matching.Regex import scala.util._ // gets the first 10K of a web-page @@ -358,7 +360,7 @@ // some starting URLs for the crawler val startURL = """https://nms.kcl.ac.uk/christian.urban/""" -//val startURL = """http://www.inf.kcl.ac.uk/staff/mcburney""" +//val startURL = """https://nms.kcl.ac.uk/luc.moreau/index.html""" crawl(startURL, 2) diff -r c08ba57a7f53 -r 53c769a78a1e progs/mandelbrot.scala --- a/progs/mandelbrot.scala Wed Nov 08 22:36:42 2017 +0000 +++ b/progs/mandelbrot.scala Thu Nov 09 16:04:31 2017 +0000 @@ -75,8 +75,8 @@ val delta_x = (end.a - start.a) / W val delta_y = (end.b - start.b) / H - for (y0 <- (0 until H).par) { - for (x0 <- (0 until W).par) { + for (y0 <- (0 until H)) { + for (x0 <- (0 until W)) { val c = start + Complex(x0 * delta_x, y0 * delta_y) diff -r c08ba57a7f53 -r 53c769a78a1e slides/slides01.pdf Binary file slides/slides01.pdf has changed diff -r c08ba57a7f53 -r 53c769a78a1e slides/slides01.tex --- a/slides/slides01.tex Wed Nov 08 22:36:42 2017 +0000 +++ b/slides/slides01.tex Thu Nov 09 16:04:31 2017 +0000 @@ -34,9 +34,11 @@ \normalsize \begin{center} \begin{tabular}{ll} - Email: & christian.urban at kcl.ac.uk\\ - Office: & N7.07 (North Wing Bush House)\\ - Slides \& Code: & KEATS + Email: & christian.urban at kcl.ac.uk\\ + Office: & N7.07 (North Wing, Bush House)\\ + Slides \& Code: & KEATS\medskip\\ + Scala Office & \\ + Hours: & Thursdays 11 -- 13\\ \end{tabular} \end{center} @@ -90,7 +92,8 @@ \end{itemize}\bigskip\medskip \small -alternatives: Elm, Haskell, Ocaml, ML, Lisp (Racket), \ldots +alternatives:\\ +Elm, Haskell, Ocaml, F\sharp, Erlang, ML, Lisp (Racket), \ldots \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -122,16 +125,181 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame}[c] -\frametitle{Scala Tools} +\frametitle{First Steps: Scala Tools} \begin{itemize} \item there is a plugin for Eclipse (called Scala IDE)\medskip -\item there is also a plugin for IntelliJ\bigskip -\item I use the venerable Emacs ;o) +\item there is also a plugin for IntelliJ\medskip +\item there is a worksheet mode in Eclipse and IntelliJ\bigskip +\item I use Sublime or venerable Emacs ;o) \end{itemize} \end{frame} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{frame}[c] + \frametitle{\bf + \only<1>{\begin{tabular}{l}\\[2mm]Why Scala?\\ \mbox{}\end{tabular}} + \only<2->{\begin{tabular}{l}\\[2mm]Why Functional\\ Programming?\end{tabular}} +} + + + % + \mbox{}\\[3.5cm] + \small +Scala, Elm, Haskell, Ocaml, F\sharp, Erlang, ML, Lisp (Racket), \ldots + +\only<3>{ +\begin{textblock}{6}(2,6.2) +\begin{bubble}[10cm] +\normalsize``If you want to see which features will be in mainstream programming + languages tomorrow, then take a look at functional programming + languages today.''\medskip\small\\ + \hfill{}---Simon Peyton Jones (works at Microsoft)\\ + \hfill{}main developer of the Glasgow Haskell Compiler +\end{bubble} +\end{textblock}} + +\end{frame} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{frame}[c] +\mbox{}\\[-21mm]\mbox{} + +\begin{center} + \begin{tikzpicture}[scale=1, + node/.style={ + rectangle,rounded corners=3mm, + very thick,draw=black!50, + minimum height=18mm, minimum width=20mm, + top color=white,bottom color=black!20}] + + \onslide<1-10>{ + \node (A) at (0,0) [node] + {\mbox{\includegraphics[scale=0.15]{../pics/cplus2.jpg}}}; + \node [above right] at (A.north west) {1986};} + + \onslide<2->{ + \node (B) at (3.5,0) [node] + {\mbox{\includegraphics[scale=0.15]{../pics/robotron.jpg}}}; + \node [above right] at (B.north west) {1988, C}; + \draw [->,line width=4mm] (A) -- (B);} + + \onslide<3->{ + \node (C0) at (6.3,0) {}; + \node (C) at (8,0) [node] + {\mbox{\includegraphics[scale=0.15]{../pics/sun.jpg}}}; + \node [above right] at (C.north west) {1992, {\small Linux}}; + \draw [->,line width=4mm] (B) -- (C0); + \draw [->,line width=4mm] (C0) -- (C);} + + \onslide<4->{ + \node (D) at (8,-3.3) [node] + {\mbox{\includegraphics[scale=0.2]{../pics/gateway.jpg}}}; + \draw [->,line width=4mm] (C) -- (D); + \node [below right] at (D.south west) {1996};} + + \onslide<5->{ + \node (E) at (4,-3.3) [node] + {\mbox{\includegraphics[scale=0.1]{../pics/appleg4.jpg}}}; + \draw [->,line width=4mm] (D) -- (E); + \node [above right] at (E.north west) {2000};} + + \onslide<6->{ + \node (F0) at (1.5,-3.3) {}; + \node (F1) at (1,-3.3) {}; + \node (F) at (-0.9,-3.3) [node] + {\mbox{\includegraphics[scale=0.3]{../pics/appleair.png}}}; + \draw [->,line width=4mm] (E) -- (F0); + \draw [->,line width=4mm] (F1) -- (F); + \node [above right] at (F.north west) {2012?};} + + \onslide<7->{ + \node (G) at (-0.9,-6.3) [node] + {\mbox{\includegraphics[scale=0.02]{../pics/applepro.jpg}}}; + \draw [->,line width=4mm] (F) -- (G); + \node [right] at (G.west) {\hspace{22mm}2017};} + + \end{tikzpicture} + \end{center} + + + \only<1>{% + \begin{textblock}{10}(2.5,5) + \includegraphics[scale=0.26]{../pics/cplus1.jpg}\\ + \footnotesize 64K RAM, no HD, no monitor, lots of cables + \end{textblock} + \begin{textblock}{6}(10.9,4.5) + \includegraphics[scale=0.09]{../pics/mand1.png} + \includegraphics[scale=0.09]{../pics/mand2.png} + \end{textblock} + \begin{textblock}{6}(10.8,2.2) + \huge\bf 3 days + \end{textblock} + } + \only<8->{% + \begin{textblock}{8}(5.8,11.6) + \large\bf + \begin{tabular}{l@{}l} + 1986:\, & no Internet\\ + & no Amazon\\ + & no FB, no mobiles,\ldots\\ + \end{tabular} + \end{textblock} + } + \only<9>{ + \begin{textblock}{1}(3,3) + \begin{bubble}[9cm] + \begin{tabular}{@{\hspace{8mm}}llll@{\hspace{8mm}}} + \\ + \multicolumn{4}{c}{\bf Speedup by Moore's Law}\medskip\\ + \textbf{1986:} & 3 days & \textbf{1996:} & 135 mins\\ + \textbf{1988:} & 1.5 days & \textbf{1998:} & 67 mins\\ + \textbf{1990:} & 18 hs & \textbf{2000:} & 33 mins\\ + \textbf{1992:} & 9 hs & \textbf{2002:} & 16 mins\\ + \textbf{1994:} & 4.5 hs & \multicolumn{2}{c}{???}\\ + \\ + \end{tabular} + \small Every two years, computers got twice as powerful. + \end{bubble} + \end{textblock}} + +\end{frame} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{frame}[c] +\frametitle{Seq vs Par} + +\begin{center} + \begin{tabular}[t]{@{}l@{}l@{}} + \includegraphics[scale=0.14]{../pics/mand4.png} & + \raisebox{1.2mm}{\includegraphics[scale=0.14]{../pics/mand3.png}} + \end{tabular} +\end{center} + +\only<2>{ + \begin{textblock}{5}(12,2) + \begin{bubble}[2.1cm] + \footnotesize{}in Java or C++\\ + \includegraphics[scale=0.50]{../pics/skeleton.jpg}\\ + \end{bubble} + \end{textblock}} + +\only<3>{ + \begin{textblock}{5}(1,8) + \begin{bubble}[2.1cm] + \footnotesize{}in Java or C++\\ + \end{bubble} + \end{textblock}} + +\end{frame} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame}[c] diff -r c08ba57a7f53 -r 53c769a78a1e testing/ESS-orignal.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testing/ESS-orignal.csv Thu Nov 09 16:04:31 2017 +0000 @@ -0,0 +1,469 @@ +Date,Adj Close +1995-01-03,5.852035 +1995-01-04,5.943475 +1995-01-05,5.989194 +1995-01-06,6.080631 +1995-01-09,6.034914 +1995-01-10,6.034914 +1995-01-11,5.989194 +1995-01-12,5.989194 +1995-01-13,6.034914 +1995-01-16,5.989194 +1995-01-17,6.034914 +1995-01-18,6.034914 +1995-01-19,5.897754 +1995-01-20,5.943475 +1995-01-23,5.852035 +1995-01-24,5.897754 +1995-01-25,5.989194 +1995-01-26,5.943475 +1995-01-27,6.034914 +1995-01-30,6.080631 +1995-01-31,6.034914 +1996-01-02,7.270742 +1996-01-03,7.414245 +1996-01-04,7.366413 +1996-01-05,7.318579 +1996-01-08,7.318579 +1996-01-09,7.222910 +1996-01-10,7.175077 +1996-01-11,7.222910 +1996-01-12,7.318579 +1996-01-15,7.318579 +1996-01-16,7.318579 +1996-01-17,7.270742 +1996-01-18,7.509913 +1996-01-19,7.557751 +1996-01-22,7.462082 +1996-01-23,7.414245 +1996-01-24,7.509913 +1996-01-25,7.462082 +1996-01-26,7.557751 +1996-01-29,7.509913 +1996-01-30,7.605583 +1996-01-31,7.653416 +1997-01-02,11.881297 +1997-01-03,11.984172 +1997-01-06,11.881297 +1997-01-07,11.932732 +1997-01-08,11.829863 +1997-01-09,11.778431 +1997-01-10,11.829863 +1997-01-13,11.829863 +1997-01-14,11.984172 +1997-01-15,11.984172 +1997-01-16,12.138470 +1997-01-17,12.035602 +1997-01-20,11.881297 +1997-01-21,11.932732 +1997-01-22,11.984172 +1997-01-23,11.726995 +1997-01-24,12.035602 +1997-01-27,11.778431 +1997-01-28,11.829863 +1997-01-29,11.778431 +1997-01-30,11.829863 +1997-01-31,12.035602 +1998-01-02,14.938869 +1998-01-05,14.938869 +1998-01-06,14.993190 +1998-01-07,15.183331 +1998-01-08,15.156165 +1998-01-09,15.020358 +1998-01-12,14.884543 +1998-01-13,14.911707 +1998-01-14,15.020358 +1998-01-15,15.047518 +1998-01-16,15.101836 +1998-01-20,15.047518 +1998-01-21,14.966024 +1998-01-22,14.993190 +1998-01-23,15.101836 +1998-01-26,15.101836 +1998-01-27,15.074673 +1998-01-28,15.020358 +1998-01-29,14.993190 +1998-01-30,14.966024 +1999-01-04,14.025302 +1999-01-05,13.996386 +1999-01-06,13.996386 +1999-01-07,13.822870 +1999-01-08,13.533695 +1999-01-11,13.591533 +1999-01-12,13.678288 +1999-01-13,13.678288 +1999-01-14,13.591533 +1999-01-15,13.620451 +1999-01-19,13.504783 +1999-01-20,13.446944 +1999-01-21,13.389109 +1999-01-22,13.273438 +1999-01-25,13.389109 +1999-01-26,13.360189 +1999-01-27,13.475864 +1999-01-28,13.533695 +1999-01-29,13.244512 +2000-01-03,16.493027 +2000-01-04,16.307369 +2000-01-05,16.245474 +2000-01-06,16.400206 +2000-01-07,16.957186 +2000-01-10,16.864355 +2000-01-11,16.678696 +2000-01-12,16.647747 +2000-01-13,16.833414 +2000-01-14,16.771526 +2000-01-18,16.709637 +2000-01-19,16.895294 +2000-01-20,16.988136 +2000-01-21,16.864355 +2000-01-24,16.833414 +2000-01-25,16.926237 +2000-01-26,16.895294 +2000-01-27,17.019073 +2000-01-28,16.802471 +2000-01-31,16.833414 +2001-01-02,28.318230 +2001-01-03,29.165493 +2001-01-04,28.709263 +2001-01-05,27.014725 +2001-01-08,27.145082 +2001-01-09,27.112501 +2001-01-10,27.373198 +2001-01-11,27.112501 +2001-01-12,27.210264 +2001-01-16,27.112501 +2001-01-17,26.949572 +2001-01-18,26.949572 +2001-01-19,26.786631 +2001-01-22,26.558525 +2001-01-23,26.949572 +2001-01-24,26.688868 +2001-01-25,26.819216 +2001-01-26,26.460754 +2001-01-29,26.747513 +2001-01-30,26.898727 +2001-01-31,26.982149 +2002-01-02,27.218304 +2002-01-03,27.439131 +2002-01-04,27.312141 +2002-01-07,27.135471 +2002-01-08,27.218304 +2002-01-09,27.234854 +2002-01-10,27.279013 +2002-01-11,27.135471 +2002-01-14,27.328707 +2002-01-15,27.014013 +2002-01-16,26.721403 +2002-01-17,26.566826 +2002-01-18,26.119616 +2002-01-22,26.141701 +2002-01-23,26.196905 +2002-01-24,26.252123 +2002-01-25,25.920862 +2002-01-28,25.755232 +2002-01-29,25.639292 +2002-01-30,25.633776 +2002-01-31,25.584084 +2003-01-02,30.091045 +2003-01-03,30.173044 +2003-01-06,30.307737 +2003-01-07,30.102762 +2003-01-08,29.880205 +2003-01-09,29.938761 +2003-01-10,29.681084 +2003-01-13,29.874348 +2003-01-14,29.985628 +2003-01-15,30.038322 +2003-01-16,29.874348 +2003-01-17,29.856792 +2003-01-21,29.036856 +2003-01-22,29.165697 +2003-01-23,29.083719 +2003-01-24,29.025146 +2003-01-27,28.990002 +2003-01-28,29.107136 +2003-01-29,29.212549 +2003-01-30,29.077856 +2003-01-31,29.563951 +2004-01-02,39.592564 +2004-01-05,39.104923 +2004-01-06,38.882706 +2004-01-07,38.753071 +2004-01-08,38.722202 +2004-01-09,38.629608 +2004-01-12,38.271587 +2004-01-13,38.493813 +2004-01-14,38.827148 +2004-01-15,38.611103 +2004-01-16,38.209869 +2004-01-20,37.438255 +2004-01-21,37.814793 +2004-01-22,37.938263 +2004-01-23,38.006157 +2004-01-26,38.839493 +2004-01-27,38.629608 +2004-01-28,38.765408 +2004-01-29,38.407402 +2004-01-30,38.364185 +2005-01-03,53.413624 +2005-01-04,52.284302 +2005-01-05,50.393494 +2005-01-06,50.141819 +2005-01-07,49.812710 +2005-01-10,48.915714 +2005-01-11,48.102596 +2005-01-12,47.483082 +2005-01-13,47.354015 +2005-01-14,48.676941 +2005-01-18,49.231918 +2005-01-19,49.277077 +2005-01-20,49.186745 +2005-01-21,49.051220 +2005-01-24,48.528507 +2005-01-25,47.108795 +2005-01-26,47.618591 +2005-01-27,46.786129 +2005-01-28,46.469910 +2005-01-31,46.431206 +2006-01-03,63.367146 +2006-01-04,63.857059 +2006-01-05,64.427521 +2006-01-06,64.427521 +2006-01-09,64.689247 +2006-01-10,65.299995 +2006-01-11,65.628830 +2006-01-12,65.736191 +2006-01-13,65.098648 +2006-01-17,65.299995 +2006-01-18,64.628845 +2006-01-19,66.004677 +2006-01-20,65.467735 +2006-01-23,65.702629 +2006-01-24,66.555000 +2006-01-25,66.420746 +2006-01-26,66.541534 +2006-01-27,67.112007 +2006-01-30,66.185844 +2006-01-31,66.695892 +2007-01-03,89.319084 +2007-01-04,89.229248 +2007-01-05,88.123550 +2007-01-08,87.418663 +2007-01-09,88.766205 +2007-01-10,90.424774 +2007-01-11,90.853233 +2007-01-12,91.896706 +2007-01-16,94.218658 +2007-01-17,94.094299 +2007-01-18,94.191040 +2007-01-19,94.999565 +2007-01-22,94.142647 +2007-01-23,95.586960 +2007-01-24,95.987770 +2007-01-25,97.577171 +2007-01-26,98.109291 +2007-01-29,98.130051 +2007-01-30,99.000778 +2007-01-31,99.747139 +2008-01-02,68.393883 +2008-01-03,65.674133 +2008-01-04,62.633121 +2008-01-07,63.875221 +2008-01-08,62.518898 +2008-01-09,63.996563 +2008-01-10,65.202965 +2008-01-11,65.024513 +2008-01-14,65.017380 +2008-01-15,64.167870 +2008-01-16,64.910286 +2008-01-17,65.517059 +2008-01-18,64.481987 +2008-01-22,65.831161 +2008-01-23,70.071426 +2008-01-24,69.257629 +2008-01-25,70.207054 +2008-01-28,73.140945 +2008-01-29,72.505661 +2008-01-30,72.527084 +2008-01-31,73.961906 +2009-01-02,55.791481 +2009-01-05,55.672417 +2009-01-06,56.758770 +2009-01-07,55.620338 +2009-01-08,53.990780 +2009-01-09,50.828411 +2009-01-12,46.959175 +2009-01-13,48.878914 +2009-01-14,47.680946 +2009-01-15,50.560555 +2009-01-16,52.949062 +2009-01-20,48.901245 +2009-01-21,52.041279 +2009-01-22,48.737549 +2009-01-23,49.853668 +2009-01-26,49.563477 +2009-01-27,50.709366 +2009-01-28,53.492237 +2009-01-29,51.193024 +2009-01-30,49.146793 +2010-01-04,65.182053 +2010-01-05,65.576508 +2010-01-06,66.034096 +2010-01-07,66.720451 +2010-01-08,66.034096 +2010-01-11,66.081436 +2010-01-12,65.205704 +2010-01-13,66.499565 +2010-01-14,66.949265 +2010-01-15,66.499565 +2010-01-19,67.406853 +2010-01-20,67.604080 +2010-01-21,65.844742 +2010-01-22,63.809284 +2010-01-25,64.258987 +2010-01-26,63.903973 +2010-01-27,64.692902 +2010-01-28,64.235306 +2010-01-29,62.870461 +2011-01-03,96.229515 +2011-01-04,94.677551 +2011-01-05,95.334465 +2011-01-06,94.735039 +2011-01-07,93.330894 +2011-01-10,93.084549 +2011-01-11,92.953171 +2011-01-12,93.486900 +2011-01-13,92.986015 +2011-01-14,93.273384 +2011-01-18,94.193069 +2011-01-19,92.238770 +2011-01-20,90.957787 +2011-01-21,91.212357 +2011-01-24,93.084549 +2011-01-25,94.808929 +2011-01-26,94.833580 +2011-01-27,95.638290 +2011-01-28,94.152016 +2011-01-31,95.252357 +2012-01-03,118.989212 +2012-01-04,117.030258 +2012-01-05,119.209724 +2012-01-06,118.709373 +2012-01-09,118.276901 +2012-01-10,118.683922 +2012-01-11,117.556038 +2012-01-12,116.131294 +2012-01-13,119.684631 +2012-01-17,119.989922 +2012-01-18,119.438683 +2012-01-19,117.861305 +2012-01-20,117.115074 +2012-01-23,118.785713 +2012-01-24,120.286728 +2012-01-25,122.288139 +2012-01-26,123.475395 +2012-01-27,122.339005 +2012-01-30,121.753860 +2012-01-31,122.118500 +2013-01-02,129.493103 +2013-01-03,129.938599 +2013-01-04,130.078339 +2013-01-07,130.296707 +2013-01-08,130.742203 +2013-01-09,131.231354 +2013-01-10,132.122299 +2013-01-11,131.991272 +2013-01-14,132.637680 +2013-01-15,133.764435 +2013-01-16,133.484924 +2013-01-17,133.345154 +2013-01-18,133.467484 +2013-01-22,134.358337 +2013-01-23,134.882492 +2013-01-24,134.891266 +2013-01-25,134.751511 +2013-01-28,134.978577 +2013-01-29,135.432770 +2013-01-30,133.991501 +2013-01-31,134.323456 +2014-01-02,131.991638 +2014-01-03,133.696793 +2014-01-06,134.400497 +2014-01-07,135.591400 +2014-01-08,134.707275 +2014-01-09,134.824509 +2014-01-10,136.286102 +2014-01-13,136.565765 +2014-01-14,137.657440 +2014-01-15,137.964157 +2014-01-16,138.712982 +2014-01-17,138.225815 +2014-01-21,139.344528 +2014-01-22,139.976089 +2014-01-23,139.515945 +2014-01-24,137.657440 +2014-01-27,136.665039 +2014-01-28,138.144608 +2014-01-29,137.982239 +2014-01-30,141.076767 +2014-01-31,142.881149 +2015-01-02,195.116989 +2015-01-05,195.896149 +2015-01-06,198.715973 +2015-01-07,201.712097 +2015-01-08,203.010727 +2015-01-09,204.643265 +2015-01-12,205.960403 +2015-01-13,206.331467 +2015-01-14,209.114197 +2015-01-15,210.811691 +2015-01-16,211.646515 +2015-01-20,209.735657 +2015-01-21,209.475937 +2015-01-22,212.249451 +2015-01-23,211.358932 +2015-01-26,213.445999 +2015-01-27,212.685394 +2015-01-28,210.848770 +2015-01-29,212.898712 +2015-01-30,209.680023 +2016-01-04,225.817123 +2016-01-05,228.405258 +2016-01-06,226.511719 +2016-01-07,224.275604 +2016-01-08,222.344025 +2016-01-11,224.266129 +2016-01-12,223.400223 +2016-01-13,222.448700 +2016-01-14,219.641693 +2016-01-15,218.994629 +2016-01-19,221.068970 +2016-01-20,213.599457 +2016-01-21,210.288162 +2016-01-22,213.951538 +2016-01-25,212.295853 +2016-01-26,215.350281 +2016-01-27,209.755280 +2016-01-28,200.563492 +2016-01-29,202.780563 +2017-01-03,224.426727 +2017-01-04,226.169266 +2017-01-05,227.862854 +2017-01-06,228.822266 +2017-01-09,225.875565 +2017-01-10,225.258865 +2017-01-11,222.096786 +2017-01-12,223.623978 +2017-01-13,223.203018 +2017-01-17,224.749786 +2017-01-18,223.105118 +2017-01-19,221.901001 +2017-01-20,223.731644 +2017-01-23,226.247574 +2017-01-24,221.940170 +2017-01-25,221.098282 +2017-01-26,220.638153 +2017-01-27,220.667526 +2017-01-30,218.543182 +2017-01-31,219.580872 diff -r c08ba57a7f53 -r 53c769a78a1e testing/ESS.csv --- a/testing/ESS.csv Wed Nov 08 22:36:42 2017 +0000 +++ b/testing/ESS.csv Thu Nov 09 16:04:31 2017 +0000 @@ -1,469 +1,262 @@ Date,Adj Close -1995-01-03,5.852035 -1995-01-04,5.943475 -1995-01-05,5.989194 -1995-01-06,6.080631 -1995-01-09,6.034914 -1995-01-10,6.034914 -1995-01-11,5.989194 -1995-01-12,5.989194 -1995-01-13,6.034914 -1995-01-16,5.989194 -1995-01-17,6.034914 -1995-01-18,6.034914 -1995-01-19,5.897754 -1995-01-20,5.943475 -1995-01-23,5.852035 -1995-01-24,5.897754 -1995-01-25,5.989194 -1995-01-26,5.943475 -1995-01-27,6.034914 -1995-01-30,6.080631 -1995-01-31,6.034914 -1996-01-02,7.270742 -1996-01-03,7.414245 -1996-01-04,7.366413 -1996-01-05,7.318579 -1996-01-08,7.318579 -1996-01-09,7.222910 -1996-01-10,7.175077 -1996-01-11,7.222910 -1996-01-12,7.318579 -1996-01-15,7.318579 -1996-01-16,7.318579 -1996-01-17,7.270742 -1996-01-18,7.509913 -1996-01-19,7.557751 -1996-01-22,7.462082 -1996-01-23,7.414245 -1996-01-24,7.509913 -1996-01-25,7.462082 -1996-01-26,7.557751 -1996-01-29,7.509913 -1996-01-30,7.605583 -1996-01-31,7.653416 -1997-01-02,11.881297 -1997-01-03,11.984172 -1997-01-06,11.881297 -1997-01-07,11.932732 -1997-01-08,11.829863 -1997-01-09,11.778431 -1997-01-10,11.829863 -1997-01-13,11.829863 -1997-01-14,11.984172 -1997-01-15,11.984172 -1997-01-16,12.138470 -1997-01-17,12.035602 -1997-01-20,11.881297 -1997-01-21,11.932732 -1997-01-22,11.984172 -1997-01-23,11.726995 -1997-01-24,12.035602 -1997-01-27,11.778431 -1997-01-28,11.829863 -1997-01-29,11.778431 -1997-01-30,11.829863 -1997-01-31,12.035602 -1998-01-02,14.938869 -1998-01-05,14.938869 -1998-01-06,14.993190 -1998-01-07,15.183331 -1998-01-08,15.156165 -1998-01-09,15.020358 -1998-01-12,14.884543 -1998-01-13,14.911707 -1998-01-14,15.020358 -1998-01-15,15.047518 -1998-01-16,15.101836 -1998-01-20,15.047518 -1998-01-21,14.966024 -1998-01-22,14.993190 -1998-01-23,15.101836 -1998-01-26,15.101836 -1998-01-27,15.074673 -1998-01-28,15.020358 -1998-01-29,14.993190 -1998-01-30,14.966024 -1999-01-04,14.025302 -1999-01-05,13.996386 -1999-01-06,13.996386 -1999-01-07,13.822870 -1999-01-08,13.533695 -1999-01-11,13.591533 -1999-01-12,13.678288 -1999-01-13,13.678288 -1999-01-14,13.591533 -1999-01-15,13.620451 -1999-01-19,13.504783 -1999-01-20,13.446944 -1999-01-21,13.389109 -1999-01-22,13.273438 -1999-01-25,13.389109 -1999-01-26,13.360189 -1999-01-27,13.475864 -1999-01-28,13.533695 -1999-01-29,13.244512 -2000-01-03,16.493027 -2000-01-04,16.307369 -2000-01-05,16.245474 -2000-01-06,16.400206 -2000-01-07,16.957186 -2000-01-10,16.864355 -2000-01-11,16.678696 -2000-01-12,16.647747 -2000-01-13,16.833414 -2000-01-14,16.771526 -2000-01-18,16.709637 -2000-01-19,16.895294 -2000-01-20,16.988136 -2000-01-21,16.864355 -2000-01-24,16.833414 -2000-01-25,16.926237 -2000-01-26,16.895294 -2000-01-27,17.019073 -2000-01-28,16.802471 -2000-01-31,16.833414 -2001-01-02,28.318230 -2001-01-03,29.165493 -2001-01-04,28.709263 -2001-01-05,27.014725 -2001-01-08,27.145082 -2001-01-09,27.112501 -2001-01-10,27.373198 -2001-01-11,27.112501 -2001-01-12,27.210264 -2001-01-16,27.112501 -2001-01-17,26.949572 -2001-01-18,26.949572 -2001-01-19,26.786631 -2001-01-22,26.558525 -2001-01-23,26.949572 -2001-01-24,26.688868 -2001-01-25,26.819216 -2001-01-26,26.460754 -2001-01-29,26.747513 -2001-01-30,26.898727 -2001-01-31,26.982149 -2002-01-02,27.218304 -2002-01-03,27.439131 -2002-01-04,27.312141 -2002-01-07,27.135471 -2002-01-08,27.218304 -2002-01-09,27.234854 -2002-01-10,27.279013 -2002-01-11,27.135471 -2002-01-14,27.328707 -2002-01-15,27.014013 -2002-01-16,26.721403 -2002-01-17,26.566826 -2002-01-18,26.119616 -2002-01-22,26.141701 -2002-01-23,26.196905 -2002-01-24,26.252123 -2002-01-25,25.920862 -2002-01-28,25.755232 -2002-01-29,25.639292 -2002-01-30,25.633776 -2002-01-31,25.584084 -2003-01-02,30.091045 -2003-01-03,30.173044 -2003-01-06,30.307737 -2003-01-07,30.102762 -2003-01-08,29.880205 -2003-01-09,29.938761 -2003-01-10,29.681084 -2003-01-13,29.874348 -2003-01-14,29.985628 -2003-01-15,30.038322 -2003-01-16,29.874348 -2003-01-17,29.856792 -2003-01-21,29.036856 -2003-01-22,29.165697 -2003-01-23,29.083719 -2003-01-24,29.025146 -2003-01-27,28.990002 -2003-01-28,29.107136 -2003-01-29,29.212549 -2003-01-30,29.077856 -2003-01-31,29.563951 -2004-01-02,39.592564 -2004-01-05,39.104923 -2004-01-06,38.882706 -2004-01-07,38.753071 -2004-01-08,38.722202 -2004-01-09,38.629608 -2004-01-12,38.271587 -2004-01-13,38.493813 -2004-01-14,38.827148 -2004-01-15,38.611103 -2004-01-16,38.209869 -2004-01-20,37.438255 -2004-01-21,37.814793 -2004-01-22,37.938263 -2004-01-23,38.006157 -2004-01-26,38.839493 -2004-01-27,38.629608 -2004-01-28,38.765408 -2004-01-29,38.407402 -2004-01-30,38.364185 -2005-01-03,53.413624 -2005-01-04,52.284302 -2005-01-05,50.393494 -2005-01-06,50.141819 -2005-01-07,49.812710 -2005-01-10,48.915714 -2005-01-11,48.102596 -2005-01-12,47.483082 -2005-01-13,47.354015 -2005-01-14,48.676941 -2005-01-18,49.231918 -2005-01-19,49.277077 -2005-01-20,49.186745 -2005-01-21,49.051220 -2005-01-24,48.528507 -2005-01-25,47.108795 -2005-01-26,47.618591 -2005-01-27,46.786129 -2005-01-28,46.469910 -2005-01-31,46.431206 -2006-01-03,63.367146 -2006-01-04,63.857059 -2006-01-05,64.427521 -2006-01-06,64.427521 -2006-01-09,64.689247 -2006-01-10,65.299995 -2006-01-11,65.628830 -2006-01-12,65.736191 -2006-01-13,65.098648 -2006-01-17,65.299995 -2006-01-18,64.628845 -2006-01-19,66.004677 -2006-01-20,65.467735 -2006-01-23,65.702629 -2006-01-24,66.555000 -2006-01-25,66.420746 -2006-01-26,66.541534 -2006-01-27,67.112007 -2006-01-30,66.185844 -2006-01-31,66.695892 -2007-01-03,89.319084 -2007-01-04,89.229248 -2007-01-05,88.123550 -2007-01-08,87.418663 -2007-01-09,88.766205 -2007-01-10,90.424774 -2007-01-11,90.853233 -2007-01-12,91.896706 -2007-01-16,94.218658 -2007-01-17,94.094299 -2007-01-18,94.191040 -2007-01-19,94.999565 -2007-01-22,94.142647 -2007-01-23,95.586960 -2007-01-24,95.987770 -2007-01-25,97.577171 -2007-01-26,98.109291 -2007-01-29,98.130051 -2007-01-30,99.000778 -2007-01-31,99.747139 -2008-01-02,68.393883 -2008-01-03,65.674133 -2008-01-04,62.633121 -2008-01-07,63.875221 -2008-01-08,62.518898 -2008-01-09,63.996563 -2008-01-10,65.202965 -2008-01-11,65.024513 -2008-01-14,65.017380 -2008-01-15,64.167870 -2008-01-16,64.910286 -2008-01-17,65.517059 -2008-01-18,64.481987 -2008-01-22,65.831161 -2008-01-23,70.071426 -2008-01-24,69.257629 -2008-01-25,70.207054 -2008-01-28,73.140945 -2008-01-29,72.505661 -2008-01-30,72.527084 -2008-01-31,73.961906 -2009-01-02,55.791481 -2009-01-05,55.672417 -2009-01-06,56.758770 -2009-01-07,55.620338 -2009-01-08,53.990780 -2009-01-09,50.828411 -2009-01-12,46.959175 -2009-01-13,48.878914 -2009-01-14,47.680946 -2009-01-15,50.560555 -2009-01-16,52.949062 -2009-01-20,48.901245 -2009-01-21,52.041279 -2009-01-22,48.737549 -2009-01-23,49.853668 -2009-01-26,49.563477 -2009-01-27,50.709366 -2009-01-28,53.492237 -2009-01-29,51.193024 -2009-01-30,49.146793 -2010-01-04,65.182053 -2010-01-05,65.576508 -2010-01-06,66.034096 -2010-01-07,66.720451 -2010-01-08,66.034096 -2010-01-11,66.081436 -2010-01-12,65.205704 -2010-01-13,66.499565 -2010-01-14,66.949265 -2010-01-15,66.499565 -2010-01-19,67.406853 -2010-01-20,67.604080 -2010-01-21,65.844742 -2010-01-22,63.809284 -2010-01-25,64.258987 -2010-01-26,63.903973 -2010-01-27,64.692902 -2010-01-28,64.235306 -2010-01-29,62.870461 -2011-01-03,96.229515 -2011-01-04,94.677551 -2011-01-05,95.334465 -2011-01-06,94.735039 -2011-01-07,93.330894 -2011-01-10,93.084549 -2011-01-11,92.953171 -2011-01-12,93.486900 -2011-01-13,92.986015 -2011-01-14,93.273384 -2011-01-18,94.193069 -2011-01-19,92.238770 -2011-01-20,90.957787 -2011-01-21,91.212357 -2011-01-24,93.084549 -2011-01-25,94.808929 -2011-01-26,94.833580 -2011-01-27,95.638290 -2011-01-28,94.152016 -2011-01-31,95.252357 -2012-01-03,118.989212 -2012-01-04,117.030258 -2012-01-05,119.209724 -2012-01-06,118.709373 -2012-01-09,118.276901 -2012-01-10,118.683922 -2012-01-11,117.556038 -2012-01-12,116.131294 -2012-01-13,119.684631 -2012-01-17,119.989922 -2012-01-18,119.438683 -2012-01-19,117.861305 -2012-01-20,117.115074 -2012-01-23,118.785713 -2012-01-24,120.286728 -2012-01-25,122.288139 -2012-01-26,123.475395 -2012-01-27,122.339005 -2012-01-30,121.753860 -2012-01-31,122.118500 -2013-01-02,129.493103 -2013-01-03,129.938599 -2013-01-04,130.078339 -2013-01-07,130.296707 -2013-01-08,130.742203 -2013-01-09,131.231354 -2013-01-10,132.122299 -2013-01-11,131.991272 -2013-01-14,132.637680 -2013-01-15,133.764435 -2013-01-16,133.484924 -2013-01-17,133.345154 -2013-01-18,133.467484 -2013-01-22,134.358337 -2013-01-23,134.882492 -2013-01-24,134.891266 -2013-01-25,134.751511 -2013-01-28,134.978577 -2013-01-29,135.432770 -2013-01-30,133.991501 -2013-01-31,134.323456 -2014-01-02,131.991638 -2014-01-03,133.696793 -2014-01-06,134.400497 -2014-01-07,135.591400 -2014-01-08,134.707275 -2014-01-09,134.824509 -2014-01-10,136.286102 -2014-01-13,136.565765 -2014-01-14,137.657440 -2014-01-15,137.964157 -2014-01-16,138.712982 -2014-01-17,138.225815 -2014-01-21,139.344528 -2014-01-22,139.976089 -2014-01-23,139.515945 -2014-01-24,137.657440 -2014-01-27,136.665039 -2014-01-28,138.144608 -2014-01-29,137.982239 -2014-01-30,141.076767 -2014-01-31,142.881149 -2015-01-02,195.116989 -2015-01-05,195.896149 -2015-01-06,198.715973 -2015-01-07,201.712097 -2015-01-08,203.010727 -2015-01-09,204.643265 -2015-01-12,205.960403 -2015-01-13,206.331467 -2015-01-14,209.114197 -2015-01-15,210.811691 -2015-01-16,211.646515 -2015-01-20,209.735657 -2015-01-21,209.475937 -2015-01-22,212.249451 -2015-01-23,211.358932 -2015-01-26,213.445999 -2015-01-27,212.685394 -2015-01-28,210.848770 -2015-01-29,212.898712 -2015-01-30,209.680023 -2016-01-04,225.817123 -2016-01-05,228.405258 -2016-01-06,226.511719 -2016-01-07,224.275604 -2016-01-08,222.344025 -2016-01-11,224.266129 -2016-01-12,223.400223 -2016-01-13,222.448700 -2016-01-14,219.641693 -2016-01-15,218.994629 -2016-01-19,221.068970 -2016-01-20,213.599457 -2016-01-21,210.288162 -2016-01-22,213.951538 -2016-01-25,212.295853 -2016-01-26,215.350281 -2016-01-27,209.755280 -2016-01-28,200.563492 -2016-01-29,202.780563 -2017-01-03,224.426727 -2017-01-04,226.169266 -2017-01-05,227.862854 -2017-01-06,228.822266 -2017-01-09,225.875565 -2017-01-10,225.258865 -2017-01-11,222.096786 -2017-01-12,223.623978 -2017-01-13,223.203018 -2017-01-17,224.749786 -2017-01-18,223.105118 -2017-01-19,221.901001 -2017-01-20,223.731644 -2017-01-23,226.247574 -2017-01-24,221.940170 -2017-01-25,221.098282 -2017-01-26,220.638153 -2017-01-27,220.667526 -2017-01-30,218.543182 -2017-01-31,219.580872 +2005-01-03,7.622935 +2005-01-04,7.697504 +2005-01-05,7.456596 +2005-01-06,7.714709 +2005-01-07,7.892520 +2005-01-10,7.691771 +2005-01-11,7.720445 +2005-01-12,7.743391 +2005-01-13,7.485275 +2005-01-14,7.949881 +2005-01-18,7.599995 +2005-01-19,7.628671 +2005-01-20,7.542635 +2005-01-21,7.559841 +2005-01-24,7.588521 +2005-01-25,7.519694 +2005-01-26,7.427920 +2005-01-27,7.456596 +2005-01-28,7.422180 +2005-01-31,7.439390 +2006-01-03,9.320418 +2006-01-04,9.369244 +2006-01-05,9.271587 +2006-01-06,9.332625 +2006-01-09,9.302104 +2006-01-10,9.357038 +2006-01-11,9.399763 +2006-01-12,9.338728 +2006-01-13,9.161719 +2006-01-17,9.082371 +2006-01-18,9.070164 +2006-01-19,9.161719 +2006-01-20,9.033543 +2006-01-23,9.149513 +2006-01-24,9.143406 +2006-01-25,9.137306 +2006-01-26,9.399763 +2006-01-27,9.527944 +2006-01-30,9.430282 +2006-01-31,9.369244 +2007-01-03,11.952834 +2007-01-04,12.088296 +2007-01-05,11.746417 +2007-01-08,11.630307 +2007-01-09,11.739969 +2007-01-10,11.843178 +2007-01-11,11.914134 +2007-01-12,12.088296 +2007-01-16,12.062494 +2007-01-17,12.101198 +2007-01-18,11.959286 +2007-01-19,12.101198 +2007-01-22,12.197953 +2007-01-23,12.094746 +2007-01-24,12.126997 +2007-01-25,12.165706 +2007-01-26,12.210854 +2007-01-29,12.365672 +2007-01-30,12.539835 +2007-01-31,12.733351 +2008-01-02,9.537648 +2008-01-03,9.243658 +2008-01-04,9.093243 +2008-01-07,9.031712 +2008-01-08,8.744556 +2008-01-09,8.860785 +2008-01-10,8.949666 +2008-01-11,9.004362 +2008-01-14,9.127430 +2008-01-15,8.853946 +2008-01-16,9.161613 +2008-01-17,9.202636 +2008-01-18,9.059056 +2008-01-22,9.147938 +2008-01-23,9.763272 +2008-01-24,9.647043 +2008-01-25,9.811131 +2008-01-28,10.351255 +2008-01-29,10.221351 +2008-01-30,10.050426 +2008-01-31,10.351255 +2009-01-02,7.482453 +2009-01-05,7.158411 +2009-01-06,7.651838 +2009-01-07,7.408808 +2009-01-08,7.268881 +2009-01-09,6.959564 +2009-01-12,6.576607 +2009-01-13,6.745991 +2009-01-14,6.385127 +2009-01-15,6.569242 +2009-01-16,6.944834 +2009-01-20,6.105271 +2009-01-21,6.164188 +2009-01-22,6.223104 +2009-01-23,6.289386 +2009-01-26,6.304115 +2009-01-27,6.473499 +2009-01-28,6.804909 +2009-01-29,6.259927 +2009-01-30,5.972707 +2010-01-04,9.272974 +2010-01-05,9.210585 +2010-01-06,9.241781 +2010-01-07,9.171589 +2010-01-08,8.968815 +2010-01-11,9.039010 +2010-01-12,8.719246 +2010-01-13,8.875228 +2010-01-14,8.844033 +2010-01-15,8.883027 +2010-01-19,9.140393 +2010-01-20,9.163789 +2010-01-21,9.015610 +2010-01-22,8.953218 +2010-01-25,8.984412 +2010-01-26,8.851831 +2010-01-27,8.890829 +2010-01-28,8.812834 +2010-01-29,8.851831 +2011-01-03,14.334681 +2011-01-04,14.182441 +2011-01-05,14.222502 +2011-01-06,14.022191 +2011-01-07,14.158403 +2011-01-10,14.318655 +2011-01-11,14.318655 +2011-01-12,14.438849 +2011-01-13,14.470896 +2011-01-14,14.695253 +2011-01-18,14.599099 +2011-01-19,14.599099 +2011-01-20,14.791399 +2011-01-21,15.047809 +2011-01-24,15.087873 +2011-01-25,15.224088 +2011-01-26,15.368320 +2011-01-27,15.552608 +2011-01-28,15.240113 +2011-01-31,15.408378 +2012-01-03,20.078302 +2012-01-04,19.749151 +2012-01-05,20.070074 +2012-01-06,20.078302 +2012-01-09,19.987789 +2012-01-10,20.316942 +2012-01-11,20.168818 +2012-01-12,20.160591 +2012-01-13,20.168818 +2012-01-17,20.284025 +2012-01-18,20.358082 +2012-01-19,20.522657 +2012-01-20,20.950562 +2012-01-23,20.901186 +2012-01-24,20.901186 +2012-01-25,21.106903 +2012-01-26,21.230341 +2012-01-27,21.287939 +2012-01-30,21.164505 +2012-01-31,21.658239 +2013-01-02,31.170124 +2013-01-03,31.423889 +2013-01-04,31.576143 +2013-01-07,31.635351 +2013-01-08,31.423889 +2013-01-09,31.982153 +2013-01-10,31.973690 +2013-01-11,31.838360 +2013-01-14,31.838360 +2013-01-15,31.897566 +2013-01-16,32.075184 +2013-01-17,32.286652 +2013-01-18,32.591175 +2013-01-22,32.633472 +2013-01-23,32.489674 +2013-01-24,32.946445 +2013-01-25,33.259407 +2013-01-28,33.149445 +2013-01-29,33.538551 +2013-01-30,33.496254 +2013-01-31,33.699257 +2014-01-02,36.595928 +2014-01-03,36.858643 +2014-01-06,37.016273 +2014-01-07,36.902431 +2014-01-08,36.753551 +2014-01-09,37.208927 +2014-01-10,38.154690 +2014-01-13,37.918247 +2014-01-14,38.504978 +2014-01-15,39.100464 +2014-01-16,38.864025 +2014-01-17,38.513729 +2014-01-21,38.636322 +2014-01-22,38.452431 +2014-01-23,38.557518 +2014-01-24,38.180969 +2014-01-27,38.224751 +2014-01-28,39.100464 +2014-01-29,39.091702 +2014-01-30,39.713459 +2014-01-31,39.984928 +2015-01-02,53.389149 +2015-01-05,54.566715 +2015-01-06,55.753349 +2015-01-07,56.559528 +2015-01-08,57.411003 +2015-01-09,57.193604 +2015-01-12,58.008846 +2015-01-13,58.072243 +2015-01-14,58.679146 +2015-01-15,59.258873 +2015-01-16,60.418335 +2015-01-20,60.037876 +2015-01-21,59.911064 +2015-01-22,60.644783 +2015-01-23,60.237164 +2015-01-26,60.445511 +2015-01-27,60.563259 +2015-01-28,60.898407 +2015-01-29,61.043350 +2015-01-30,59.784248 +2016-01-04,82.093315 +2016-01-05,84.505066 +2016-01-06,85.206161 +2016-01-07,84.299423 +2016-01-08,84.047020 +2016-01-11,84.888336 +2016-01-12,84.607895 +2016-01-13,83.710503 +2016-01-14,81.532433 +2016-01-15,80.420021 +2016-01-19,82.728958 +2016-01-20,79.316986 +2016-01-21,79.195450 +2016-01-22,81.653961 +2016-01-25,81.887657 +2016-01-26,84.561165 +2016-01-27,82.953300 +2016-01-28,83.514191 +2016-01-29,84.776161 +2017-01-03,74.699989 +2017-01-04,75.097473 +2017-01-05,76.076683 +2017-01-06,76.784409 +2017-01-09,75.873077 +2017-01-10,74.292793 +2017-01-11,72.373184 +2017-01-12,71.558800 +2017-01-13,70.434181 +2017-01-17,70.812286 +2017-01-18,70.938316 +2017-01-19,70.870453 +2017-01-20,71.180695 +2017-01-23,72.712502 +2017-01-24,72.848244 +2017-01-25,71.520027 +2017-01-26,71.723618 +2017-01-27,70.967400 +2017-01-30,70.094864 +2017-01-31,69.852478 diff -r c08ba57a7f53 -r 53c769a78a1e testing/drumb_test3.scala --- a/testing/drumb_test3.scala Wed Nov 08 22:36:42 2017 +0000 +++ b/testing/drumb_test3.scala Thu Nov 09 16:04:31 2017 +0000 @@ -1,32 +1,3 @@ -//println("starting test now") - -/* -import scala.concurrent._ -import scala.concurrent.duration._ -import ExecutionContext.Implicits.global -import scala.language.postfixOps - -val test_data = 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 test_deltas = List(List(Some(0.07596697626574789), None), - List(Some(-0.152620823795232), None), - List(Some(0.20126676681483952), Some(0.9277165354330709)), - List(Some(0.09141762603007778), Some(2.119679764725104))) - -lazy val f = Future { - assert((yearly_yield(test_deltas, 100, 0) - 107).abs <= 2) - assert((yearly_yield(test_deltas, 100, 1) - 85).abs <= 2) - assert((yearly_yield(test_deltas, 100, 2) - 156).abs <= 2) - assert((yearly_yield(test_deltas, 100, 3) - 210).abs <= 2) - assert((investment(List("IBM", "BIDU"), 2004 to 2008, 100) - 298).abs <= 10) -} - - -Await.result(f, 180 second) - -*/ val urban_prices = List(List(Some(311.349976), Some(27.505054)), List(Some(300.222351), Some(42.357094)), @@ -36,10 +7,10 @@ assert(CW6c.yearly_yield(CW6c.get_deltas(urban_prices), 100, 0) == 125) -val blchip_portfolio = List("GOOG", "AAPL", "MSFT", "IBM", "FB", "AMZN", "BIDU") -val rstate_portfolio = List("PLD", "PSA", "AMT", "AIV", "AVB", "BXP", "CCI", - "DLR", "EQIX", "EQR", "ESS", "EXR", "FRT", "GGP", "HCP") +val urban_blchip_portfolio = List("GOOG", "AAPL", "MSFT", "IBM", "FB", "AMZN", "BIDU") +val urban_rstate_portfolio = List("PLD", "PSA", "AMT", "AIV", "AVB", "BXP", "CCI", + "DLR", "EQIX", "EQR", "ESS", "EXR", "FRT", "GGP", "HCP") -assert(CW6c.investment(rstate_portfolio, 1978 to 2017, 100) == 30839) -assert(CW6c.investment(blchip_portfolio, 1978 to 2017, 100) == 349597) +assert(CW6c.investment(urban_rstate_portfolio, 1978 to 2017, 100) == 30839) +assert(CW6c.investment(urban_blchip_portfolio, 1978 to 2017, 100) == 349597)