Stock market rolling period returns

mdelzi23

New Member
Joined
Feb 17, 2016
Messages
6
Hello,
I am trying to calculate stock market returns over different periods. I have downloaded the daily index values from yahoo finance for the S&P 500 and the Russell 2000 index. I would like to start with the 1 year, 3 year and 6 year rolling periods. This is difficult because the data excludes the weekends and holidays which is difficult to calculate 365 days. When I enter a starting period the ending date some times falls on a weekend or holiday. I have used the vlookup function to randomly pick starting dates and find its corresponding index value, but the rolling period often ends on a weekend or holiday where there is no corresponding date or value. I would like to create a lookup that allows the ending date to move out to the next trading day in the future and find the corresponding index value.

This is the formula I have been using =WORKDAY(EDATE(C9,12)-1,0,'S&P Daily '!J2:J7288)
12 is the 12 month rolling period from a specific date. I get a "#N/A" when the end date lands on a weekend, holiday or the data is missing.

Any suggestion would be very helpful.

Thanks
 
Perhaps something like this:

B5: =HLOOKUP(B3,F2:H4,2,)
B6: =HLOOKUP(B3,F2:H4,3,)
A9: =CalcDate
A10: =EDATE(A9,-12*Period) Copy down
B9: =IFERROR(VLOOKUP(A9,$E$8:$F$15,2,TRUE)/VLOOKUP(EDATE(A9,-12*Period),$E$8:$F$15,2,TRUE)-1,"") Copy down
C9: =IFERROR(MEDIAN(Cap,B9,MIN(B9-Offset,0)),"") Copy down
B16: {=GEOMEAN(IFERROR(1+B10:B15,""))^(1/Period)-1} Array-entered, copy to C16


ABCDEFGH
1DashboardParameters
2CalcDate31 Dec 2015Term136
3Period3Cap10%17%43%
4Offset-10%-15%-25%
5Cap17%
6Offset-15%
7
8Results:S&P Data
9ReturnsRawAdjustedDateClose
1031 Dec 201543.31%17.00%31 Dec 2008903.25
1131 Dec 201227.90%17.00%31 Dec 20091,115.10
1231 Dec 200931 Dec 20101,257.64
1331 Dec 200630 Dec 20111,257.60
1431 Dec 200331 Dec 20121,426.19
1531 Dec 200031 Dec 20131,848.36
1631 Dec 20142,058.90
17Average (% pa)10.63%5.37%31 Dec 20152,043.94

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>

 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,216,171
Messages
6,129,281
Members
449,498
Latest member
Lee_ray

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top