1. How big constant should we add to negative values when applying the 'Box-Cox transformation'? The data that I am handling is 'daily return of stocks'
  2. Shouldn't we subtract some amount after the Box-Cox transformation if we add a constant to negative values to apply the Box-Cox transformations?

Background Information

  • Since daily return of stocks does not follow the normal distribution, I tried to apply Box-Cox transformation. However, some of daily returns are negative so I could not transform them.
  • According to the article about the Box-Cox transformation, I can add a constant to make those negative numbers non-negative. The excerpt from the article is as follows:

Box-Cox transformations are designed for non-negative responses, but can be applied to data that have occassional zero or negative values by adding a constant α to the response before applying the power transformation. Although α could be estimated, in practice one often uses a small value such as a half or one (depending, obviously, on the scale of the response).

  • My data is the daily return of the company Apple (ticker : AAPL) from 2000.01.01 to 2011.12.31. The minimum value was -0.518692 (Yes, it's true. The price of Apple stock dropped 52% in one of the days in Sep. 2000) The summary and histogram of my data before the Box-Cox transformation is as follows:

enter image description here

  • To make my data just not negative, I added 0.52 to all of daily returns. The number 0.5 also appeared on the article above that I hyperlinked, so I thought it would be an appropriate constant. But the problem is that the center of the histogram moved a lot from zero, which is far away from the center of the original histogram. The summary and histogram of the data after the Box-Cox transformation is as follows:

enter image description here

  • If I used the constant 1 instead of 0.5 as a constant to add my data, the center of the histogram would be around 0, not far away from the original histogram (the histogram of data before Box-Cox transformation). Then my question is how big a constant should be?

  • Also, shouldn't we subtract a constant after the transformation? If you add a constant to data to make them possible to get Box-Cox transformed, the original data's amount gets bigger. It's bigger than the original data. After the transformation, don't we need to do some operation to make them smaller to its original size? But the thing is after the Box-Cox transformation, the histogram of data moved to the left, which means that the data got smaller than the original data already...

  • So I am curious to know whether changing the data by adding a constant requires any other operation (e.g. subtraction) and if it does not require anything, why not?

  • $\begingroup$ Use the considerations at stats.stackexchange.com/questions/30728. Although that thread concerns the logarithm (Box Cox parameter of 0), it applies to other Box-Cox transformations, too. $\endgroup$ – whuber Mar 26 '19 at 13:20

Determine the smallest number in your time series , say -10. for example . The constant you would need is then 10.0000000001 or larger in order to make all the adjusted values positive. It doesn't make make any difference as the reverse transformation needed to obtain forecasts will use the same adjustment factor.

Please see https://www.ime.usp.br/~abe/lista/pdfm9cJKUmFZp.pdf where Box & Cox suggested an alternative to deal with negative numbers without adding a constant .

EDITED after OP's question re logs ...

From the above reference ...perhaps this helps ... ..logs are used

enter image description here

  • $\begingroup$ That is exactly what I did in the question above that I wrote. Since the minimum is -0.5186...I added 0.52 to all the daily return of the stock. So are you saying that adding 0.52 or 52000 to data does not make difference after the Box-Cox transformation as long as the absolute value of constant being added is bigger than that of the smallest negative number? $\endgroup$ – Eiffelbear Mar 26 '19 at 7:34
  • $\begingroup$ yes ... just so that all values are positive before the optional lambda is found . $\endgroup$ – IrishStat Mar 26 '19 at 7:38
  • $\begingroup$ Can you also answer the question no.2, which is about 'whether I should subtract anything after the Box-Cox transformation'. Since adding a constant to data inflate the data before mapping by the transformation, don't we need to subtract anything after the transformation? $\endgroup$ – Eiffelbear Mar 26 '19 at 9:12
  • $\begingroup$ I don't think that you have to reverse the addition unless it has permanently changed your data. In time series we often want to forecast ... the forecast will be presented in terms of the adjusted data ... thus then it would be necessary to subtract the additive constant that we introduced from these values. $\endgroup$ – IrishStat Mar 26 '19 at 12:49
  • 2
    $\begingroup$ -1 This rarely works well. The amount you add (Tukey's "start value") can make a huge difference. See my explanation at stats.stackexchange.com/questions/30728. $\endgroup$ – whuber Mar 26 '19 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.