This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Bollinger Chart

The bolling function in Financial Toolbox™ software produces a Bollinger band chart using all the closing prices in an IBM® stock price matrix. A Bollinger band chart plots actual data along with three other bands of data. The upper band is two standard deviations above a moving average; the lower band is two standard deviations below that moving average; and the middle band is the moving average itself. This example uses a 15-day moving average. First, load the data using the ibm.dat data file and then execute the bolling function to plot the Bollinger bands.

load ibm.dat;
[ro, co] = size(ibm);
bolling(ibm(:,4), 15, 0);     

axis([0 ro min(ibm(:,4)) max(ibm(:,4))]);
ylabel('Price ($)');
title(['International Business Machines']);
dateaxis('x', 6,'31-Dec-1994')

Specify the axes, labels, and titles. Use dateaxis to add the x-axis dates.

For help using MATLAB® plotting functions, see Create 2-D Graph and Customize Lines (MATLAB) in the MATLAB documentation. See the MATLAB documentation for details on the axis, title, xlabel, and ylabel functions.

See Also

| | | | | | | | | | | | | | | | | | | | | | | | | |

Related Topics

Was this topic helpful?