My goal is to calculate the total end stock price (equals to the cumulative dividend till that date + stock close price)
- I have a table with dividend pay dates and dividend amount
- I have a table with daily stock close price

So for example, if the first dividend is paid on 01.02.2018 and the amount is 0.85, and the 2nd dividend is paid on 27.02.2018, and the 3rd dividend is paid on 15.06. 2018
I would like to add a column my daily stock close price called total stock price
which from 01.02.2018 to 28.02.2018 the value would be stock close price + first dividend and from 28.02.2018 to 15.06. 2018 the value would be stock close price + first dividend + 2nd dividend.
