Capital Asset Pricing Model (CAPM) Expected Return Calculator
function calculateCAPM() {
var riskFreeRateInput = document.getElementById("riskFreeRate");
var betaInput = document.getElementById("beta");
var marketReturnInput = document.getElementById("marketReturn");
var resultDiv = document.getElementById("result");
var riskFreeRate = parseFloat(riskFreeRateInput.value);
var beta = parseFloat(betaInput.value);
var marketReturn = parseFloat(marketReturnInput.value);
if (isNaN(riskFreeRate) || isNaN(beta) || isNaN(marketReturn)) {
resultDiv.innerHTML = "Please enter valid numbers for all fields.";
return;
}
// CAPM Formula: Expected Return = Risk-Free Rate + Beta * (Expected Market Return – Risk-Free Rate)
var expectedReturn = riskFreeRate + beta * (marketReturn – riskFreeRate);
// Convert percentages to their decimal equivalents for calculation if they are entered as percentages
// Assuming the user enters percentages like 5 for 5%, 0.1 for 0.1%
// If the user inputs 5 for 5%, we need to divide by 100
var riskFreeRateDecimal = riskFreeRate / 100;
var marketReturnDecimal = marketReturn / 100;
var expectedReturnDecimal = riskFreeRateDecimal + beta * (marketReturnDecimal – riskFreeRateDecimal);
var expectedReturnPercentage = expectedReturnDecimal * 100;
resultDiv.innerHTML = "
Expected Return
" + expectedReturnPercentage.toFixed(2) + "%";
}
.calculator-wrapper {
font-family: sans-serif;
border: 1px solid #ccc;
padding: 20px;
border-radius: 8px;
max-width: 400px;
margin: 20px auto;
background-color: #f9f9f9;
}
.calculator-inputs {
margin-bottom: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.form-group input[type="number"] {
width: calc(100% – 12px);
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
width: 100%;
}
button:hover {
background-color: #45a049;
}
.calculator-result {
text-align: center;
margin-top: 20px;
padding: 15px;
border: 1px dashed #ccc;
border-radius: 4px;
background-color: #fff;
}
.calculator-result h3 {
margin-top: 0;
color: #333;
}
.calculator-result p {
font-size: 24px;
font-weight: bold;
color: #007bff;
}
Understanding the Capital Asset Pricing Model (CAPM) and Expected Return
The Capital Asset Pricing Model (CAPM) is a foundational financial model used to determine the theoretically appropriate required rate of return for an asset. It posits that the expected return of an asset is a function of its systematic risk (beta), the risk-free rate, and the expected return of the market. In simpler terms, CAPM helps investors understand how much return they should expect from an investment given its risk level relative to the overall market.
The CAPM formula is expressed as:
$$ E(R_i) = R_f + \beta_i (E(R_m) – R_f) $$
Where:
* **$E(R_i)$** is the expected return of the investment.
* **$R_f$** is the risk-free rate of return. This is the return on an investment with zero risk, typically represented by the yield on government bonds (like U.S. Treasury bills) with a maturity matching the investment horizon.
* **$\beta_i$** (Beta) is a measure of the investment's volatility or systematic risk in relation to the overall market. A beta of 1 indicates the asset's price tends to move with the market. A beta greater than 1 suggests the asset is more volatile than the market, while a beta less than 1 suggests it is less volatile.
* **$E(R_m)$** is the expected return of the market portfolio. This represents the average return expected from the overall stock market (e.g., an index like the S&P 500).
* **$(E(R_m) – R_f)$** is known as the market risk premium, representing the additional return investors expect for investing in the market portfolio over the risk-free rate.
### How the CAPM Calculator Works:
Our calculator simplifies the application of the CAPM formula. You will need to input three key values:
1. **Risk-Free Rate:** The current yield on a risk-free asset, usually expressed as a percentage. For example, if a 10-year U.S. Treasury bond yields 3.5%, you would enter 3.5.
2. **Beta:** The beta coefficient for the specific asset or portfolio you are analyzing. This can usually be found on financial data websites. For instance, a stock might have a beta of 1.2.
3. **Expected Market Return:** Your estimate of the future return for the overall market, also expressed as a percentage. This is often based on historical averages or future market outlooks. For example, you might estimate the market to return 10% annually.
Once these values are entered, the calculator will compute the expected return for your investment according to the CAPM.
### Example:
Let's say you are considering an investment and have the following data:
* **Risk-Free Rate ($R_f$):** 3.0% (perhaps the current yield on a T-bill)
* **Beta ($\beta_i$):** 1.15 (the investment is slightly more volatile than the market)
* **Expected Market Return ($E(R_m)$):** 10.0% (your projection for the stock market's annual return)
Using the calculator, you would input:
* Risk-Free Rate: 3.0
* Beta: 1.15
* Expected Market Return: 10.0
The CAPM calculation would be:
Expected Return = 3.0% + 1.15 \* (10.0% – 3.0%)
Expected Return = 3.0% + 1.15 \* (7.0%)
Expected Return = 3.0% + 8.05%
Expected Return = 11.05%
The calculator would display **11.05%** as the expected annual return for this investment, based on the CAPM. This figure can then be compared to your target rate of return to help make an informed investment decision.
It's important to remember that CAPM is a model and relies on estimations for the market return and beta, which can change over time. Therefore, the calculated expected return is a theoretical estimate and not a guarantee.