Re: Histograms and Iterators - Beginner Question
- To: mathgroup at smc.vnet.net
- Subject: [mg98105] Re: Histograms and Iterators - Beginner Question
- From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
- Date: Mon, 30 Mar 2009 04:44:04 -0500 (EST)
- References: <200903251045.FAA24619@smc.vnet.net> <gqia6j$ol5$1@smc.vnet.net>
Histogram[ FinancialData["IBM", "Volume", {{2009, 3, 1}, {2009, 3, 20}}, "Value"], BarOrigin -> Left] Cheers -- Sjoerd On Mar 27, 12:36 pm, Jon Rogers <jr... at mac.com> wrote: > Thank you for the responses Raffy and Sjoerd. > > Sjoerd - Actually a histogram is what I am looking for. I have had no > problems generating the various other plots, but, a histogram of the > daily trading volume usually next to a plot of the daily closing > prices is a fairly standard financial chart. You are right that the > online documentation is excellent and I have been putting it to good > use. It does seem that there are a few gaps - but the FinanacialData > function seems to be fairly new so they haven't run through many of > the possible use scenarios yet. > > Raffy - What you suggested has gotten me one step closer, but it is > not exactly what I am trying to achieve. What you suggested produced a = > chart with a range of volumes on the X-Axis and the number of days in > which those volumes occurred on the y-axis. What I would like is the > volume level on the y-axis and days (time) to run along the x-axis. > > Thanks for your assistance, > > Jon > > Begin forwarded message: > > > > > From: Raffy <ra... at mac.com> > > Date: March 25, 2009 3:45:06 AM PDT > > To: mathgr... at smc.vnet.net > > Subject: Re: Histograms and Iterators - Beginner Question > > > On Mar 24, 3:28 am, Jon Rogers <jr... at mac.com> wrote: > >> Hello everyone: > > >> I am a new Mathematica user and have been teaching myself the program > >> using real-world examples and reverse-engineering the code. This > >> approach has worked well for the last few months since I began, but I > >> have run into a roadblock and was hoping someone will help me out. > > >> I am currently trying to import financial data and generate a > >> histogram of the daily volume for a given security. Ultimately I am > >> going to make this into a sparkline (very useful in my work). Use of > >> the options to create the sparkline is clear. Where I am getting > >> stuck = > > >> is the importing and formatting of the data. I think setting up the > >> iterators is my problem, but I have tried about every option and have > >> not found the answer yet. > > >> I have been using the default examples in the online documentation of > >> IBM and March 1, 2004. Here are a few of the approaches I have tried: > > >> Histogram[Table[FinancialData["IBM","Volume"],{"March 1,2004"}]] > > >> Histogram[Table[FinancialData["IBM","Volume",i],{i,"March 1,2004"}]] > > >> Histogram[Table[FinancialData["IBM","Volume",i],{i,"March > >> 1,2004","March 20,2009"}]] > > >> Any suggestions, > > >> Thanks, > > >> Jon > > > To get the volume data: > > > volume = FinancialData["IBM", "Volume", {"Mar 1, 2004", "Mar 24, > > 2009"}, "Value"]; > > > Then just plot it: > > > Histogram[volume] >
- References:
- Re: Histograms and Iterators - Beginner Question
- From: Raffy <raffy@mac.com>
- Re: Histograms and Iterators - Beginner Question