Multiply every value by a constant
For the purpose of a simulation I need to increase the standard deviation of an empirical distribution. I want to simulate what will happen if the distribution would widen. How can I do that?
I am already aware, that the empirical distribution is usually replaced by a similar analytical distribution in a simulation. However my empirical distribution is so "unusual", that I cannot find a analytical distribution pendant.
Prediction is very difficult, especially about the future. (Niels Bohr)
Multiply every value by a constant
I don't have emotions and sometimes that makes me very sad.
Interesting, I have thought about the same transformation. Multiplying each x- median(x) by a certain factor and adding back the median afterwards. Before I have thought about multiplying each x- mean(x) by a certain factor and adding back the mean afterwards, but the median would be more appropriate for a skewed distribution, I think.
The simulation I want to do is about to simulate the risk of a portfolio out of special securities. The returns of the securities in the portfolio have unusual dsitributions. For my simulation it is necessary, that I can increase the standard deviation of each empirical return distribution by a certain proportion, e.g. by 10%.
Unfortunatley the standard deviation does not increase by 10% when multiplying each value by 1.1 as mentioned above. I need some kind of converging algorithm, that produces a transformed empirical distribution with my target standard deviation.
Is it possible to make use of the Newton–Raphson method to construct a converging algorithm that produces the desired target standard deviation within a given tolerance?
Last edited by consuli; 02-21-2015 at 02:48 PM.
Prediction is very difficult, especially about the future. (Niels Bohr)
I don't have emotions and sometimes that makes me very sad.
Thanks Dason. I did not know before that
.multiply all the values by a certain constant then the standard deviation will increase multiplicatively by that constant
At the moment my favorite transformation is
xt2= (x- mean(x))* 2 + mean(x)
as it produces multiple standard deviation while conserving mean and skewness.
Code:##### Setup skew= function(x) { n= length(x) n/(n-1)/(n-2) * sum( ((x- mean(x))/sd(x))^3) } ##### x= rgamma(1000, shape=3, scale = 1) xt1= x* 2 xt2= (x- mean(x))* 2 + mean(x) # Control sd(x) sd(xt1) sd(xt2) skew(x) skew(xt1) skew(xt2) mean(x) mean(xt1) mean(xt2)
Prediction is very difficult, especially about the future. (Niels Bohr)
Tweet |