Need Help Quick! Full Project

I'm pretty new to programming and I was given a task by a university prof. that I have no hope in completing by the deadline I was given (tomorrow at noon). My professor says that it shouldn't take me more than a couple hours but I have no idea where to start! Any help would be greatly appreciated. This is the project outline:

"Please write a program that will started with the name of a data file on the command line and process that file to produce the following output.

1. The program will read a file containing stock price information which contains the following characteristics:

a. A header line (contains the name of the data in each column)

b. 6 columns of data: Tradedt, open, high, low, close and volume

c. Each column of data is separated with a comma and each line ends with a carriage return (the .csv extension stands for ‘comma separated values’, it is a standardized file type)

d. The program will provide the information read from the file, and calculate:
i. The daily price range

ii. The 5 day moving average price

iii. The 8 day moving average price

iv. The 13 day moving average price

v. The 13 day average volume

e. The program will highlight any day where the closing price is above the 8 day moving average
f. The program will highlight any day where the volume is 50% greater than the 13 day average volume

2. The program will send all of the information above to a CSV file


The information in the file that was attached looks like this:
tradedt,open,high,low,close,volume
02/01/2012,5.59,5.59,5.59,5.59,0
03/01/2012,5.71,5.88,5.71,5.76,1674800
04/01/2012,5.71,5.8,5.64,5.68,508500
05/01/2012,5.62,5.83,5.56,5.76,730300
06/01/2012,5.68,5.79,5.65,5.73,945200
09/01/2012,5.74,5.95,5.64,5.76,861900
10/01/2012,5.79,6.23,5.79,6.16,2064400
11/01/2012,6.14,6.31,6.01,6.24,1283000
12/01/2012,6.32,6.32,6.19,6.29,1493700
13/01/2012,6.17,6.77,6.15,6.72,4384900
16/01/2012,6.72,6.72,6.72,6.72,0
17/01/2012,6.5,6.52,6.28,6.33,1865700
18/01/2012,6.35,6.43,6.27,6.39,1527100
19/01/2012,6.36,6.54,6.29,6.3,891100
20/01/2012,6.14,6.15,5.83,6.04,2647500
23/01/2012,6.03,6.16,5.9,6,1006900
24/01/2012,5.97,6.07,5.8,6.06,951800
25/01/2012,6.06,6.22,5.94,6.18,1143200
26/01/2012,6.22,6.24,6.02,6.07,864600
27/01/2012,6.05,6.18,6,6.14,973200

Thanks in advance for all the help!!
This is not a homework site. We won't do your homework for you. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again. As it is impossible to find derivative of function without knowledge in arithmetics, you cannot do more complex tasks in programming without clear understanding of basics
closed account (E0p9LyTq)
I'll give you a couple of pointers to know where to start:

1. Process main's parameters to obtain the file name you will want to read data from.

2. Read the data and store it in a container.

3. Perform various math equations on the data to obtain desired results.

4. Output results.

5. Success!
Last edited on
Topic archived. No new replies allowed.