Hello,
I have a question regarding how to construct a specific UDF. Hopefully the following is coherent...
The function will be used to analyze stock/financial price data; the calculation will be the percent ranking of todays high price (H) minus todays low price (L), relative the past 252 days worth of H-L data. I'm having trouble understanding how to include all of the H-L data in the PERCENTRANK array.
If one were to look at the calculation as I have it setup without using a UDF, column H would contain H-L values for each day/row. Column I contains the percentrank function. The most current value (row 2) would contain the formula: "=PERCENTRANK(H2:OFFSET(H2,252,0),H2)". I use this function as a means of comparing daily price volatility, given the past years worth of data (252 trading days per year).
Any help or info (links to relevant articles) would be greatly appreciated!
Please let me know if further elaboration would be helpful.
Thanks!
Bookmarks