bonjour,j'ai élaboré un programme sous VBA pour évaluer des options sur actions versant un dividende(black and scholes). Mais lorsque j'utilise la fonction j'ai zéro comme résultat. Le modèle utilisé est le suivant avec S:cours de l'action,K:strike,r:taux d'intéret,q:dividende, T:la maturité)
Merci pour l'aide
Function BS_STD(TypeOption, S, K, r, q, sigma, T)
d1 = (Log(S / K) + (r - q + 0.5 * sigma ^ 2) * T) / (sigma * Sqr(T))
d2 = d1 - sigma * Sqr(T)
z = Switch(TypeOption)
BS = z * (S * Exp((-q) * T) * N(z * d1) - K * Exp(-r * T) * N(z * d2))
End Function
Function N(d)
N = WorksheetFunction.NormSDist(d)
End Function
Function Switch(TypeOption)
TypeOption = UCase(TypeOption)
If TypeOption = "C" Or TypeOption = "CALL" Then
Switch = 1
ElseIf TypeOption = "P" Or TypeOption = "PUT" Then
Switch = -1
End If
End Function
Merci pour l'aide
Function BS_STD(TypeOption, S, K, r, q, sigma, T)
d1 = (Log(S / K) + (r - q + 0.5 * sigma ^ 2) * T) / (sigma * Sqr(T))
d2 = d1 - sigma * Sqr(T)
z = Switch(TypeOption)
BS = z * (S * Exp((-q) * T) * N(z * d1) - K * Exp(-r * T) * N(z * d2))
End Function
Function N(d)
N = WorksheetFunction.NormSDist(d)
End Function
Function Switch(TypeOption)
TypeOption = UCase(TypeOption)
If TypeOption = "C" Or TypeOption = "CALL" Then
Switch = 1
ElseIf TypeOption = "P" Or TypeOption = "PUT" Then
Switch = -1
End If
End Function