• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Dealing with non-real values when computing continous integral form for downside deviation

Joined
9/16/09
Messages
3
Points
11
I am trying to compute the downside deviation for a security according to Sortino and Satchell's book, Managing Downside Risk in Financial Markets (ISBN 0750648635). It is defined as:

(\sqrt{\int_{-\infty}^t(t-r)^2f(r) \, \mathrm{d}r)

Where t is the desired return, and f(r) is a Log-normal distribution using three parameters (\mu, \sigma, \tau). According to the books terminology, (\tau) is called the extreme value, and in the example provided on p 55, it is stated that

We estimate [the extreme value] as follows. First, calculate the minimum and the maximum of the sample and take the one closest to the mean. The extreme value is obtained from this value by moving it four standard deviations further from the mean. For example, if the mean, standard deviation, minimum, and maximum of a sample are 12%, 8%, −15%, and 70%, respectively, then the extreme value is (−15%) − (7)(8%) = −71%, since the minimum is closer to the mean than the maximum.

Now it stated that you move 4 standard deviations further from the mean, but in the example it seems that they are moving it 7 standard deviations from the mean. Is that an error in the book, or is there a calculation that I am not seeing here. Wouldn't that calculation be (−15%) − (4)(8%) = −57%? Does anyone know where I might be going wrong, or should I just assume the calculation is in error, and text is right?

The paramters (\sigma) and (\mu) are calculated from the sample's mean and standard deviation:
(\sigma = \ln\large(\large(\frac{\text{std}(x)}{|\overline{x}-\tau|}\right)^2+1\right))
(\mu = \ln\large(|\overline{x}-\tau|\right)-\sigma^2)

Now take a mean, standard deviation and (\tau) for a given asset: I'm using Example 1 in the table on the same page as the formula for the extreme value (p 55). The mean of the returns 12%, the standard deviation is 22% and the extreme value is -50%. The authors calculate the downside deviation as 10.5%. I have a slight problem though. Since the integral extends to negative infinity, at some point, namely when (x<\tau) the (ln(x-\tau)) in the log-normal distribution is going to become imaginary and the result I get is complex. I have tried defining the log-normal as a piecewise, and I have also tried changing the integral to

(\sqrt{\int_{\tau}^t(t-r)^2f(r) \, \mathrm{d}r)

But my result in that case is 2%, much lower than the downside deviation calculated by the authors, 10.5%. Can anyone shed some light on where I'm going wrong?
 
Indeed, there's something wrong with calculation of extreme value . This how I would do it; denote (m=\min\{x_1,\dots,x_n\}, M=\max\{x_1,\dots,x_n\}) and (\overline{x}, std(x)) as sample mean and st. deviation. Extreme value would be;
(\tau=\overline{x}+4std(x)\min\{\overline{x}-m,M-\overline{x}\}).

As for the second question, I don't how did you get complex values, pdf of log-normal distribution is only defined positive values, and is in the form (\frac{c}{x}something(\log{x}-\mu)) (where something is some function, that I'm to lazy to write). So, there shouldn't be a problem there.
 
Thank you for responding so quickly!

Indeed, there's something wrong with calculation of extreme value . This how I would do it; denote (m=\min\{x_1,\dots,x_n\}, M=\max\{x_1,\dots,x_n\}) and (\overline{x}, std(x)) as sample mean and st. deviation. Extreme value would be;
(\tau=\overline{x}+4\min\{\overline{x}-m,M-\overline{x}\}).

I see, so you're saying that it would be better to calculate the extreme value from the maximum/minimum itself, and not even use the standard deviation?

As for the second question, I don't how did you get complex values, pdf of log-normal distribution is only defined positive values, and is in the form (\frac{c}{x}something(\log{x}-\mu)) (where something is some function, that I'm to lazy to write). So, there shouldn't be a problem there.

Its probably not standard, but the log-normal distribution I am using is from Sortino/Satchell p 57:

(
\tag{1}
\text{lognormal}(x) = \left\{ \begin{array}{l}
\frac{\alpha}{\tau-x}\exp(\beta(\ln(\tau-x) - \mu)) \; \mathrm{if}\, \tau > \overline{x} \\
\frac{\alpha}{x-\tau}\exp(\beta(\ln(x-\tau) - \mu))\; \mathrm{if}\, \tau < \overline{x}
\end{array}\right.
)
where,
(
\tag{1a}
\alpha=\frac{1}{\sigma\sqrt{2\pi}}
)
(
\tag{1b}
\beta=-\frac{1}{2\sigma^2}
)

If I understand correctly are you saying that the log-normal is not defined wherever the ((x-\tau)) or the ((\tau-x)) argument to ln in (1), above is less than zero?
 
Thank you for responding so quickly!



I see, so you're saying that it would be better to calculate the extreme value from the maximum/minimum itself, and not even use the standard deviation?

Sorry! I forgot standard deviation. I'll fix it in the original post.

Its probably not standard, but the log-normal distribution I am using is from Sortino/Satchell p 57:

(
\tag{1}
\text{lognormal}(x) = \left\{ \begin{array}{l}
\frac{\alpha}{\tau-x}\exp(\beta(\ln(\tau-x) - \mu)) \; \mathrm{if}\, \tau \geq x \\
\frac{\alpha}{x-\tau}\exp(\beta(\ln(x-\tau) - \mu))\; \mathrm{if}\, \tau < x
\end{array}\right.
)
where,
(
\tag{1a}
\alpha=\frac{1}{\sigma\sqrt{2\pi}}
)
(
\tag{1b}
\beta=\frac{1}{2\sigma^2}
)

If I understand correctly are you saying that the log-normal is not defined wherever the ((x-\tau)) or the ((\tau-x)) argument to ln in (1), above is less than zero?

No, I'm saying I don't know where did (\log(something ~negative)) come from. As I see it, the definition in the book is (almost) ok. You have to exclude the case (x=\tau) just to make things well defined. Also, you are missing a minus in (\beta) (otherwise your pdf wont be even decreasing).
 
No, I'm saying I don't know where did (\log(something ~negative)) come from. As I see it, the definition in the book is (almost) ok. You have to exclude the case (x=\tau) just to make things well defined. Also, you are missing a minus in (\beta) (otherwise your pdf wont be even decreasing).

Whoops! Fixed that in my previous post along with the definition of the log-normal function which needed the mean of the returns, not the current return. Wouldn't the ((x-\tau)) or ((\tau-x)) go negative at some point when computing the semi-infinite integral:

(d^2=\int_{-\infty}^t (t-x)^2\, \text{lognormal}(x) \,\, dx)

Since at some point x will be less than (\tau)? Or do we ignore all values less than those points?
 
As now stated, the "definition" of lognormal distribution makes no sense. There's a lot of confusion with notation, for a moment I thought your were talking about two-sided lognormal dist., but now I'm not sure of anything. It would be best if you could start from scratch.
 
Back
Top