Index is now tied to currency.

This commit is contained in:
Clinton Alexander 2016-07-12 16:28:38 +01:00
parent b78995a8e4
commit 7e247a5fff
3 changed files with 11 additions and 1 deletions

View File

@ -11,6 +11,12 @@ define(['viewmodel/FixedRate'], (fixedRateViewModel) => {
}
};
let indexLookup = {
"GBP": "LIBOR",
"USD": "LIBOR",
"EUR": "EURIBOR"
};
let Deal = function(dealViewModel) {
let now = new Date();
let tradeId = `T${now.getUTCFullYear()}-${now.getUTCMonth()}-${now.getUTCDate()}.${now.getUTCHours()}:${now.getUTCMinutes()}:${now.getUTCSeconds()}:${now.getUTCMilliseconds()}`
@ -38,6 +44,7 @@ define(['viewmodel/FixedRate'], (fixedRateViewModel) => {
floatingLeg.terminationDate = formatDateForNode(common.terminationDate);
floatingLeg.dayCountBasisDay = floatingLeg.dayCountBasis.day;
floatingLeg.dayCountBasisYear = floatingLeg.dayCountBasis.year;
floatingLeg.index = indexLookup[common.baseCurrency];
delete floatingLeg.dayCountBasis;
common.tradeID = tradeId;

View File

@ -24,7 +24,6 @@ define(['utils/dayCountBasisLookup'], (dayCountBasisLookup) => {
resetRule: "InAdvance",
fixingsPerPayment: "Quarterly",
fixingCalendar: [ "NewYork" ],
index: "ICE LIBOR",
indexSource: "Rates Service Provider",
indexTenor: {
name: "3M"

View File

@ -132,6 +132,10 @@
<td>Effective From</td>
<td>{{deal.floatingLeg.effectiveDate}}</td>
</tr>
<tr class="center aligned">
<td>Index</td>
<td>{{deal.floatingLeg.index}}</td>
</tr>
<tr class="center aligned">
<td>Terminates</td>
<td>{{deal.floatingLeg.terminationDate}}</td>