templates1/drumb.scala
changeset 266 ca48ac1d3c3e
parent 199 54befaf23648
child 281 87b9e3e2c1a7
--- a/templates1/drumb.scala	Sat Jun 22 08:39:52 2019 +0100
+++ b/templates1/drumb.scala	Wed Jul 24 14:22:06 2019 +0100
@@ -1,5 +1,5 @@
-// Part 2 and 3 about a really dumb investment strategy
-//======================================================
+// Main Part about a really dumb investment strategy
+//===================================================
 
 
 //two test portfolios
@@ -10,9 +10,9 @@
 
 
 // (1) The function below takes a stock symbol and a year as arguments.
-//     It should read the corresponding CSV-file and reads the January 
+//     It should read the corresponding CSV-file and then extract the January 
 //     data from the given year. The data should be collected in a list of
-//     strings for each line in the CSV-file.
+//     strings (one entry for each line in the CSV-file).
 
 import io.Source
 import scala.util._
@@ -23,7 +23,7 @@
 // (2) 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 with type Option[Double]. If no line 
-//     is generated by get_january_data then the result is None; Some if 
+//     is generated by get_january_data then the result is None; and Some if 
 //     there is a price.
 
 
@@ -40,13 +40,6 @@
 
 
 
-
-//==============================================
-// Do not change anything below, unless you want 
-// to submit the file for the advanced part 3!
-//==============================================
-
-
 // (4) The function below calculates the change factor (delta) between
 //     a price in year n and a price in year n + 1. 
 
@@ -84,7 +77,7 @@
 
 //Test cases for the two portfolios given above
 
-//println("Real data: " + investment(rstate_portfolio, 1978 to 2018, 100))
-//println("Blue data: " + investment(blchip_portfolio, 1978 to 2018, 100))
+//println("Real data: " + investment(rstate_portfolio, 1978 to 2019, 100))
+//println("Blue data: " + investment(blchip_portfolio, 1978 to 2019, 100))