Binary file cws/cw01.pdf has changed
--- a/cws/cw01.tex Wed Nov 08 16:08:16 2017 +0000
+++ b/cws/cw01.tex Wed Nov 08 20:27:56 2017 +0000
@@ -238,7 +238,8 @@
useful \texttt{Map} functions: \texttt{.toMap} converts a list of
pairs into a \texttt{Map}, \texttt{.isDefinedAt(k)} tests whether the
map is defined at that key, that is would produce a result when
-called with this key.
+called with this key; useful data functions: \texttt{Source.fromURL},
+\texttt{Source.fromFile} for obtaining a webpage and reading a file.
\newpage
@@ -274,44 +275,46 @@
\noindent
Until Yahoo was bought by Altaba this summer, historical stock market
-data was available online for free, but nowadays this kind of data is
-difficult to obtain unless you are prepared to pay extortionate prices
-or be severely rate-limited. Therefore this coursework comes with a
-number of files containing CSV-lists about stock prices of
-various companies. Use these files for the following tasks.\bigskip
+data for such back-of-the-envelope calculations was available online
+for free, but nowadays this kind of data is difficult to obtain, unless
+you are prepared to pay extortionate prices or be severely
+rate-limited. Therefore this coursework comes with a number of files
+containing CSV-lists about historical stock prices for companies of
+our portfolio. Use these files for the following tasks.\bigskip
\noindent
\textbf{Tasks (file drumb.scala):}
\begin{itemize}
\item[(1.a)] Write a function \texttt{get\_january\_data} that takes a
- stock symbol and a year as argument. The function reads the
+ stock symbol and a year as arguments. The function reads the
corresponding CSV-file and returns the list of strings that start
with the given year (each line in the CSV-list is of the form
- \texttt{year-01-someday,someprice}.
+ \texttt{year-01-someday,someprice}).
\item[(1.b)] Write a function \texttt{get\_first\_price} that takes
- again stock symbol and a year as arguments. It should return the
- first January price for the stock symbol in the year. For this it
- obtains the list of strings generated by
+ again a stock symbol and a year as arguments. It should return the
+ first January price for the stock symbol in given the year. For this
+ it uses the list of strings generated by
\texttt{get\_january\_data}. A problem is that normally a stock
exchange is not open on 1st of January, but depending on the day of
the week on a later day (maybe 3rd or 4th). The easiest way to solve
this problem is to obtain the whole January data for a stock symbol
- and then select the earliest entry in this list. This entry should
- be converted into a double. Such a price might not exist, if the
- company does not exist in the given year. For example, if you query
- for Google in January of 1980, then clearly Google did not exists
- yet. Therefore you are asked to return a trade price as
- \texttt{Option[Double]}.
+ and then select the earliest, or first, entry in this list. The
+ stock price of this entry should be converted into a double. Such a
+ price might not exist, in case the company does not exist in the given
+ year. For example, if you query for Google in January of 1980, then
+ clearly Google did not exists yet. Therefore you are asked to
+ return a trade price as \texttt{Option[Double]}\ldots\texttt{None}
+ will be the value for when no price exists.
\item[(1.c)] Write a function \texttt{get\_prices} that takes a
portfolio (a list of stock symbols), a years range and gets all the
- first trading prices for each year. You should organise this as a
- list of lists of \texttt{Option[Double]}'s. The inner lists are for
- all stock symbols from the portfolio and the outer list for the
- years. For example for Google and Apple in years 2010 (first line),
- 2011 (second line) and 2012 (third line) you obtain:
+ first trading prices for each year in the range. You should organise
+ this as a list of lists of \texttt{Option[Double]}'s. The inner
+ lists are for all stock symbols from the portfolio and the outer
+ list for the years. For example for Google and Apple in years 2010
+ (first line), 2011 (second line) and 2012 (third line) you obtain:
\begin{verbatim}
List(List(Some(311.349976), Some(27.505054)),
@@ -340,7 +343,8 @@
\end{verbatim}
That means Google did a bit badly in 2010, while Apple did very well.
- Both did OK in 2011.\hfill\mbox{[1 Mark]}
+ Both did OK in 2011.\\
+ \mbox{}\hfill\mbox{[1 Mark]}
\item[(3.a)] Write a function that calculates the ``yield'', or
balance, for one year for our portfolio. This function takes the
@@ -349,7 +353,7 @@
unchanged. Otherwise we invest in each existing company an equal
amount of our balance. Using the change factors computed under Task
2, calculate the new balance. Say we had \$100 in 2010, we would have
- received in our running example
+ received in our running example involving Google and Apple:
\begin{verbatim}
$50 * -0.03573992567129673 + $50 * 0.5399749442411563
@@ -361,7 +365,8 @@
\item[(3.b)] Write a function that calculates the overall balance
for a range of years where each year the yearly profit is compounded to
- the new balances and then re-invested into our portfolio.\mbox{}\hfill\mbox{[1 Mark]}
+ the new balances and then re-invested into our portfolio.\\
+ \mbox{}\hfill\mbox{[1 Mark]}
\end{itemize}\medskip
\noindent
@@ -370,10 +375,22 @@
Facebook, Amazon and Baidu; and another for listed real-estate
companies, whose names I have never heard of. Following the dumb
investment strategy from 1978 until 2017 would have turned a starting
-balance of \$100 into roughly \$30,895 for real estate and a whopping
-\$188,172 for blue chips. Note when comparing these results with your
-own results: there might be some small rounding errors, which when
-compounded, lead to moderately different values.\medskip
+balance of \$100 into roughly \$30,839 for real estate and a whopping
+\$349,597 for blue chips. Note when comparing these results with your
+own calculations: there might be some small rounding errors, which
+when compounded, lead to moderately different values.\bigskip
+
+\noindent
+\textbf{Hints:} useful string functions: \texttt{startsWith(...)} for
+testing a string having a given prefix, \texttt{\_ + \_} for
+concatenating twop strings; useful option functions: \texttt{.flatten}
+flattens a list of options such that it filters way all
+\texttt{None}'s, \texttt{Try(...) getOrElse ...} runs some code that
+might raise an exception, if yes, then a default value can be given;
+useful list functions: \texttt{.head} for obtaining the first element
+in a non-empty list, \texttt{.length} for the length of a
+list.\bigskip
+
\noindent
\textbf{Moral:} Reflecting on our assumptions, we are over-estimating
@@ -385,8 +402,7 @@
his inheritance, a really dumb investment strategy would have done
equally well, if not much better.\medskip
-\noindent
-\textbf{Hints:}
+
\end{document}
%%% Local Variables:
--- a/templates/alcohol.csv Wed Nov 08 16:08:16 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-country,beer_servings,spirit_servings,wine_servings,total_litres_of_pure_alcohol
-Afghanistan,0,0,0,0.0
-Albania,89,132,54,4.9
-Algeria,25,0,14,0.7
-Andorra,245,138,312,12.4
-Angola,217,57,45,5.9
-Antigua & Barbuda,102,128,45,4.9
-Argentina,193,25,221,8.3
-Armenia,21,179,11,3.8
-Australia,261,72,212,10.4
-Austria,279,75,191,9.7
-Azerbaijan,21,46,5,1.3
-Bahamas,122,176,51,6.3
-Bahrain,42,63,7,2.0
-Bangladesh,0,0,0,0.0
-Barbados,143,173,36,6.3
-Belarus,142,373,42,14.4
-Belgium,295,84,212,10.5
-Belize,263,114,8,6.8
-Benin,34,4,13,1.1
-Bhutan,23,0,0,0.4
-Bolivia,167,41,8,3.8
-Bosnia-Herzegovina,76,173,8,4.6
-Botswana,173,35,35,5.4
-Brazil,245,145,16,7.2
-Brunei,31,2,1,0.6
-Bulgaria,231,252,94,10.3
-Burkina Faso,25,7,7,4.3
-Burundi,88,0,0,6.3
-Cote d'Ivoire,37,1,7,4.0
-Cabo Verde,144,56,16,4.0
-Cambodia,57,65,1,2.2
-Cameroon,147,1,4,5.8
-Canada,240,122,100,8.2
-Central African Republic,17,2,1,1.8
-Chad,15,1,1,0.4
-Chile,130,124,172,7.6
-China,79,192,8,5.0
-Colombia,159,76,3,4.2
-Comoros,1,3,1,0.1
-Congo,76,1,9,1.7
-Cook Islands,0,254,74,5.9
-Costa Rica,149,87,11,4.4
-Croatia,230,87,254,10.2
-Cuba,93,137,5,4.2
-Cyprus,192,154,113,8.2
-Czech Republic,361,170,134,11.8
-North Korea,0,0,0,0.0
-DR Congo,32,3,1,2.3
-Denmark,224,81,278,10.4
-Djibouti,15,44,3,1.1
-Dominica,52,286,26,6.6
-Dominican Republic,193,147,9,6.2
-Ecuador,162,74,3,4.2
-Egypt,6,4,1,0.2
-El Salvador,52,69,2,2.2
-Equatorial Guinea,92,0,233,5.8
-Eritrea,18,0,0,0.5
-Estonia,224,194,59,9.5
-Ethiopia,20,3,0,0.7
-Fiji,77,35,1,2.0
-Finland,263,133,97,10.0
-France,127,151,370,11.8
-Gabon,347,98,59,8.9
-Gambia,8,0,1,2.4
-Georgia,52,100,149,5.4
-Germany,346,117,175,11.3
-Ghana,31,3,10,1.8
-Greece,133,112,218,8.3
-Grenada,199,438,28,11.9
-Guatemala,53,69,2,2.2
-Guinea,9,0,2,0.2
-Guinea-Bissau,28,31,21,2.5
-Guyana,93,302,1,7.1
-Haiti,1,326,1,5.9
-Honduras,69,98,2,3.0
-Hungary,234,215,185,11.3
-Iceland,233,61,78,6.6
-India,9,114,0,2.2
-Indonesia,5,1,0,0.1
-Iran,0,0,0,0.0
-Iraq,9,3,0,0.2
-Ireland,313,118,165,11.4
-Israel,63,69,9,2.5
-Italy,85,42,237,6.5
-Jamaica,82,97,9,3.4
-Japan,77,202,16,7.0
-Jordan,6,21,1,0.5
-Kazakhstan,124,246,12,6.8
-Kenya,58,22,2,1.8
-Kiribati,21,34,1,1.0
-Kuwait,0,0,0,0.0
-Kyrgyzstan,31,97,6,2.4
-Laos,62,0,123,6.2
-Latvia,281,216,62,10.5
-Lebanon,20,55,31,1.9
-Lesotho,82,29,0,2.8
-Liberia,19,152,2,3.1
-Libya,0,0,0,0.0
-Lithuania,343,244,56,12.9
-Luxembourg,236,133,271,11.4
-Madagascar,26,15,4,0.8
-Malawi,8,11,1,1.5
-Malaysia,13,4,0,0.3
-Maldives,0,0,0,0.0
-Mali,5,1,1,0.6
-Malta,149,100,120,6.6
-Marshall Islands,0,0,0,0.0
-Mauritania,0,0,0,0.0
-Mauritius,98,31,18,2.6
-Mexico,238,68,5,5.5
-Micronesia,62,50,18,2.3
-Monaco,0,0,0,0.0
-Mongolia,77,189,8,4.9
-Montenegro,31,114,128,4.9
-Morocco,12,6,10,0.5
-Mozambique,47,18,5,1.3
-Myanmar,5,1,0,0.1
-Namibia,376,3,1,6.8
-Nauru,49,0,8,1.0
-Nepal,5,6,0,0.2
-Netherlands,251,88,190,9.4
-New Zealand,203,79,175,9.3
-Nicaragua,78,118,1,3.5
-Niger,3,2,1,0.1
-Nigeria,42,5,2,9.1
-Niue,188,200,7,7.0
-Norway,169,71,129,6.7
-Oman,22,16,1,0.7
-Pakistan,0,0,0,0.0
-Palau,306,63,23,6.9
-Panama,285,104,18,7.2
-Papua New Guinea,44,39,1,1.5
-Paraguay,213,117,74,7.3
-Peru,163,160,21,6.1
-Philippines,71,186,1,4.6
-Poland,343,215,56,10.9
-Portugal,194,67,339,11.0
-Qatar,1,42,7,0.9
-South Korea,140,16,9,9.8
-Moldova,109,226,18,6.3
-Romania,297,122,167,10.4
-Russian Federation,247,326,73,11.5
-Rwanda,43,2,0,6.8
-St. Kitts & Nevis,194,205,32,7.7
-St. Lucia,171,315,71,10.1
-St. Vincent & the Grenadines,120,221,11,6.3
-Samoa,105,18,24,2.6
-San Marino,0,0,0,0.0
-Sao Tome & Principe,56,38,140,4.2
-Saudi Arabia,0,5,0,0.1
-Senegal,9,1,7,0.3
-Serbia,283,131,127,9.6
-Seychelles,157,25,51,4.1
-Sierra Leone,25,3,2,6.7
-Singapore,60,12,11,1.5
-Slovakia,196,293,116,11.4
-Slovenia,270,51,276,10.6
-Solomon Islands,56,11,1,1.2
-Somalia,0,0,0,0.0
-South Africa,225,76,81,8.2
-Spain,284,157,112,10.0
-Sri Lanka,16,104,0,2.2
-Sudan,8,13,0,1.7
-Suriname,128,178,7,5.6
-Swaziland,90,2,2,4.7
-Sweden,152,60,186,7.2
-Switzerland,185,100,280,10.2
-Syria,5,35,16,1.0
-Tajikistan,2,15,0,0.3
-Thailand,99,258,1,6.4
-Macedonia,106,27,86,3.9
-Timor-Leste,1,1,4,0.1
-Togo,36,2,19,1.3
-Tonga,36,21,5,1.1
-Trinidad & Tobago,197,156,7,6.4
-Tunisia,51,3,20,1.3
-Turkey,51,22,7,1.4
-Turkmenistan,19,71,32,2.2
-Tuvalu,6,41,9,1.0
-Uganda,45,9,0,8.3
-Ukraine,206,237,45,8.9
-United Arab Emirates,16,135,5,2.8
-United Kingdom,219,126,195,10.4
-Tanzania,36,6,1,5.7
-USA,249,158,84,8.7
-Uruguay,115,35,220,6.6
-Uzbekistan,25,101,8,2.4
-Vanuatu,21,18,11,0.9
-Venezuela,333,100,3,7.7
-Vietnam,111,2,1,2.0
-Yemen,6,0,0,0.1
-Zambia,32,19,4,2.5
-Zimbabwe,64,18,4,4.7
--- a/templates/alcohol.scala Wed Nov 08 16:08:16 2017 +0000
+++ b/templates/alcohol.scala Wed Nov 08 20:27:56 2017 +0000
@@ -13,16 +13,17 @@
"population.csv"
-//(1) Complete the get_csv_page function below. It takes the URL-string
-// as argument and generates a list of strings corresponing to each
-// line in the csv list. The URL url_alcohol is one possible argument.
+//(1) Complete the get_csv_page function below. It takes a URL-string
+// as argument and generates a list of strings corresponding to each
+// line in the downloaded csv-list. The URL url_alcohol above is one
+// possible argument.
//def get_csv_page(url: String) : List[String] = ...
-// Complete the get_csv_file function below. It takes a file-string
-// as argument and reads the content of the given file. Like above
-// it should generates a list of strings corresponing to each
+// Complete the get_csv_file function below. It takes a file name
+// as argument and reads the content of the given file. Like above,
+// it should generate a list of strings corresponding to each
// line in the csv-list. The filename file_population is one possible
// argument.
@@ -34,7 +35,7 @@
// process_alcs extract the country name (as String) and the
// pure alcohol consumption (as Double). For process_pops
// generate a Map of Strings (country names) to Long numbers
-// (population size).
+// (population sizes).
//def process_alcs(lines: List[String]) : List[(String, Double)] = ...
@@ -45,11 +46,11 @@
//(3) Calculate for each country the overall alcohol_consumption using
// the data from the alcohol list and the population sizes list. You
// should only include countries on the alcohol list that are also
-// (with the exact name) on the population sizes list. Note that
+// on the population sizes list with the exact same name. Note that
// the spelling of some names in the alcohol list differs from the
-// population sizes list. Sort the resulting list according to the
-// country with the highest alcohol consumption to the country
-// with the lowest alcohol consumption.
+// population sizes list. You can ignore entries where the names differ.
+// Sort the resulting list according to the country with the highest alcohol
+// consumption to the country with the lowest alcohol consumption.
//def sorted_country_consumption() : List[(String, Long)] = ...
@@ -58,7 +59,7 @@
// should be the first element in the tuple below. The second element is
// the overall consumption of the first n countries in the sorted list
// from above; and finally the double should be the percentage of the
-// first n countries of the the world consumption of alcohol.
+// first n countries drinking from the the world consumption of alcohol.
//def percentage(n: Int) : (Long, Long, Double) = ...
--- a/templates/collatz.scala Wed Nov 08 16:08:16 2017 +0000
+++ b/templates/collatz.scala Wed Nov 08 20:27:56 2017 +0000
@@ -13,7 +13,7 @@
//def collatz(n: Long) : Long = ...
-//(2) Complete the collatz bound function below. It should
+//(2) Complete the collatz-bound function below. It should
// calculate how many steps are needed for each number
// from 1 up to a bound and then calculate the maximum number of
// steps and the corresponding number that needs that many
--- a/templates/drumb.scala Wed Nov 08 16:08:16 2017 +0000
+++ b/templates/drumb.scala Wed Nov 08 20:27:56 2017 +0000
@@ -1,4 +1,4 @@
-// Advanvced Part 3 about a really dumb investment strategy
+// Advanced Part 3 about a really dumb investment strategy
//==========================================================
object CW6c {
@@ -11,68 +11,66 @@
"DLR", "EQIX", "EQR", "ESS", "EXR", "FRT", "GGP", "HCP")
-// (1.a) The function below takes a stock symbol and a year as argument.
-// It should read the corresponding CSV-file and read the january
-// data from that year. The data should be collected in a list of
-// strings for each line in the CSV file.
+// (1.a) The function below takes a stock symbol and a year as arguments.
+// It should read the corresponding CSV-file and read the January
+// data from the given year. The data should be collected in a list of
+// strings for each line in the CSV-file.
+
+import io.Source
+import scala.util._
//def get_january_data(symbol: String, year: Int) : List[String] = ...
-//
-// http://ichart.yahoo.com/table.csv?s=<<symbol>>&a=0&b=1&c=<<year>>&d=1&e=1&f=<<year>>
-//
-// and extracting the first January Adjusted Close price in a year.
-//
+
// (1.b) From the output of the get_january_data function, the next function
// should extract the first line (if it exists) and the corresponding
// first trading price in that year as Option[Double]. If no line is
-// given
-//
+// generated by get_january_data then the result is None
+
//def get_first_price(symbol: String, year: Int) : Option[Double] = ...
-// Complete the function below that obtains all first prices
-// for the stock symbols from a portfolio for the given
-// range of years
+// (1.c) Complete the function below that obtains all first prices
+// for the stock symbols from a portfolio (list of strings) and
+// for the given range of years. The inner lists are for the
+// stock symbols and the outer list for the years.
-//def get_prices(portfolio: List[String], years: Range): List[List[Option[Double]]] = ...
-// test case
-//val p = get_prices(List("GOOG", "AAPL"), 2010 to 2012)
+//def get_prices(portfolio: List[String], years: Range) : List[List[Option[Double]]] = ...
+
// (2) The first function below calculates the change factor (delta) between
-// a price in year n and a price in year n+1. The second function calculates
-// all change factors for all prices (from a portfolio).
-
-//def get_delta(price_old: Option[Double], price_new: Option[Double]): Option[Double] = ...
+// a price in year n and a price in year n + 1. The second function calculates
+// all change factors for all prices (from a portfolio). The input to this
+// function are the nested lists created by get_prices above.
-//def get_deltas(data: List[List[Option[Double]]]): List[List[Option[Double]]] = ...
+//def get_delta(price_old: Option[Double], price_new: Option[Double]) : Option[Double] = ...
-// test case using the prices calculated above
-//val d = get_deltas(p)
+//def get_deltas(data: List[List[Option[Double]]]) : List[List[Option[Double]]] = ...
+
// (3) Write a function that given change factors, a starting balance and a year
-// calculates the yearly yield, i.e. new balanace, according to our dump investment
-// strategy. Another function calculates given the same data calculates the
-// compound yield up to a given year. Finally a function combines all
-// calculations by taking a portfolio, a range of years and a start balance
-// as arguments.
+// calculates the yearly yield, i.e. new balance, according to our dump investment
+// strategy. Another function calculates given the same data calculates the
+// compound yield up to a given year. Finally a function combines all
+// calculations by taking a portfolio, a range of years and a start balance
+// as arguments.
+
-//def yearly_yield(data: List[List[Option[Double]]], balance: Long, year: Int): Long = ...
+//def yearly_yield(data: List[List[Option[Double]]], balance: Long, year: Int) : Long = ...
+
+//def compound_yield(data: List[List[Option[Double]]], balance: Long, year: Int) : Long = ...
-//test case
-//yearly_yield(d, 100, 0)
+//def investment(portfolio: List[String], years: Range, start_balance: Long) : Long = ...
-//def compound_yield(data: List[List[Option[Double]]], balance: Long, year: Int): Long = ...
-//def investment(portfolio: List[String], years: Range, start_balance: Long): Long = ...
//test cases for the two portfolios given above
-//investment(rstate_portfolio, 1978 to 2016, 100)
-//investment(blchip_portfolio, 1978 to 2016, 100)
+//investment(rstate_portfolio, 1978 to 2017, 100)
+//investment(blchip_portfolio, 1978 to 2017, 100)
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/testing/ESS.csv Wed Nov 08 20:27:56 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
--- a/testing/ESS.cvs Wed Nov 08 16:08:16 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,469 +0,0 @@
-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
--- a/testing/drumb.scala Wed Nov 08 16:08:16 2017 +0000
+++ b/testing/drumb.scala Wed Nov 08 20:27:56 2017 +0000
@@ -95,7 +95,7 @@
}
}
-yearly_yield(d, 100, 0)
+//yearly_yield(d, 100, 0)
//compound_yield(d.take(6), 100, 0)
def investment(portfolio: List[String], years: Range, start_balance: Long): Long = {
--- a/testing/drumb_test.sh Wed Nov 08 16:08:16 2017 +0000
+++ b/testing/drumb_test.sh Wed Nov 08 20:27:56 2017 +0000
@@ -99,6 +99,9 @@
if [ $tsts -eq 0 ]
then
echo " yearly_yield(get_deltas(<<GOOG+AAPL 2010 - 2012>>), 100, 0) == 125" >> $out
+ echo "" >> $out
+ echo " investment(rstate_portfolio, 1978 to 2017, 100) == 30839" >> $out
+ echo " investment(bchips_portfolio, 1978 to 2017, 100) == 349597" >> $out
if (scala_assert "drumb.scala" "drumb_test3.scala")
then
--- a/testing/drumb_test3.scala Wed Nov 08 16:08:16 2017 +0000
+++ b/testing/drumb_test3.scala Wed Nov 08 20:27:56 2017 +0000
@@ -34,3 +34,12 @@
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")
+
+
+assert(CW6c.investment(rstate_portfolio, 1978 to 2017, 100) == 30839)
+assert(CW6c.investment(blchip_portfolio, 1978 to 2017, 100) == 349597)