function calculateFRA() {
// 1. Get Input Values
var notional = parseFloat(document.getElementById('notionalAmount').value);
var fixedRateVal = parseFloat(document.getElementById('fixedRate').value);
var refRateVal = parseFloat(document.getElementById('referenceRate').value);
var days = parseInt(document.getElementById('contractDays').value);
var basis = parseInt(document.getElementById('dayCountBasis').value);
// 2. Validation
if (isNaN(notional) || isNaN(fixedRateVal) || isNaN(refRateVal) || isNaN(days) || isNaN(basis)) {
alert("Please enter valid numeric values for all fields.");
return;
}
if (notional <= 0 || days 0) {
finalSpan.className = "result-value positive final-amount";
dirDiv.innerHTML = "Result: Since the Reference Rate (" + refRateVal + "%) is higher than the Fixed Rate (" + fixedRateVal + "%), the Seller pays the Buyer.";
} else if (settlementAmount < 0) {
finalSpan.className = "result-value negative final-amount";
dirDiv.innerHTML = "Result: Since the Reference Rate (" + refRateVal + "%) is lower than the Fixed Rate (" + fixedRateVal + "%), the Buyer pays the Seller.";
} else {
finalSpan.className = "result-value final-amount";
dirDiv.innerHTML = "Result: No payment required (Rates are identical).";
}
resultDiv.style.display = "block";
}
Understanding Forward Rate Agreements (FRAs)
A Forward Rate Agreement (FRA) is a specific type of over-the-counter financial contract used by banks, corporations, and investors to hedge against interest rate movements. Unlike a standard loan, no principal is actually exchanged. Instead, the parties agree on a "Notional Amount" to calculate the interest differential.
This calculator helps determine the cash settlement amount that changes hands on the settlement date (usually the start of the contract period).
How the Calculation Works
The settlement amount depends on the difference between the agreed-upon Fixed Forward Rate and the prevailing Reference Rate (such as LIBOR, EURIBOR, or SOFR) on the fixing date. Because the payment occurs at the beginning of the contract period rather than the end, the interest differential is discounted to its present value.
R_ref: The floating Reference Rate (observed market rate).
R_fixed: The agreed Fixed Rate in the FRA contract.
Notional: The principal amount used for calculation (not exchanged).
Days: The number of days in the contract period.
Basis: The day count convention (usually 360 or 365).
Interpreting the Results
The direction of the payment depends on how the market rate moves relative to the fixed rate agreed upon in the contract:
If Reference Rate > Fixed Rate: The market rates have risen above what the borrower anticipated. The Seller of the FRA pays the Buyer. This compensates the Buyer for the higher borrowing costs they face in the market.
If Reference Rate < Fixed Rate: The market rates have fallen below the agreed rate. The Buyer of the FRA pays the Seller. This reflects that the Buyer would otherwise benefit from lower market rates, but locked in a higher rate.
Why is the Amount Discounted?
In a standard loan, interest is paid in arrears (at the end of the period). However, FRA settlements usually occur at the beginning of the forward period. Therefore, the calculated interest difference is discounted back from the end of the period to the settlement date using the Reference Rate as the discount factor.
Example Scenario
Imagine a corporate treasurer expects to borrow $10,000,000 in 3 months for a period of 6 months (180 days). To hedge against rising rates, they enter a "3×9 FRA" at a fixed rate of 4.50%.
On the fixing date (3 months later), the actual 6-month reference rate turns out to be 5.00%.
Since the market rate (5.00%) is higher than the fixed rate (4.50%), the FRA Seller pays the Corporate Treasurer (Buyer) $24,390.24. This cash inflow offsets the higher interest the treasurer will have to pay on their actual loan.