faaequah13 wrote:Hello Sir
thank you for clearing it, as we know that stock market data is volatile that's why we normalize it, but it is not in the case of the bond interest rate, so My question is should I normalize bond interest or I simply use the log of interest rate rather than multiply it with 100 or do as like this - set logpgsec = 100.0*(log(PGsec/PGsec(1))) as the interest rate is already mentioned in percentage. so I should set it like - Set logPGSec = (log(pgsec)).
"Normalizing" in the sense of dividing through by some value to change the scale isn't done because of "volatility" as it has no effect on that (variance relative to size stays the same). Stock prices and the like are done in logs because in log form, it's easier to compute relative returns to different portfolios, and returns (not absolute prices) are what drives investment decisions. Multiplying that by 100 is done for the purpose of changing the values presented to be more natural-looking (.4 is is easier to read than .00004, which is what you can get for a variance or variance parameter). It also has the side effect for numerical purposes of making the parameters more easily handled for basically the same reason (they are generally within a few orders of magnitude of 1). But barring some numeric problem with a parameter getting so small that it's hard to distinguish from zero, you would get the same results whether or not you do the 100 x scale.
If you do bonds as yields, you've already converted to returns. If you are doing a multivariate analysis with bond yields and stock prices, you would keep the yields as is. OTOH, if you were doing bonds as bond
prices, you would do those as log(price) (or 100 log(price)) for the same reason as you do for stocks.
faaequah13 wrote:Here I have one more query - what is (1) in this code if it is not a previous value - set logpgsec = 100.0*(log(PGsec/PGsec(1)))
It's the value of the 1st entry of the series. If you look at the logpgsec data, you'll see that it starts at 0 since at entry 1, you're taking log(PGsec(1)/PGSec(1)). There is no particularly compelling statistical reason for doing that---all it does is shift the log data up or down to start at 0, and a data shift is fully handled by an equivalent shift in the intercept in the mean model. It just makes one particular graph easier to read.