sean.snv has asked for the wisdom of the Perl Monks concerning the following question:
Currently, I am specifying a date range and stock and get a time series. For example: timeseries("stock2", [20100228,20100331]) returnsFile1 - Data20100131.csv stock1,10.2 stock2,9.5 stock3,34.7 File2 - Data20100228.csv stock1,10.5 stock2,13.5 stock3,23.1 File3 - Data20100331.csv stock1,11.1 stock2,9.2 stock3,44.6
The way I do this is to loop through each dated file line by line looking for my stock identifier, grabbing my data and moving on to the next file. Is there a more efficient/clever way of doing this? Thanks in advance, Sean{ 20100228 => 13.5, 20100331 => 9.2, }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: building a time series form dated flat files
by mr_mischief (Monsignor) on Oct 14, 2010 at 17:21 UTC | |
by sean.snv (Initiate) on Oct 14, 2010 at 17:40 UTC |