A quick primer on options in case you're not familiar:
• Over $450 billion in notional trades DAILY
• 39 million options contracts trade DAILY
• 25% of total options trading is from retail
So how do we make money?
Trade options with a simple, 3-part framework:
1. Design your risk
2. Value the position
3. Measure and monitor
Now pair this framework with Python and you get a potent combination for making money trading options.
Let's dig in:
To design our risk profile, we need the option payoff.
Let's start by defining the variables we need:
• Stock price
• Strike price
• Time to expiration
• Interest rate
• Volatility
We also define market prices for demonstrating trades.
Remember our payoff functions for calls and puts?
• call = max(S - K, 0)
• put = max(K - S, 0)
We can define them in Python in one line of code each.
And here's where it gets really interesting.
Using NumPy, we define a series of stock prices.
This gives us the payoff at each of these prices.
Then we plot the payoff against the stock prices and we have our famous hockey stick payoff chart for a call option!
We do the same thing for a put option.
We can clearly see that as the stock price decreases in price, the value of our put option increases.
Here's the amazing part of this...
Using this framework, we can construct any complex options position we want.
For example, I modeled a short straddle with breakeven points at $38.75 and $51.25 and max profit when the stock price is at $45.
Butterfly spread?
A butterfly spread is similar to a straddle except the loss is capped.
Because you're buying additional options to protect the downside, the premium collected is less than a straddle.
This is clear when you design your risk upfront.
The value in doing this FIRST is to pick the right position for the market.
Bullish?
Buy a call.
Bearish?
Buy a put.
Want to bet on volatility?
Buy a straddle.
Know the breakeven points, max gain and loss - before you put the trade on.
There's one thing missing though.
You'll notice all these payoffs happen when the options expire.
What about before they expire?
The Black-Scholes formula gives us the value of an option at any time before expiration.
In the next thread, we'll see how to build the formula in Python.
Here's a preview:
Now, you can apply this framework to your analysis.
Step 1 is understanding risk before you make the trade.
If you want to learn how to do this with Python, grab my 46-Page Ultimate Guide to Pricing Options and Implied Volatility with Python.
https://t.co/uUXgYrCqgx
PyQuant News writes about resources for using Python for quantitative and data analysis.
• Reply to this thread with any questions
• Follow me
@pyquantnews for more of these
• RT the tweet below to share this thread with your audience
https://t.co/5BrPwf19lc
A few people asked me about books for options.
Start here:
•
https://t.co/cF5wUTyjNp •
https://t.co/OlMy9zFGL3