Re: Skewness & Kurtosis
- From: Peter Perkins <Peter.PerkinsRemoveThis@xxxxxxxxxxxxx>
- Date: Thu, 21 Jun 2007 18:33:01 -0400
Chris Smith wrote:
Hi, I was wondering if anyone could help. I'm trying to generate
simulated stock price data (basically just a random walk)-
specifically 4 different types of stocks:
High trend/ slope, high variance
High trend/ slope, low variance
Low trend/ slope, high variance
Low trend/ slope, low variance.
I'd like to keep the skewness and kurtosis constant (ideally between
all four types). The only things I'd like to change are the mean and
the variance.
I've tried lots of things, but the thing that is causing the
difficulty is generating the different gradient/slopes and keepinf
all the other moments constant.
Chris, if you have access to the Statistics Toolbox, you might consider using the PEARSRND function, which takes the first four moments of a distribution as inputs, and returns a random sample.
Otherwise, changing the mean by adding a constant, or changing the variance by scaling by a constant, doesn't affect any of the other moments:
>> r = randn(1000,1);
>> skewness(r)
ans =
-0.030682
>> skewness(123.456*r)
ans =
-0.030682
>> kurtosis(r)
ans =
2.83
>> kurtosis(123.456*r)
ans =
2.83
So perhaps I've not understood your question.
- Peter Perkins
The MathWorks, Inc.
.
- References:
- Skewness & Kurtosis
- From: Chris Smith
- Skewness & Kurtosis
- Prev by Date: tick label in scientific format
- Next by Date: Re: tick label in scientific format
- Previous by thread: Skewness & Kurtosis
- Next by thread: plot() does not work after subimage()
- Index(es):
Relevant Pages
|