<p>There are a couple of things that you are going to want to keep in mind as you do this type of analysis. You want to be careful not to base your conclusions on too little data. It sounds like you would be basing your monthly elasticity estimates on two data points (the month in 2018 and the month in 2017). Unless your sales data is remarkably stable, this is likely to be highly influenced by noise in the data.</p>

<p>Additionally, the time period that you use in estimating elasticity should be determined by the frequency of price changes and the frequency of sales. For example, if you only observe price changes once per year, this type of analysis will likely be ineffective. I would recommend plotting your observed price and sales points at the weekly or monthly level. This will give you a sense of how noisy your data is. If the plots that you create look relatively stable, then, as you discussed, you can think about fitting a demand curve to the data and calculating elasticity using the equation of the fitted curve.</p>

CC BY-SA 4.0
2019-02-12T08:45:10.493Z
Thanks for your remarks. I am afraid that my data is very noisy though. That's why I thought of taking average monthly prices to reduce the strong daily fluctuations as much as possible. But let's assume that I plot prices and sales points on a weekly basis and I see that I can use this data, therefore calculate the elasticity: how can I take into account seasonality? I would assume that given our product and strong seasonality, the price elasticity would differ from e.g. Feb to Sept.
axel2020
CC BY-SA 4.0
2019-02-10T23:38:34.877Z
2019-02-10T23:38:34.877Z
armeisne
<p>What you're trying to approximate is the quantity </p>

<p><span class="math-container">$$
\gamma(t) = \frac{{\rm d}\ln Q(t)}{{\rm d}\ln P(t)}
$$</span></p>

<p><span class="math-container">$\gamma = \gamma(t)$</span> is a function of time, the better sampling you have of <span class="math-container">$P$</span> and <span class="math-container">$Q$</span> the better estimation of <span class="math-container">$\gamma$</span> you are going to get. Imagine you have one sample every <span class="math-container">$h$</span> units of time. From what I can read <span class="math-container">$h  = 1 ~{\rm month}$</span>, what you can do to measure <span class="math-container">$\gamma$</span> at time <span class="math-container">$t_k$</span> is calculate</p>

<p><span class="math-container">$$
\frac{{\rm d}\ln P(t_k)}{{\rm d}t} \approx \frac{\ln P(t_k) - \ln P(t_k - h)}{h} \tag{1}
$$</span></p>

<p>with a similar expression for <span class="math-container">$Q$</span>. But this is really bad in general, here's a better approach</p>

<p><span class="math-container">$$
\frac{{\rm d}\ln P(t_k)}{{\rm d}t} \approx \frac{-2\ln P(t_k + 2h) + 8\ln P(t_k + h) - 8\ln P(t_k - h) + \ln P(t_k - 2h)}{12h} \tag{2}
$$</span></p>

<p>So to give you an idea, if you are measuring the elasticity on (<span class="math-container">$t_k$</span> = November 2018) with data measured each month, you will need to know the prices and quantities for (<span class="math-container">$t_k - 2h = $</span> September 2018), (<span class="math-container">$t_k - h = $</span> October 2018), (<span class="math-container">$t_k + h = $</span> December 2018) and (<span class="math-container">$t_k + 2h = $</span> January 2019).</p>

CC BY-SA 4.0
2019-01-11T08:59:27.117Z
Thanks for your input. I am not sure that I got it completely. So, in my case I have  P(tk+2h) = 28,46 ; P(tk+h) = 35,53 ; P(tk−h) = 30,73  ; P(tk−2h) = 31,69. This gives me a d lnP(tk) = -0,08. With the similar approach for Q, I get d lnQ(tk) = -0,60, which gives me a γ = 7,9. Is this my elasticity in November 2018? If so, does it make sense that it's positive? Can I use this to make assumptions on price/quantity changes for November 2019?
axel2020
CC BY-SA 4.0
2019-01-11T09:09:24.767Z
@axel2020 Yes, it is the elasticity in November 2018, it will help you to create a little plot with $\gamma$ as a function of time, that way you can see the evolution.  From the numbers you just mentioned, what I think it is happening is that you have very noisy data, and in that case we may need to use another approach. If it is possible for you to include some of the data in your post it would be great
caverac
CC BY-SA 4.0
2019-01-11T09:41:42.483Z
@axel2020 The problem with numerical derivatives in general is that they are highly numerical unstable, so even small bumps in your data (noise) will give you wild results. If you are not allowed to share you data, here are some options you may want to try
1. https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter
2. https://en.wikipedia.org/wiki/Gaussian_filter
3. Fit it and then take the derivative
4. https://github.com/gausspy/gausspy
This last library we created a while ago to handle this problem
caverac
CC BY-SA 4.0
2019-01-09T23:12:33.813Z
2019-01-09T23:12:33.813Z
caverac
<p>I am calculating the price elasticity as a starting point to find a theoretical optimal price that would maximize our revenue.<br>
I am looking at <strong>2 years data</strong> and to use the price elasticity formula, I am considering <strong>monthly values separately</strong> <em>(this also because given the strong seasonality we have, i would expect different elasticity per month and I would like to suggest different prices every month).</em>   </p>

<p>To get the <strong>monthly Price Elasticity</strong>, I calculate for each month Prices and Quantities of the respective year: </p>

<p><span class="math-container">$$
\frac{(Q^{2018} - Q^{2017})/Q^{2017}}{(P^{2018} - P^{2017})/P^{2017}}
$$</span></p>

