function calculateRepo() {
// Get input values
var principal = parseFloat(document.getElementById("principalAmount").value);
var rate = parseFloat(document.getElementById("repoRateInput").value);
var days = parseFloat(document.getElementById("tenureDays").value);
var resultBox = document.getElementById("result");
// Validation
if (isNaN(principal) || isNaN(rate) || isNaN(days) || principal <= 0 || rate < 0 || days <= 0) {
alert("Please enter valid positive numbers for Transaction Value, Rate, and Tenure.");
resultBox.style.display = "none";
return;
}
// Logic: Simple Interest Calculation for Repo
// Formula: Interest = Principal * (Rate / 100) * (Days / 365)
// Note: Some markets use 360 days, we default to 365 for general accuracy
var daysInYear = 365;
var interestCost = principal * (rate / 100) * (days / daysInYear);
var repurchasePrice = principal + interestCost;
var dailyCost = interestCost / days;
// Formatting
var formatter = new Intl.NumberFormat('en-US', {
style: 'decimal',
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
// Display Results
document.getElementById("resPrincipal").innerText = formatter.format(principal);
document.getElementById("resInterest").innerText = formatter.format(interestCost);
document.getElementById("resTotal").innerText = formatter.format(repurchasePrice);
document.getElementById("resDaily").innerText = formatter.format(dailyCost);
// Show result div
resultBox.style.display = "block";
}
Repo Rate Calculation Formula: Understanding the Cost of Short-Term Funding
The Repo Rate (Repurchase Agreement Rate) is a pivotal instrument in modern monetary policy and banking. It represents the interest rate at which commercial banks borrow money from the central bank by selling qualifying securities with an agreement to repurchase them at a future date. Understanding the repo rate calculation formula is essential for financial analysts, banking professionals, and investors tracking liquidity costs in the economy.
The Repo Rate Formula
While the concept involves selling and buying back securities, the cost is calculated essentially as interest on a collateralized loan. The basic formula to determine the interest cost (the difference between the Sale Price and the Repurchase Price) is:
Repo Interest = Principal × Repo Rate % × (Tenure in Days / 365)
To find the final Repurchase Price (the amount the bank must pay back to retrieve its securities), the formula is:
Repurchase Price = Sale Price + Repo Interest
Note: While 365 days is the standard day-count convention for many domestic currencies, international money markets often use a 360-day year convention.
Key Components of the Calculation
Transaction Value (Principal)
This is the initial cash amount the borrower receives in exchange for the securities. It is often slightly lower than the market value of the securities due to a "haircut" (margin) applied for risk management.
Repo Rate
The annualized percentage rate charged for the transaction. This is set by the central bank (in policy repos) or determined by market forces (in market repos).
Tenure
The duration of the agreement. Overnight repos (1 day) are the most common, but term repos can last for 7 days, 14 days, or longer.
Repurchase Price
The future price at which the borrower buys back the collateral. Since the repo rate is positive, the Repurchase Price is always higher than the initial Sale Price.
Example Calculation
Let's assume a commercial bank needs short-term liquidity and enters a repo transaction with the central bank.
Principal (Sale Price): 50,000,000
Current Repo Rate: 6.00%
Tenure: 14 Days
Using the calculator above, we can determine the cost:
The bank will repay 50,115,068.49 at the end of the 14 days to retrieve their securities.
Why the Repo Rate Matters
The repo rate acts as a benchmark for the economy. When the central bank raises the repo rate, the cost of funds for banks increases. To maintain their profit margins, banks inevitably pass this cost on to consumers by raising interest rates on loans and deposits. Conversely, lowering the repo rate injects liquidity into the market by making borrowing cheaper for banks.