Categories
R-Programming

Option Trading Strategy Graph

Hi,

During quarantine I’ve been reading through Sheldon Natenburg’s Option Valuation and in Chapter 4 (?) he discusses the ‘hockey stick’ graphs. These are graphs that demonstrate the profit of different option strategies. I love graphs and charts so I decided to write a program to generate these graphs and host it online: https://heythatsmyinternet.shinyapps.io/opt_val/

These graphs compare the profit or loss of an option based on the final settlement price. It takes as inputs the type of option (put or call), Buy or Sell, Strike Price, the Cost (premium) into account and determines what the final return will be. Expiration dates are not considered.

So for instance, below Option 1 is a Call that costs 5 and the strike price is 80. Below 80 the purchaser will just be out 5. Above the strike price, the owner will start to make money represented by the upward crook in the graph. at 85, the user will break even. They will receive a return of 5 for the option they paid 5 for. For settlements above this price the user will start to make a profit. The logic is the same for Puts or Calls, Buys or Sells at different prices and costs.

Multiple options can be charted on the same graph and the cumulative profit and loss of the option strategy can also be calculated and displayed:

Enter your option inputs in the top panel and see the graph change accordingly. Below the graph is a table showing the numerical output.

I built it in R and used Shiny server to make it interactive and host it online.