MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Time Series Data in Quarters


It should be easy to replace the quarterly date stamp with something Mathematica will recognize, but I can't provide sample code without knowing precisely what you are starting with.

For example,

startingData=={{"2009q1",1},{"2009q2",2},{"2009q3",2.2}};

datifier[malformedThing_] :== \
{{ToExpression[StringJoin[Take[Characters[malformedThing[[
        1]]], 4]]], Switch[Cchaharacters[malformedThing[[1]]][[6]], "1", 3,"2", \
6, "3", 9, "4", 12], Switch[Characters[
      malformedThing[[
        1]]][[6]], "1", 31, "2", 31, "3", 30, "4", 31]}, malformedThing[[2]]}

cleanedUpData==Map[datifier[#] &, startingData];

DateListPlot[cleanedUpData]


Michael



On Sep 3, 2010, at 6:08 AM, jroge wrote:

> I just received some financial data that I would like to analyze,
> however the data is by fiscal quarter. DateListPlot seems to require
> specific dates for plotting, rather than an option that is more
> abstract such as Q1, 2007. Any suggestions?
>


  • Prev by Date: Re: <Null> while building lists
  • Next by Date: Re: FindRoots?
  • Previous by thread: Time Series Data in Quarters
  • Next by thread: Re: Time Series Data in Quarters