Automatic array determination upon criterea

Danielvk93

New Member
Joined
Nov 2, 2016
Messages
5
Hi,

I have been looking ages for this solution in order to complete my thesis. I have a dataset with daily stock prices of many firms. The firms however are listed under each other, and therefore I need to determine the array upon a critera.

For my first BETA calculation, i have used the following formula:

=COVAR.S(F3:F2267;H3:H2267)/VAR.S(H3:H2267)

Now I need a formula, which automatically can let excel put =COVAR.S(F2268:XXX;H2267:XXX)/VAR.S(H2267:XXX) till my last observation. I have empty cells splitting the different firms which could be linked to.

I really need help with this, hopefully someone can help me out.


Thanks
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Yes, the ranges are adjust, not every company has equal data points. The only thing that seperates the firms between rows are the empty cells i created, so i coud put a 1 for every new observation in the column.
 
Upvote 0
PERMNODateNamePrice ReturnBenchmarkReturn BenchBeta
13-1-2007XXX50.621126.213.30487575
14-1-2007XXX49.68-1.86%1132.170.53%
15-1-2007XXX49.2-0.97%1141.810.85%
18-1-2007XXX48.9-0.61%1150.570.77%
22-2-2007AAA46.831148.16
25-2-2007AAA47.050.47%1140.53-0.66%-0.954285894
26-2-2007AAA46.32-1.55%1139.32-0.11%
27-2-2007AAA47.492.53%1139.320.00%
28-2-2007AAA45.11-5.01%1145.20.52%
22-2-2007AAA44.85-0.58%1129.44-1.38%
25-2-2007AAA44.57-0.62%1128.17-0.11%
26-2-2007AAA45.92.98%1128.840.06%
322-1-1997BBB45.551134.61
323-1-1997BBB45.80.55%1135.820.11%
324-1-1997BBB46.010.46%1118.15-1.56%
417-5-2004CCC46.631124.09
418-5-2004CCC45.5-2.42%1139.931.41%
419-5-2004CCC46.071.25%1140.60.06%
420-5-2004CCC45.41-1.43%1135.53-0.44%
421-5-2004CCC44.48-2.05%1138.110.23%
422-5-2004CCC45.712.77%1122.41-1.38%
423-5-2004CCC46.92.60%1113.89-0.76%
424-5-2004CCC45.71-2.54%1107.3-0.59%
425-5-2004CCC46.7952.37%1117.490.92%

<colgroup><col><col><col><col><col span="2"><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
I have to calculate the column Beta with the formula posted above. As you can see the array varies whenever the next company starts.
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,454
Members
449,083
Latest member
Ava19

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