Display Stock Data

License

Copyright (c) 2002, Peter Webb
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

This is the example code for the News and Notes article entitled "Internet Enabled Data Analysis and Visualization with MATLAB." It demonstrates how to use Java to retrieve and plot data publically available on the Internet, using historical stock data from the Yahoo! servers as an example. Note that the Yahoo! historical stock price server is often very busy during the US business day -- you may have trouble connecting. Try again after 4:30pm Eastern (US) Time.

to reflect Yahoo's current format for it's stock data tables. They now have a 6th column, the adjusted close price, which adjusts the historical close price for any subsequent splits.
Ideally, the whole set of routines should be updated to use the adjusted close price instead of the historical close price.

This is a nice demonstration of the use of Java classes in Matlab, but it is still pretty buggy and rather dependent on the financial toolbox for the most interesting results. The author's attempt to supply surrogate functions for those that might be in the F.T. (e.g. daxis in lieu of dateaxis) is a step in the right direction, but still needs some cleanup/debugging work.

Florian Maurer

2 Nov 2002

This package is a good idea, BUT IT DOES NOT WORK. Calling the function GetStockData results in an error message:
??? Unknown parameter 'emptyvalue'