Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Im in need of help regarding producing an array formula for a kind of SlopeAnd function. I'm trying to work out an automated historical Beta using the slope function, but i need it to calculate beta for each previous historical year (starting from 2006, all the way to 2010) and have it automated via a formula without my input after i put in the formula so that when i paste in the close prices the results appear automatically. I can paste the company share prices and ftse close prices into my sheet and it automatically works out both % change columns (company % changes being y array, ftse close prices being x array for slope). the trouble im having is automating (via a formula) slope depending on the year. 2010 will be made of 2006-2010 % changes. 2009 will be made up of 2006-2009 % changes. 2008 will be made up of 2006-2008 % changes etc. so for example, if im tryin to work out 2009, i need to tell excel to slope and then only use % changes for 2006, 2007, 2008 and 2009 only. above my data i have headed columns with the year numbers 2006-2010 to reference against. iv tried an array formula for 2009 but its not working:
Formula description: (C1 equalling "2006, D1 equalling "2007", E1 equalling "2008" etc) (E4:E237 is the year of the weekly close price, eg 2006, likewise G4:G237 is also the year of the weekly close price but for ftse, these are exactly the same as E4:E237)(F4:F237 is the company % change (y arrau), and H4:H237 is the ftse % change (x array)): FORMULA: {=SLOPE((IF(AND(E4:E237=C1,E4:E237=D1,E4:E237=E1,E 4:E237=F1)=FALSE,F4:F237)),(IF(AND(G4:G237=C1,G4:G 237=D1,G4:G237=E1,G4:G237=F1)=FALSE,H4:H237)))} alternatively, iv tried using * instead of the "and" function, but its still not returning the correct values. this is what i tried for the same year (2009): =SLOPE(IF(((E4:E237=C1)=FALSE)*((E4:E237=D1)=FALSE )*((E4:E237=E1)=FALSE)*((E4:E237=F1)=FALSE),F4:F23 7),IF(((G4:G237=C1)=FALSE)*((G4:G237=D1)=FALSE)*(( G4:G237=E1)=FALSE)*((G4:G237=F1)=FALSE),H4:H237)) iv been altering the formulas for 2 hours now and still cant get it to return the correct figures, anyone able to help please??? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
slope? | Excel Worksheet Functions | |||
Array formula SUMIF with 2D sum_range array | Excel Worksheet Functions | |||
Array formula: how to join 2 ranges together to form one array? | Excel Worksheet Functions | |||
Find specific value in array of array formula | Excel Worksheet Functions | |||
How to add slope formula to graph | Charts and Charting in Excel |