Features

Below is an overview of some of the features of the Technical Analysis Toolbox.
For more detailed documentation, see the full toolbox documentation here.

Retrieve

Retrieve historical price, volume, and short interest data.
Several data handling tools are provided to allow you to easily retrieve, organize, and view stock data. Below is an example which uses the stockasset function to get one years worth of historical stock data from the companies listed in 'StockList', and store it in the variable 'MyStocks'.

Example:

DateRange = '1year';
EndDate = datevec(now);
StockList = {'DIS', 'PG', 'JPM', 'XOM', 'JNJ', 'GE', 'MSFT', 'EXC', 'MON'};
MyStocks = stockasset(EndDate,DateRange,StockList);
Download Status
Analyze

Analyze data with numerous indicator and overlay functions.
Indicators such as MACD, Relative Strength Index, Chaikin Volatility, and overlays such as Keltner Channels, Bollinger Bands, and Fibonacci Retracements, provide you with the analytical tools to develop your own trading strategy.

Example 1: MACD

mcd1 = MyStocks.macdiv(13, 26, 9);
figure(1)
clf
indchart(MyStocks,mcd1{1}, 'centered', '3months')
xlabel('Date')
title('MACD','fontweight','bold')
image

Example 2: RSI

rsi1 = MyStocks.rsindex(14);
figure(1)
clf
indchart(MyStocks,rsi1{1},'banded',[30 70],'3months')
xlabel('Date')
title('Relative Strength Index','fontweight','bold')
image
Display

Display data with customizable charts.
Easily create customized price/volume charts with indicators and overlays, figures with multuple charts, or indicator-only charts. Choose between several chart styles and color schemes. For example, the stockchart and chartoptions functions are used below to create a 3 month candlestick chart.

Example:

coptions = chartoptions('candle','3months');
figure(1)
clf
hgroup = stockchart(MyStocks('GE'),coptions);
xlabel(hgroup(end),'Date')
title('MyStocks: GE','fontweight','bold')
MyStock candlestick chart
Charting Indicators & Overlays

Customize charts with analytics.
Easily add indicators and overlays to your charts with the addindicator and addoverlay functions.

Example:

accdist = MyStocks.accumdist;
mcd = MyStocks.macdiv(13,26,9);
stoch = MyStocks.fullstochosc;
iStock = 6;
hgroup = addindicator(hgroup,mcd{iStock},'centered','macd');
hgroup = addindicator(hgroup,accdist{iStock},'centered','A/D');
hgroup = addindicator(hgroup,stoch{iStock}(:,[3 4]),'banded',[20 80],'slowstoch');
xlabel(hgroup(end),'Date')
title(hgroup(1),'Add Indicators','fontweight','bold')

bbands = MyStocks.bollingerbands;
addoverlay(hgroup,bbands{iStock},'BBands(20,2)')
title(hgroup(1),'Add Overlay','fontweight','bold')
Add Indicator
Add Overlay
Multiple Charting

Create multi-chart arrays.
With the 'subplot' argument of the stockchart function, figures with multiple charts are easily created.

Example:

coptions = chartoptions('candle','2months');
nrows = 2;
ncols = 4;
accdist = MyStocks.accumdist;
mcd = MyStocks.macdiv(13,26,9);
stoch = MyStocks.fullstochosc;
bbands = MyStocks.bollingerbands;
nStocks = length(MyStocks);
figure(1)
clf
for i = 1:(ncols*nrows)
  if i>nStocks, break, end
  hgroup = stockchart(MyStocks(i),coptions,'subplot',[nrows ncols i]);
  addoverlay(hgroup,bbands{i},'BBands')
  hgroup = addindicator(hgroup,mcd{i},'centered','macd');
  hgroup = addindicator(hgroup,accdist{i},'centered','A/D');
  hgroup = addindicator(hgroup,stoch{i}(:,[3 4]),'banded',[20 80],'slowstoch');
end
Multiple Charts
Function List

Data Handling
Function Description
stockasset

Create stockasset object with historical data

stocktable

Generate table to view stockasset properties

getsp500list

Get S&P500 listings


Charting
Function Description
indchart

Indicator Chart

chartoptions

Create chartoptions object

stockchart

Create stock chart form historical data

addindicator

Add indicators to stock charts

addoverlay

Add overlays to stock charts


Indicators
Function Description
accumdist

Accumulation/Distribution Line

avtrange

Average True Range

chaikinmonflow

Chaikin Money Flow

chaikinosc

Chaikin Oscillator

chaikvol

Chaikin Volatility

clval

Close Location Value

forceindex

Force Index

mfindex

Money Flow Index

macdiv

Moving Average Convergence Divergence

ndayslope

N day Slope

nvindex

Negative Volume Index

obvol

On Balance Volume

pposc

Percent Price Oscillator

pvosc

Percent Volume Oscillator

pvindex

Positive Volume Index

pvtrend

Price and Volume Trend

rateofchange

Rate of Change

rsindex

Relative Strength Index

fullstochosc

Stochastic Oscillator

vwmacdiv

Volume Weighted MACD

williamsad

Williams Accumulation/Distribution

williamspctr

Williams %R


Overlays
Function Description
bollingerbands

Bollinger Bands

fiblines

Fibonacci Retracement Lines

keltnerchannels

Keltner Channels

mavg

Moving Averages

pricechannel

Price Channels

typrice

Typical Price


Offbeat Analytics is not affiliated with The MathWorks, Inc.
Matlab® is a registered trademark of The MathWorks, Inc.