Creating a Custom CAPM Function Using Excel’s Lambda Feature
Karthikeyan Jayasankar
Assistant Controller (Assistant Manager) at Accenture // Senior Accountant // Financial Analyst//
In Excel, you can leverage the Lambda function to create user-defined custom functions. Let’s build a function that calculates the Expected Rate of Return using the Capital Asset Pricing Model (CAPM) formula within the Lambda framework.
Setting Up the CAPM Function :
Using the CAPM Function:
Now that the CAPM function is saved in your workbook, you can call it just like any other function. The Parameters should be provided in the same order
To calculate the Expected Rate of Return, enter the following formula in cell B4: =CAPM(B1, B2, B3). This will yield an Expected Rate of Return of 18.5%.
It will be more handy to transform the formulas into functions using Lambda.
Could you use the function and share your experience in the comments?
#FinancialModelling #Lambdafunction #CAPM #FinancialAnalysis