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: [mg97910] Re: Histograms and Iterators - Beginner Question
  • From: Raffy <raffy at mac.com>
  • Date: Wed, 25 Mar 2009 05:45:06 -0500 (EST)
  • References: <gqacki$j5e$1@smc.vnet.net>

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]


  • Prev by Date: Re: Help x-y pairs with rules
  • Next by Date: Re: Kernel is quitting on me
  • Previous by thread: Histograms and Iterators - Beginner Question
  • Next by thread: Re: Re: Histograms and Iterators - Beginner Question