MathGroup Archive 2009

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

Search the Archive

Re: Histograms and Iterators - Beginner Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97905] Re: Histograms and Iterators - Beginner Question
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Wed, 25 Mar 2009 05:44:09 -0500 (EST)
  • References: <gqacki$j5e$1@smc.vnet.net>

Hi Jon,

A few remarks:

1. A histogram is probably not the kind of plot you're looking for.
This counts nd displays the numbers of occurences of a countable set
of objects. What you actually need is just a simple x-y plot.

2. FinancialData has ways to deliver data for a given date or a range
of dates. No need for iterations in a Table.

3. Examining examples is fine and reverse engineering is not bad
either, but reading the manual can be very educating. Everything you
needed to know was on the FinancialData doc homepage. Just click on
the "More Information" bar right below the yellow syntax box.

4. DateListPlot[
 FinancialData["IBM", "Volume", {{2004, 3, 1}, {2004, 3, 20}}],
 Joined -> True] will do the trick.

Cheers -- Sjoerd

On Mar 24, 12:28 pm, 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



  • Prev by Date: Re: utterly confused by Lightweight Grid
  • Next by Date: Re: Kernel is quitting on me
  • Previous by thread: Re: Histograms and Iterators - Beginner Question
  • Next by thread: FindMinimum KKT results