* Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * This is not a function on CA * Update _index.md * Update _index.md * Update _index.md * Update _index.md * This command does not exist on CA * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Type in dcf help text * Missing the index on dividends function * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Missing index * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Fix missing index * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Fix missing index * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * doesn't exists The command 'disp' doesn't exist on the /stocks/options/ menu. 2022 Feb 16, 08:49 (✨) /stocks/options/ $ disp usage: options {calc,yf,tr,info,pcr,load,exp,vol,voi,oi,hist,chains,grhist,unu,plot,parity,binom,vsurf,greeks,payoff,pricing,screen,cls,home,h,?,help,q,quit,..,exit,r,reset} options: error: argument cmd: invalid choice: 'disp' (choose from 'calc', 'yf', 'tr', 'info', 'pcr', 'load', 'exp', 'vol', 'voi', 'oi', 'hist', 'chains', 'grhist', 'unu', 'plot', 'parity', 'binom', 'vsurf', 'greeks', 'payoff', 'pricing', 'screen', 'cls', 'home', 'h', '?', 'help', 'q', 'quit', '..', 'exit', 'r', 'reset') The command 'disp' doesn't exist on the /stocks/options/ menu. 2022 Feb 16, 08:49 (✨) /stocks/options/ $ * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Create _index.md * Create _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update and rename website/content/common/quantitative_analysis/data/_index.md to website/content/common/quantitative_analysis/raw/_index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Black formatting * Update _index.md * Update _index.md * small ba edits * black formatting code * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * black formatting code + mc axes * Update _index.md * Update _index.md * Update _index.md * regression * regression * Update _index.md * codespell * codespell * flake8 fix Co-authored-by: Jeroen Bouma <jeroenbouma@MacBook-Pro-van-Jeroen.local> Co-authored-by: jmaslek <jmaslek11@gmail.com>
2.5 KiB
Vendored
usage: binom [-s STRIKE] [-p] [-e] [-x] [--plot] [-v VOLATILITY] [-h]
Shows the value of an option using binomial option pricing. Can also show raw data and provide a graph with predicted underlying asset ending values. The binomial options model calculates how big an up step or down step in the next time period will likely be. Then it creates a tree doing this at each period. The end results of this is a tree with possible asset values at each "step". For our calculations we use a day as our "step" time period. We then take all of the expected values at the finishing date and use this to begin a tree of option values at each step. The ending results is the value of the option today.
The up step is calculated by taking e to the power of volatility times the square root of the change in time during the step. This is the percentage we expect the stock to increase if there is an upward movement. The down step is the inverse of the up step. The probability of the up step is calculated by taking e to the power of the risk free rate minus the dividend yield. This is multiplied by the change in time for the step and then subtracted by the expected downward movement. This number is then divided by the up step subtracted by then down step. The probability of a downward step is just one minus the probability of an upward step.
Formulas: up_step = e ^ (volatility * (delta_t ^ (1 / 2))) down_step = 1 / up_step
prob_up = (e ^ ((risk_free - div_yield) * delta_t) - down_step) / (up_step - down_step) prob_down = 1 - prob_up
optional arguments:
-s STRIKE, --strike STRIKE
Strike price for option shown (default: 0)
-p, --put Value a put instead of a call (default: False)
-e, --european Value a European option instead of an American one (default: False)
-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)
Example:
2022 Feb 16, 08:40 (✨) /stocks/options/ $ binom -s 3100 -e --plot
AMZN call at $3100.00 expiring on 2022-03-25 is worth $136.85
2022 Feb 16, 08:41 (✨) /stocks/options/ $ binom -s 3500 -p --plot
AMZN put at $3500.00 expiring on 2022-03-25 is worth $389.72
