<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Value at Risk Calculations in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157669#M33062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As an update to this, we found that using the Fractile function to return the nth value performed significantly better than using Min.&lt;/P&gt;&lt;P&gt;In your case, the formula would become:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;fractile(aggr(sum(VaRPnL), VaRPnLDate ,CobDate ,Region ,Division ,Business ,[Sub Business] ,[Desk Location] ,Desk ,[Sub Desk] ,Book), 0.998-(vVAR%/100))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;What we also discovered was that it may be acceptable to the business to simply show them the complete 500 scenario sorted list at each level of the hierarchy, using conditional formatting to highlight the relevant scenario based on the entered VAR%.&lt;/P&gt;&lt;P&gt;Using this method then makes it more simple to calculate values for MVaR, IVaR, ETL and CLL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Oct 2010 04:22:16 GMT</pubDate>
    <dc:creator>jbb</dc:creator>
    <dc:date>2010-10-06T04:22:16Z</dc:date>
    <item>
      <title>Value at Risk Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157667#M33060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks&lt;/P&gt;&lt;P&gt;Quick Question:&lt;/P&gt;&lt;P&gt;Has anybody out there created a QlikView app that calculates Value at Risk?&lt;/P&gt;&lt;P&gt;I have charts that are doing this but the performance is really bad due to the aggregation taking place and then having to take the nth value from the resulting data set. I am wondering if there is a better, more efficient way to do this.&lt;/P&gt;&lt;P&gt;Here is a copy of the formula currently in use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;-min(&lt;BR /&gt; aggr(&lt;BR /&gt; sum(VaRPnL)&lt;BR /&gt; ,VaRPnLDate&lt;BR /&gt; ,CobDate&lt;BR /&gt; ,Region&lt;BR /&gt; ,Division&lt;BR /&gt; ,Business&lt;BR /&gt; ,[Sub Business]&lt;BR /&gt; ,[Desk Location]&lt;BR /&gt; ,Desk&lt;BR /&gt; ,[Sub Desk]&lt;BR /&gt; ,Book&lt;BR /&gt; )&lt;BR /&gt; ,( ( ( 1 - vVaR% ) * 500 + 1 ) + 1 )&lt;BR /&gt;)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 09:15:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157667#M33060</guid>
      <dc:creator />
      <dc:date>2010-08-12T09:15:56Z</dc:date>
    </item>
    <item>
      <title>Value at Risk Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157668#M33061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nigel,&lt;/P&gt;&lt;P&gt;I'm working on the same calculation and have run into the same issue with calculation performance. If you managed to find anything that improved the performance, it would be very useful to share the results.&lt;/P&gt;&lt;P&gt;Equally, if I work something out, I'll post my results here.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;James.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 07:46:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157668#M33061</guid>
      <dc:creator>jbb</dc:creator>
      <dc:date>2010-09-08T07:46:56Z</dc:date>
    </item>
    <item>
      <title>Value at Risk Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157669#M33062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As an update to this, we found that using the Fractile function to return the nth value performed significantly better than using Min.&lt;/P&gt;&lt;P&gt;In your case, the formula would become:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;fractile(aggr(sum(VaRPnL), VaRPnLDate ,CobDate ,Region ,Division ,Business ,[Sub Business] ,[Desk Location] ,Desk ,[Sub Desk] ,Book), 0.998-(vVAR%/100))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;What we also discovered was that it may be acceptable to the business to simply show them the complete 500 scenario sorted list at each level of the hierarchy, using conditional formatting to highlight the relevant scenario based on the entered VAR%.&lt;/P&gt;&lt;P&gt;Using this method then makes it more simple to calculate values for MVaR, IVaR, ETL and CLL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 04:22:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157669#M33062</guid>
      <dc:creator>jbb</dc:creator>
      <dc:date>2010-10-06T04:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Value at Risk Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157670#M33063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying to work this out myself. The formula that worked for me at the highest level (ie. not breaking down by any dimensions) was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( {&amp;lt;SCENARIO={'$(=FirstSortedValue(SCENARIO, AGGR(sum(VAR_P&amp;amp;L), SCENARIO), $(=vPercentileLowMember)))'}&amp;gt;} VAR_P&amp;amp;L) &lt;/P&gt;&lt;P&gt;-(&lt;/P&gt;&lt;P&gt;sum( {&amp;lt;SCENARIO={'$(=FirstSortedValue(SCENARIO, AGGR(sum(VAR_P&amp;amp;L), SCENARIO), $(=vPercentileHighMember)))'}&amp;gt;} VAR_P&amp;amp;L) - &lt;/P&gt;&lt;P&gt;sum( {&amp;lt;SCENARIO={'$(=FirstSortedValue(SCENARIO, AGGR(sum(VAR_P&amp;amp;L), SCENARIO), $(=vPercentileLowMember)))'}&amp;gt;} VAR_P&amp;amp;L)&lt;/P&gt;&lt;P&gt;)*(vPercentileFraction/1)&lt;/P&gt;&lt;P&gt;Where this expression relies upon the following variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vPercentileMember=(max(SCENARIO_COUNT+1)*(1-vPercentile))&lt;BR /&gt;vPercentileLowMember=FLOOR((max(SCENARIO_COUNT+1)*(1-vPercentile)))&lt;BR /&gt;vPercentileHighMember=CEIL((max(SCENARIO_COUNT+1)*(1-vPercentile)))&lt;BR /&gt;vPercentileFraction=vPercentileLowMember-vPercentileMember&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 04:24:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157670#M33063</guid>
      <dc:creator>Lee_Matthews</dc:creator>
      <dc:date>2013-07-29T04:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Value at Risk Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157671#M33064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you guys using the Monte Carlo method?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rodrigo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 16:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157671#M33064</guid>
      <dc:creator />
      <dc:date>2014-05-23T16:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Value at Risk Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157672#M33065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rodrigo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you solve a problem? I am also trying to calculate and aggregate Monte Carlo VaR in likewise manner, but got correct results only on top level&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pl.Alexiev&lt;/P&gt;&lt;P&gt;20.09.1018&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2018 08:36:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-at-Risk-Calculations/m-p/157672#M33065</guid>
      <dc:creator>plamen_alexiev</dc:creator>
      <dc:date>2018-09-20T08:36:29Z</dc:date>
    </item>
  </channel>
</rss>

