Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Maximum Drawdown

Hi,

is it possible to compute this maximum drawdown in Qlikview instead of Excel?

Thanks for helping me!

1 Solution

Accepted Solutions
sunny_talwar

Your order is incorrect, try this:

Table:

LOAD *,

  Num(Max/Course - 1, '#,##0.0%') as Drawdown;

LOAD *,

  RangeMax(Course, Peek('Max')) as Max;

LOAD Date,
          Course
FROM

(ooxml, embedded labels, table is Tabelle1);


View solution in original post

6 Replies
sunny_talwar

Are you looking for a script based solution or front end?

swuehl
MVP
MVP

Try a straight table chart with dimension Date and expressions

Course:

=Course // or how you do the course calculation

Max:

=RangeMax( Above( YourCourseExpression, 0, RowNo() ))

DrawDown:

=Column(2) / Column(1) -1

joris_lansdaal
Creator
Creator

Hi, you can try:

Sum(Aggr(Sum(Course),Date)/Aggr(Sum(Max),Date))/Count(DISTINCT Date)-1

sunny_talwar

Script based:

Table:

LOAD *,

  Num(Max/Course - 1, '#,##0.0%') as Drawdown;

LOAD *,

  RangeMax(Course, Peek('Max')) as Max;

LOAD * INLINE [

    Date, Course

    12/1/2015, 100

    12/2/2015, 110

    12/3/2015, 120

    12/4/2015, 115

    12/5/2015, 110

    12/6/2015, 120

    12/7/2015, 160

    12/8/2015, 200

    12/9/2015, 180

    12/10/2015, 220

];


Capture.PNG

Not applicable
Author

Hi sunny,

thanks for helping me! Also thanks to swuehl and Joris.

But sunny's method doesn't work for now. I think it's because I use the Excelsheet and didn't know how to Change the script that it fits. Your Scriptcode with Inline works fine but is unuseful for me.

This is the way my script looks like:

LOAD     Date,
               Course
FROM

(ooxml, embedded labels, table is Tabelle1);


Table:
LOAD *,
  Num(Max/Course - 1, '#,##0.0%') as Drawdown;
LOAD *,
  RangeMax(Course, Peek('Max')) as Max;

There is no Errormessage, but the Fields don't load.

sunny_talwar

Your order is incorrect, try this:

Table:

LOAD *,

  Num(Max/Course - 1, '#,##0.0%') as Drawdown;

LOAD *,

  RangeMax(Course, Peek('Max')) as Max;

LOAD Date,
          Course
FROM

(ooxml, embedded labels, table is Tabelle1);