Effacer les filtres
Effacer les filtres

Negative rates in blsprice

2 vues (au cours des 30 derniers jours)
Esbjörn Edwardsson
Esbjörn Edwardsson le 15 Mar 2016
Commenté : Saurabh Roy le 19 Juin 2021
Why is negative rates not allowed in function 'blsprice'?

Réponses (1)

Vineeth Kartha
Vineeth Kartha le 18 Mar 2016
Hi,
Negative rates are not allowed in BLSPRICE.
However, you can modify the function 'blscheck.m' called by BLSPRICE opening it in the MATLAB Editor by typing in the MATLAB Command Window:
>> edit blscheck
Then, commenting out the lines 66-69:
if any(Rate(:) < 0)
error(message('finance:blscheck:NegativeRiskFreeRate'));
end
will prevent the code from stopping when a negative rate is used in BLSPRICE.
Hope this helps.
Regards
Vineeth
  1 commentaire
Saurabh Roy
Saurabh Roy le 19 Juin 2021
thanks!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Price and Analyze Financial Instruments dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by