mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
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:
@@ -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")
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user