Table of Contents


File

dateFromIndex.m

Name

dateFromIndex

Synopsis

Returns Date string corresponding to an index into a 12 x 122 array of months and years (1919-2040).

Introduction

NOTE: PART OF A SET OF 8 RELATED FILES:

Khandani, Lo, and Merton (2009) posit that rising home prices, declining interest rates, and near-frictionless refinancing opportunities led to vastly increased systemic risk in the financial system. A simultaneous occurrence of these factors imposes an unintentional synchronization of homeowner leverage. This synchronization, coupled with the indivisibility of residential real estate that prevents homeowners from deleveraging when property values decline and homeowner equity deteriorates, conspire to create a ratchet effect in which homeowner leverage is maintained or increased during good times without the ability to decrease leverage during bad times. To measure the systemic impact of this ratchet effect, the U.S. housing market is simulated with and without equity extractions, and the losses absorbed by mortgage lenders is estimated by valuing the embedded put option in non-recourse mortgages. The proposed systemic risk indicator for the housing market is the dollar-delta of this embedded put option.

License

=============================================================================

Copyright 2011, Dimitrios Bisias, Andrew W. Lo, and Stavros Valavanis

COPYRIGHT STATUS: This work was funded in whole or in part by the Office of Financial Research under U.S. Government contract TOSOFR-11-C-0001, and is, therefore, subject to the following license: The Government is granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license to reproduce, prepare derivative works, distribute copies to the public, perform and display the work.
All other rights are reserved by the copyright owner.

THIS SOFTWARE IS PROVIDED "AS IS". YOU ARE USING THIS SOFTWARE AT YOUR OWN RISK. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS, OR THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

=============================================================================

Inputs

iIndex
Name:
iIndex
Description:

Indicates index of day in sequence of days starting from 1919 to 2040. There are 1464 months (12*122=1464) in this date range.

Type:
integer
Range:
{1,...,1464}
Dimensions:

scalar


Outputs

strDate
Name:
strDate
Description:

Returns date in form D-M-YYYY (e.g., 1-8-1919). The initial component (the day) is always 1, because the lookup arrays only resolve to month and year.

Type:
string
Range:
A valid date between Jan 1919 (1-1-1919) and Dec 2040 (1-12-2040)
Dimensions:

scalar


Code

% Run warning message
warning('OFRwp0001:UntestedCode', ...
    ['This version of the source code is very preliminary, ' ...
     'and has not been thoroughly tested. Users should not rely on ' ...
     'these calculations.']);


%
    %[years,months] = meshgrid([1963:1:2040],[1:1:12]);
    %[years,months] = meshgrid([1930:1:2040],[1:1:12]);
    [years,months] = meshgrid([1919:1:2040],[1:1:12]);

    [i,j] = ind2sub(size(years),iIndex);
    strDate = sprintf('1-%d-%d',months(i,j),years(i,j));
end

Examples

NOTE: Numbers used in the examples are arbitrary valid values.
They do not necessarily represent a realistic or plausible scenario.

The 35th element appears at month i=11 (Nov.), and year j=3 (1921)

 iIndex = 35;
 [i,j] = dateFromIndex(iIndex);

References

Khandani, A. E., Lo, A. W., & Merton, R. C. (2012). Systemic risk and the refinancing ratchet effect. Journal of Financial Economics.

Bisias et al. (2012). A survey of systemic risk analytics (Working paper #0001). Washington, DC: Office of Financial Research, 89-94.