Options binom percent (#1473)

* Fix percentage on graph and clean up wording

* Fix percentage on graph and clean up wording
This commit is contained in:
jmaslek
2022-03-11 20:18:04 -05:00
committed by GitHub
parent fd5e56dd49
commit 3ef4db5b70
3 changed files with 4 additions and 4 deletions

View File

@@ -1334,7 +1334,7 @@ Expiry: [/param]{self.selected_date or None}
type=float,
default=None,
dest="volatility",
help="Underlying asset annualized volatility",
help="Underlying asset annualized volatility. Historical volatility used if not supplied.",
)
if other_args and "-" not in other_args[0][0]:
other_args.insert(0, "-s")

View File

@@ -766,7 +766,7 @@ def plot_expected_prices(
"""
up_moves = list(range(len(und_vals[-1])))
up_moves.reverse()
probs = [binom.pmf(r, len(up_moves), p) for r in up_moves]
probs = [100 * binom.pmf(r, len(up_moves), p) for r in up_moves]
if external_axes is None:
_, ax = plt.subplots(figsize=plot_autoscale(), dpi=cfp.PLOT_DPI)
else:

View File

@@ -22,8 +22,8 @@ optional arguments:
-x, --xlsx Export an excel spreadsheet with binomial pricing data (default: False)
--plot Plot expected ending values (default: False)
-v VOLATILITY, --volatility VOLATILITY
Underlying asset annualized volatility (default: None)
-h, --help show this help message (default: False)
Underlying asset annualized volatility. (None indicates that the historical volatility is being used) (default: None)
-h, --help show this help message (default: False)
```
Example: