Problem Note 49835: Interpolated value can be wrong when RLAG function uses a lagged value before the base date
The RLAG function is used in PROC COMPILE methods, which in turn, are used in SAS® Risk Dimensions®. If the requested lag matches a date in the time grid for risk factor RFX, there is no problem. For example, if the only call to RLAG for RFX is
RLAG( rfx, 2, "day" )
and "2 day" is in the time grid of risk factor RFX, there is no problem.
When SAS Risk Dimensions computes a lag, it tries to use base-case data. However, it can fail to use perturbed values when lagging. If the RLAG function requests a lagged value that is not in the risk factor's time grid, an interpolation is performed. The problem can occur when you use a date that is before the base date, and the resulting interpolated value might be incorrect.
The problem can occur when the lagged date is before the base date and the time grid step immediately before the base date. In a non-simulation, the problem would occur if the lagged date is between the base date and first time grid step prior to the base case. For example, in a scenario analysis if RLAG has an interval more recent than the first time grid entry. In a simulation, the manifestation might be more subtle. Suppose
- the base date is Jan 10,
- the _date_ for a horizon is Jan 12,
- the time grid for risk factor my_rf would look to Jan 11 and Jan 8, and
- a method calls rlag(my_rf, 3, "day"), which expects the value of my_rf on
Jan 9.
Jan 9 is between the base date (Jan 10) and the first time grid step prior to the base case (Jan 8).
In both cases, SAS Risk Dimensions would interpolate by using the base-case value of the risk factor instead of the perturbed value.
The workaround is to avoid using intervals that cause this problem. Note that intervals can be added to the time grid.
Operating System and Release Information
SAS System | SAS Risk Dimensions Enterprise Edition | Microsoft® Windows® for x64 | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 for x64 | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2008 | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2008 for x64 | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows XP Professional | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Enterprise 32 bit | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Enterprise x64 | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Home Premium 32 bit | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Home Premium x64 | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Professional 32 bit | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Professional x64 | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Ultimate 32 bit | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Ultimate x64 | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows Vista | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Windows Vista for x64 | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
64-bit Enabled AIX | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
64-bit Enabled HP-UX | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
64-bit Enabled Solaris | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
HP-UX IPF | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Linux | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Linux for x64 | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
Solaris for x64 | 5.5 | 6.1 | 9.3 TS1M2 | 9.4 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Topic: | Analytics ==> Financial Analysis
|
Date Modified: | 2013-06-28 15:32:18 |
Date Created: | 2013-05-02 10:03:56 |