Click here to see the SAS code.
Click here to see the example.

---------------------------------------------------------------

Probably the neatest thing about this example, is that it takes
the stock ticker/abbreviation name you give it, and it queries the
latest/greatest stock market data for that company (on the web)
and reads the data (from the web) into a sas dataset on-the-fly
using the sas "filename html" capability.  I also set up this 
example as a SAS/Intrnet job, so you could just click on the 
stock ticker names in a list, and it gets the latest data and 
plots it in about 1 second each - very cool :)

This particular graph isn't the be-all/get-all stock marker plot,
but I did want to show that SAS/Graph has some potential in this area,
and also I wanted to experiment with some possibly new "twists" on 
doing this kind of graph.

One feature I show off in the first 2 plots is the 'high/low join' 
plot line interpolation (this requires me to structure the dataset
just-so, with 3 observations for each day ... one with the high, 
one with the low, and one with the close).  Also, I fill-in the area
below the line with light blue, and use the "skipmiss" to leave 
white gaps on the weekends (or holidays) when no stock trading was
going on - these gaps help you identify the time periods more eaisly,
and match them between the graphs more easily.  Although most people
only show the first (auto-scaled) graph, I think it is important to
also show the 2nd graph, where I start the y-axis at zero - this lets
you see home important the stock price change is.

(With the stock market crash, the first graph often goes to zero,
so the 2nd one is kinda redundant in that case, though :\

The 3rd graph shows volume - I use the 'needle' interpolation for 
this one (the needles look like tiny bars).

Below the 3rd graph, I show a table of the data, and below the table
I give a link you can click to download all available data for this
stock from the website where I get the data.

Back to Samples Index