Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Bima Malabonga committed Feb 2, 2024
1 parent 8cd5371 commit 2df5f20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Black76.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private function impliedVolaUsingBisection(
$volBisection = $volMin + ($volMax - $volMin) * ($marketPrice - $valueMin) / ($valueMax - $valueMin);

// If the true implied volatility is outside of the interval [0.00001;5], the condition below ensures that it will be set to the closest bound
$volGuess = max($volMin, min($volBisection, $volMax))
$volGuess = max($volMin, min($volBisection, $volMax));
$valueGuess = $this->getValues($type, $underlyingPrice, $strikePrice, $timeToMaturity, $volGuess)['value'];

if ($valueGuess < $marketPrice) {
Expand Down

0 comments on commit 2df5f20

Please sign in to comment.