How can I create a logical sum function with dates?

조회 수: 7 (최근 30일)
Joseph Vanderstelt
Joseph Vanderstelt 2015년 3월 24일
I am trying to determine the notional amount of a debt portfolio as of a valuation date. Here is what i have so far (simplistic example)...
Valuation_Date = ['01/31/2015'; '02/28/2015'; '03/31/2015'; '04/30/2015'];
Date = datenum(Valuation_Date);
Maturity_Date = ['02/05/2015'; '03/15/2015'; '06/25/2015'; '07/20/2015'];
Maturity = datenum(Maturity_Date);
Notional_Amount = [1500 2000 3000 4500]';
Notional_Portfolio = [Maturity, Notional_Amount]
I would like to create the following function: Notional(Date) = sum(Notional_Portfolio(r,2)), where r = all row numbers where Maturity_Date is greater than Valuation_Date...
This is basically a Vlookup in excel. For a given valuation date, determine the amount of outstanding debt. Any help would be greatly appreciated.
Cheers, Joe

답변 (0개)

카테고리

Help CenterFile Exchange에서 Financial Data Analytics에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by