Question : Excel formula to calculate Downside Deviation from monthly return data

I am looking for a formula to calculate downside deviation from monthly returns in Excel:

Downside Deviation is the most difficult number to calculate. Here are the steps:
   1. Subtract MAR (minimum acceptable return) from each period’s return.
   2. If negative, record the value. If positive, set value to 0.
   3. Square all the period returns and sum them.
   4. Divide by the number of periods.
   5. Take the square root of your result.

and 6 (my guess multiply by square root of 12 as it is calculated on monthly returns, right?).

I started already with a part of it, but it's not correct yet, as it annualises just the returns below MAR (0% in my example): =STDEV(IF(FundMthlyReturns<0,FundMthlyReturns))*SQRT(12)

Thanks for your complete solution that works!

Answer : Excel formula to calculate Downside Deviation from monthly return data

BrdgBldr,

This code should get the calculations:



Function DownDev(MAR As Double, PeriodReturns As Range)
   
    Dim TestReturn As Double
    Dim cel As Range
    Dim SumReturns As Double
   
    For Each cel In PeriodReturns.Cells
        TestReturn = cel - MAR
        If TestReturn > 0 Then TestReturn = 0
        SumReturns = SumReturns + TestReturn ^ 2
    Next
   
    DownDev = (SumReturns / PeriodReturns.Cells.Count) ^ 0.5
   
End Function



I used a formula of

      =DownDev(B14,C19:C210)

to get 11.35%.  If the MAR is an annual rate, then you should probably use:

      =DownDev(B14/12,C19:C210)

which nets 3.61%.

Patrick
Random Solutions  
 
programming4us programming4us