• Post Reply Bookmark Topic Watch Topic
  • New Topic

reading multiple CVS files sequentially  RSS feed

 
adeee tryui
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I need help to write this code, i am so confuse on how to write it.
Google Finance, http://www.google.com/finance?hl=en&tab=we, provides a convenient means of downloading an investment's history consisting of the following fields: Ticker, Date, Open, High, Low, Close, and Volume.

Download a year's history for each of the following investments into separate .csv files:

F Ford
IPG Interpublic Grp Cos
RTN Raytheon Co
SYMC Symantec Corp
TWX Time Warner
TJX TJX Companies
VSH Vishay Intertechnolog...
IBM International Business Machines.

Reading each file sequentially, use string split or the tokenizer with a comma as a delimiter to parse each of the .csv files into fields. Use each investment's history fields to determine the Moving Average Convergence Divergence (MACD) for each of the investments as of 4/1/2016 per http://en.wikipedia.org/wiki/MACD
 
Campbell Ritchie
Marshal
Posts: 55761
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
Please tell us what you are planning to do. You can't write any code until you have decided what you want it to do. I presume CVS means CSV (=comma separated value)? I think you will find it easier to write code when you have written down what you are doing. Write out the steps you think you are going to follow and let us have a look at them.

BTW: It is called Java not JAVA.
 
Campbell Ritchie
Marshal
Posts: 55761
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something which may have been forgotten:-
StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code.
That comes from the official Java® documentation, which means you ought to use String#split.

You should not attempt the whole task at once. Do it bit by bit and finish one part before you go anywhere near the next part.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!