User Tools

Site Tools


haas:fall2017:datacomm:projects:pds0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

haas:fall2017:datacomm:projects:pds0 [2017/08/21 17:30] – created wedgehaas:fall2017:datacomm:projects:pds0 [2017/08/21 17:42] (current) – [Program] wedge
Line 62: Line 62:
 In the example above, the header would be the first 7 lines: In the example above, the header would be the first 7 lines:
  
-<cli>+<code>
 EXCHANGE%3DOTCMKTS EXCHANGE%3DOTCMKTS
 MARKET_OPEN_MINUTE=570 MARKET_OPEN_MINUTE=570
Line 70: Line 70:
 DATA= DATA=
 TIMEZONE_OFFSET=-240 TIMEZONE_OFFSET=-240
-</cli>+</code>
  
 What this is basically telling us is which stock exchange this data pertains to (somewhat unimportant for our current project), the absolute minute from the start of the day when the markets opened and closed (potentially important for what we are doing), the interval of data being reported (in units of seconds), the overall format of the data (date, close, high, etc.), a seemingly unused (maybe reserved?) DATA option, and finally a timezone offset (what timezone is this data being reported in?) What this is basically telling us is which stock exchange this data pertains to (somewhat unimportant for our current project), the absolute minute from the start of the day when the markets opened and closed (potentially important for what we are doing), the interval of data being reported (in units of seconds), the overall format of the data (date, close, high, etc.), a seemingly unused (maybe reserved?) DATA option, and finally a timezone offset (what timezone is this data being reported in?)
Line 76: Line 76:
 Following the header we have a stanza pertaining to a day, which will kick off with a line like this: Following the header we have a stanza pertaining to a day, which will kick off with a line like this:
  
-<cli>+<code> 
 +a1500903000,0.097,0.097,0.0965,0.0965,53758 
 +</code>
  
-</cli>+This is effectively kicking off item 0 in the reported interval. 
 + 
 +That first field (note a comma-separated list), is actually an encoded UNIX time value, which we'll want to decode to report more recognizable date information (YYYY-MM-DD HH:MM). 
 + 
 +The successive fields correspond, in order with the values laid out in the **COLUMNS** option in the header (after DATE comes the prior CLOSE, then the HIGH, the LOW, the OPEN, and finally the VOLUME). 
 + 
 +With the exception of DATE and VOLUME, everything else is represented as a decimal cost (you may assume dollars). 
 + 
 +Subsequent lines in the stanza are merely offset intervals from the first, for instance: 
 + 
 +<code> 
 +1,0.096,0.097,0.096,0.097,102502 
 +2,0.0974,0.099,0.095,0.09525,159489 
 +3,0.099,0.099,0.097,0.0975,238832 
 +4,0.0975,0.099,0.097,0.097,21000 
 +</code> 
 + 
 +No UNIX time value to decode, merely an offset to add to that initial UNIX time value. 
 + 
 +Your job is to write a program that, when provided one of these dataset files as a command-line argument, will open and read its contents into memory (I'm leaving the //structure// of how you store it somewhat flexible for now, but let's just say it may make a whole lot of sense to use a **struct** to aid in storing this data, perhaps even an **array** of structs...), and then be able to interactively (perhaps via a menu?) report : 
 + 
 +  * in a specified time interval (minute, 10 minute, 30 minute, hour, day, 2 days, 5 days). 
 +  * the CLOSE, HIGH, LOW, OPEN, or VOLUME at the specified time interval  
 + 
 +Results for now should just be displayed to STDOUT. 
 + 
 +Clearly, there's a lot of different directions we can go from here, but for now we're aiming to establish a baseline (can we interact with and parse known data in expected ways). Once we have that down, we can get into more sophisticated variations. 
 + 
 +Submission is via the lab46 submit tool, by the posted deadline, for the source code (able to compile and run without issue on lab46).
haas/fall2017/datacomm/projects/pds0.1503336651.txt.gz · Last modified: 2017/08/21 17:30 by wedge