Products & Services Solutions Academia Support User Community Company

Learn more about Financial Toolbox   

cumsum - Cumulative sum

Syntax

newfts = cumsum(oldfts)

Description

newfts = cumsum(oldfts) calculates the cumulative sum of each individual time series data series in the financial time series object oldfts and returns the result in another financial time series object newfts. newfts contains the same data series names as oldfts.

Examples

Compute the cumulative sum for Disney stock and plot the results:

load disney.mat 
cs_dis = cumsum(fillts(dis));
plot(cs_dis)
title('Cumulative Sum for Disney')

See Also

cumsum in the MATLAB documentation

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS