function calculateEquilibriumRate() {
// Get input values using var
var riskFreeInput = document.getElementById('riskFreeRate').value;
var marketReturnInput = document.getElementById('marketReturn').value;
var betaInput = document.getElementById('assetBeta').value;
var errorDiv = document.getElementById('errErrorMessage');
var resultBox = document.getElementById('errResultDisplay');
// Clear previous error and hide result
errorDiv.innerHTML = "";
resultBox.style.display = "none";
// Parse values
var rf = parseFloat(riskFreeInput);
var rm = parseFloat(marketReturnInput);
var beta = parseFloat(betaInput);
// Validation logic
if (isNaN(rf) || isNaN(rm) || isNaN(beta)) {
errorDiv.innerHTML = "Please enter valid numeric values for all fields.";
return;
}
// Calculation Logic based on CAPM (Capital Asset Pricing Model)
// Formula: E(Ri) = Rf + Beta * (E(Rm) – Rf)
// 1. Calculate Market Risk Premium (Rm – Rf)
var marketRiskPremium = rm – rf;
// 2. Calculate the Risk Premium for the specific asset (Beta * MarketRiskPremium)
var assetRiskPremium = beta * marketRiskPremium;
// 3. Calculate Equilibrium Rate of Return
var equilibriumRate = rf + assetRiskPremium;
// Update DOM elements
document.getElementById('finalEquilibriumRate').innerHTML = equilibriumRate.toFixed(2) + "%";
document.getElementById('riskPremiumResult').innerHTML = marketRiskPremium.toFixed(2) + "%";
document.getElementById('betaPremiumResult').innerHTML = assetRiskPremium.toFixed(2) + "% (Beta × Market Premium)";
// Show result
resultBox.style.display = "block";
}
Understanding the Equilibrium Rate of Return
The Equilibrium Rate of Return represents the minimum return that investors require to hold a specific asset given its risk profile. In financial theory, particularly under the Capital Asset Pricing Model (CAPM), this rate indicates a state of balance where the asset is fairly priced: supply meets demand based on the risk-reward trade-off.
When an asset's expected return equals its equilibrium rate of return, it is considered to be on the Security Market Line (SML). If the expected return is higher than the equilibrium rate, the asset is undervalued (attractive). If it is lower, the asset is overvalued.
How to Use This Calculator
This calculator utilizes the standard CAPM formula to determine the required rate of return. Enter the following metrics:
Risk-Free Rate (%): This is typically the yield on government bonds, such as 10-year Treasury bills. It represents the time value of money with zero default risk.
Expected Market Return (%): The anticipated return of the broader market (e.g., S&P 500 historical average). This usually ranges between 8% and 12% nominally.
Asset Beta (β): A coefficient representing the asset's sensitivity to market movements.
Beta = 1: The asset moves in sync with the market.
Beta > 1: The asset is more volatile than the market (higher risk, higher expected return).
Beta < 1: The asset is less volatile than the market (lower risk).
The Mathematical Formula
The calculator applies the Capital Asset Pricing Model formula:
E(R) = Rf + β(Rm – Rf)
Where:
E(R): Equilibrium Rate of Return
Rf: Risk-Free Rate
β: Beta of the asset
Rm: Expected Market Return
(Rm – Rf): Market Risk Premium
Calculation Example
Suppose you are analyzing a tech stock with a high volatility. The current inputs are:
In this scenario, 13.3% is the equilibrium rate. Investors would require at least this return to compensate for the additional risk of holding this specific tech stock compared to a risk-free bond.