%% Calculate the Price and Volume Trend for a Data Series for a Stock
% Load the file SimulatedStock.mat, which provides a timetable (TMW) for financial data for TMW stock.

load SimulatedStock.mat
trend = pvtrend(TMW);
plot(trend.Time,trend.PriceVolumeTrend)
title('Price and Volume Trend for TMW')

% Copyright 2012 The MathWorks, Inc.