holding stock can be more complicated the adjusted close values used here have been adjusted for splits and dividendshowever in all casesit' quite common to derive return indexwhich is time series indicating the value of unit investment (one dollarsaymany assumptions can underlie the return indexfor examplesome will choose to reinvest profit and others not in the case of applewe can compute simple return index using cumprodin [ ]returns price pct_change(in [ ]ret_index ( returnscumprod(in [ ]ret_index[ set first value to in [ ]ret_index out[ ]date length with return index in handcomputing cumulative returns at particular resolution is simplein [ ]m_returns ret_index resample('bm'how='last'pct_change(in [ ]m_returns[' 'out[ ]date - - freqbm of coursein this simple case (no dividends or other adjustments to take into accountthese could have been computed from the daily percent changed by resampling with aggregation (hereto periods)in [ ]m_rets ( returnsresample(' 'how='prod'kind='period' in [ ]m_rets[' 'out[ ]date data munging topics www it-ebooks info