<p><strong>Question 1:</strong> Is this correct? Using aggregated monthly data is enough? What if I had also 2016 data? How could I put this extra information in the formula? </p>

<p><strong>Question 2:</strong> Could I use daily data to calculate the price elasticity? Could I plot 2 years data and use the linear trend line for the elasticity calculation? </p>

<p>Thanks in advance, any help is highly appreciated!</p>

<microeconomics><elasticity><price><pricing>
Monthly price elasticity and possibility of using daily values
axel2020
# Monthly price elasticity and possibility of using daily values

(Asked by: username_0 on 2019-01-09)

I am calculating the price elasticity as a starting point to find a theoretical optimal price that would maximize our revenue.  
I am looking at **2 years data** and to use the price elasticity formula, I am considering **monthly values separately** *(this also because given the strong seasonality we have, i would expect different elasticity per month and I would like to suggest different prices every month).*

To get the **monthly Price Elasticity**, I calculate for each month Prices and Quantities of the respective year:

$$
\frac{(Q^{2018} - Q^{2017})/Q^{2017}}{(P^{2018} - P^{2017})/P^{2017}}
$$

**Question 1:** Is this correct? Using aggregated monthly data is enough? What if I had also 2016 data? How could I put this extra information in the formula?

**Question 2:** Could I use daily data to calculate the price elasticity? Could I plot 2 years data and use the linear trend line for the elasticity calculation?

Thanks in advance, any help is highly appreciated!

**Tags:** microeconomics, elasticity, price, pricing

---

## 2 answers

### Answer by username_1 on 2019-02-10. Score: 1

There are a couple of things that you are going to want to keep in mind as you do this type of analysis. You want to be careful not to base your conclusions on too little data. It sounds like you would be basing your monthly elasticity estimates on two data points (the month in 2018 and the month in 2017). Unless your sales data is remarkably stable, this is likely to be highly influenced by noise in the data.

Additionally, the time period that you use in estimating elasticity should be determined by the frequency of price changes and the frequency of sales. For example, if you only observe price changes once per year, this type of analysis will likely be ineffective. I would recommend plotting your observed price and sales points at the weekly or monthly level. This will give you a sense of how noisy your data is. If the plots that you create look relatively stable, then, as you discussed, you can think about fitting a demand curve to the data and calculating elasticity using the equation of the fitted curve.

> **Comments:**
> **username_0**: Thanks for your remarks. I am afraid that my data is very noisy though. That's why I thought of taking average monthly prices to reduce the strong daily fluctuations as much as possible. But let's assume that I plot prices and sales points on a weekly basis and I see that I can use this data, therefore calculate the elasticity: how can I take into account seasonality? I would assume that given our product and strong seasonality, the price elasticity would differ from e.g. Feb to Sept.  

---

### Answer by username_2 on 2019-01-09. Score: 0

What you're trying to approximate is the quantity

$$
\gamma(t) = \frac{{\rm d}\ln Q(t)}{{\rm d}\ln P(t)}
$$

$\gamma = \gamma(t)$ is a function of time, the better sampling you have of $P$ and $Q$ the better estimation of $\gamma$ you are going to get. Imagine you have one sample every $h$ units of time. From what I can read $h = 1 ~{\rm month}$, what you can do to measure $\gamma$ at time $t\_k$ is calculate

$$
\frac{{\rm d}\ln P(t\_k)}{{\rm d}t} \approx \frac{\ln P(t\_k) - \ln P(t\_k - h)}{h} \tag{1}
$$

with a similar expression for $Q$. But this is really bad in general, here's a better approach

$$
\frac{{\rm d}\ln P(t\_k)}{{\rm d}t} \approx \frac{-2\ln P(t\_k + 2h) + 8\ln P(t\_k + h) - 8\ln P(t\_k - h) + \ln P(t\_k - 2h)}{12h} \tag{2}
$$

So to give you an idea, if you are measuring the elasticity on ($t\_k$ = November 2018) with data measured each month, you will need to know the prices and quantities for ($t\_k - 2h = $ September 2018), ($t\_k - h = $ October 2018), ($t\_k + h = $ December 2018) and ($t\_k + 2h = $ January 2019).

> **Comments:**
> **username_0**: Thanks for your input. I am not sure that I got it completely. So, in my case I have  P(tk+2h) = 28,46 ; P(tk+h) = 35,53 ; P(tk−h) = 30,73  ; P(tk−2h) = 31,69. This gives me a d lnP(tk) = -0,08. With the similar approach for Q, I get d lnQ(tk) = -0,60, which gives me a γ = 7,9. Is this my elasticity in November 2018? If so, does it make sense that it's positive? Can I use this to make assumptions on price/quantity changes for November 2019?  
> **username_2**: @axel2020 Yes, it is the elasticity in November 2018, it will help you to create a little plot with $\gamma$ as a function of time, that way you can see the evolution.  From the numbers you just mentioned, what I think it is happening is that you have very noisy data, and in that case we may need to use another approach. If it is possible for you to include some of the data in your post it would be great  
> **username_2**: @axel2020 The problem with numerical derivatives in general is that they are highly numerical unstable, so even small bumps in your data (noise) will give you wild results. If you are not allowed to share you data, here are some options you may want to try 1. https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter 2. https://en.wikipedia.org/wiki/Gaussian_filter 3. Fit it and then take the derivative 4. https://github.com/gausspy/gausspy This last library we created a while ago to handle this problem  

---

