Re: Need help with time series
- To: mathgroup@smc.vnet.net
- Subject: [mg10855] Re: [mg10807] Need help with time series
- From: Tom Garza <tgarza@mail.internet.com.mx>
- Date: Wed, 11 Feb 1998 18:32:27 -0500
Martin, If you have your data in an Excel table called, say, dataset.txt, then it is a good idea to have them all formatted to numbers (no commas or other alphanumeric characters). The dates can be converted arbitrarily to integers. dataset eadList["dataset.txt",Number, RecordLists->True] gets the data in a list like {{date1, open1, high1,low1,close1,volume1},{date2, open2, high2,low2,close2, volume2},...,{date500, open500, high500,low500,close500,volume500}}. Make sure also that you give the correct path for the Excel file. Once you have dataset, then you can use a single column or several of them for your analysis. If you want just the "high" column, then you'll get it with highs;[3]]&/@dataset If you want two columns, say dates and highs, then dateandhigh³[[1]],#[[3]]}&/@dataset Once you have dataset, then you can update it manually every day with datasetrtition[Flatten[{dataset,{newdate,newopen,newhigh,newlow,newc lose, newvolume}}],6] The most recent 10 days are Take[dataset,-10] Good luck, Tomas Garza Mexico City