2 Replies Latest reply on Jul 17, 2012 4:06 PM by Aaron Rubinstein

    Calculating Stock Price Change From Average Price Over Date Range

    Aaron Rubinstein

      I have attached a sample dataset with daily closing prices for two stocks. I am trying to create a chart that shows, for each day of 2012, the percentage difference in that day’s closing price from the average closing price for the stock over the last 20 trading days of 2011 (which would be the date range 12/2/11 through 12/31/11). I would like to plot this on a line chart with each company represented by a line (see the Excel chart below for an example of what I am going for).


      I am not sure how to setup a calculated field to get the average stock price for each company over the 12/2/11 through 12/31/11 timeframe, and then calculate the percentage difference from the current price. Any help with this would be much appreciated.





      Example Chart.PNG