Preliminary calculations
Consider a $n \times 1$ vector of asset returns $r_{it}$ for each time $t$, where each of it is calculated as
$$r_{it} = \frac{P_{it} - P_{it-1}}{P_{it-1}}$$
i.e. simple returns, where stock prices $P_{it}$ should be adjusted for stock splits, dividends, etc.
For calculating value weighted returns $r_{t}^{val}$ for each time $t$, you also need a $n \times 1$ vector of weights $w_i$ for each stock $i$, with
$$w_{it} = \frac{MV_{it-1}}{\sum_{j=1}^n MV_{jt-1}}$$
where $MV_i$ denotes the market value of company $i$ and $n$ the total amount of stocks you are considering in your portfolio. Be aware, that you match returns of month $t$ with market values of the previous period $t-1$.
The value-weighted portfolio return $r_{pt}^{val}$ is calculated by
$$r_{pt}^{val} = w_{it}' r_{it}$$
where $w_{it}'$ denotes the transposed vector of $w_{it}$.
Cumulative vs. compounded returns
Be aware of the difference of cumulative ($r_t^{cum}$) and compounded ($r_t^{com}$) returns. Both are calculated as:
$$r_t^{cum} = \sum_{i=1}^t r_{pi}^{val}$$
$$r_t^{com} = \prod_{i=1}^t \left( 1+r_{pi}^{val} \right)$$
The cumulative return for month $t$ is calculated as the sum of monthly value-weighted portfolio returns from the first period of time up to (and including) the given month $t$.
The compounded return for month $t$ is calculated as the cumulative product of one plus the monthly value-weighted portfolio returns from the first period of time up to (and including) the given month $t$.
Bali/Engle/Murray (2016) state (p. 118/119):
[...] the compounded return gives an indiction of how much money would have been made [...] by an investor who invested one dollar in the portfolio at the end of the (first period of time). The line representing this value is in some ways misleading, as a quick glance at the solid line would seem to indicate that the returns were much more volatile toward the end of the sample period than at the beginning. This result is simply due to the scale however, as the same percentage gain or loss is indicated by a larger vertical distance on the chart for the more recent periods, as the cumulative returns are larger toward the end to the sample period than at the beginning of the sample period. The cumulative sum of returns does not suffer from this drawback, but the interpretation of the values on the sum of returns scale is not as simple as those on the compounded returns scale.