EmmaMuhleman1 / Python-Binomial-Stock-Option-Pricing

Python Binomial Stock Option Pricing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python-Binomial-Stock-Option-Pricing Python Binomial Stock Option Pricing

This workbook uses more advanced approaches to deal with the realities of most of the options traded today.

Options today are typically "American-Style" yet industry practititoners use Black Scholes which wipes away a substantial portion of that optionality and the potential upside when the optionholder has only one specific day on which the position must be in his favor to make money, and in all other circumstances he will lose. This is very different from the payoff profile on an option exercisable any time prior to its expiration, and has considerably more optionality value, provided the exercise or strike price is not so far out-of-the-money it is virtually assured that no holder would execute the right to early exercise. To model American-style call and put options, we must use a complex series of scenarios, in which the stock price could go up or down accordingly to a fixed probability at each decision node, and without knowing the future the holder decides when it is optimal to exercise and when it is not, and this can be achieved through the application of Numerical Analysis, namely Optimization and Backward Traversal of a Decision Tree until you find yourself at a node in which the holder would CERTAINLY NOT BENEFIT FROM CONVERTING. That then becomes the final node, and the Present Value of the embedded optionality is simply the value of the payoffs at those final nodes, discounted back to the present.

The model is very thorough with commentary and walks users who are likely unfamilar with decison tree analysis or lattice methodology, step by step, to understand what's happening under the hood.

I have designed the code and valuation approach to be used by and for the laymen and suggest first-time users do not get overwhelmed by the code that does not require any inputs. Just focus on the cells requiring updated contractual terms and the model should do the rest. In doing so, I add a simple cell solely for the purpose of defining input variables before the code is run, and indicate users updating the model go directly to those sections, update the data, and re-run the workbook. Voila! It should work just great.

REQUIREMENTS OF THOSE UPDATING THE MODEL WITH NO PRIOR EXPERIENCE:

Do not bother to examine the code, it will overwhelm you, but focus on the areas titled as I describe above, which point to one cell below each of these titles in which contract data must be updated in later reporting periods. The cell you will be updating includes the key, driving inputs into the ultimate valuation that comes out of a Binomial Lattice approach, and are consistent with those specified by Cox-Ross-Rubenstein as they published a method to better refine option prices that were clearly undervalued when using the European-option based BSM approach.

My comments will be included in the live code cells, preceded by #blah blah. I encourage you to follow those to a tee and it will be good to go.

The model uses example stock and option price data to build out the binomial lattice trees, as can be found here stockoptiondata.xlsx

About

Python Binomial Stock Option Pricing


Languages

Language:Jupyter Notebook 100.0%