I am a newby to VBA and this is my first attempt at a function.
Function Deltawt(PortfolioValue As Double, PortfolioFloor As Double, Maturity As Double, Riskfree As Double, Volatility As Double)
d1 = (Log(PortfolioValue / PortfolioFloor) + (Riskfree + (Volatility ^ 2) / 2) * Maturity / 365) / (Volatility * sqrt(Maturity / 365))
Deltawt = NormSDist(d1)
End Function
When i try to run it, the SQRT() and NORMSDIST() function calls do not compute. I clicked on the property box to allow Excel addins but that doesnt help. If I omit the sqrt and normsdist it works (but clearly these are critical to the formula!)
Your guidance is gratefully received...thq
Bookmarks