Hi,
I am trying to calculate expected value for a bull put spread, which includes
- Selling a higher strike put
AND
- Buying a lower strike put
Expected value of tis strategy has 3 parts
- Max profit * Probability of the stock staying above put_sell strike price
- Max loss * Probability of the stock going below put_buy strike price
- The area between the two strikes - which should be some kind of an integral with probability of profit at every point
#1 and #2 are straightforward, but I am not able to figure out how to calculate 3. Please let me know if there are code examples (python preferred) or any other resources.
What exactly you are trying to do to evaluate the "expected value of the strategy" here? I think you are not very clear what the "probabilities" really mean here.
If you are taking the "expectation" under risk nuetral assumptions, the probabilities are risk neutral probabilities. In this case, just use BS formula for the combined portfolio. Under this assumption, no matter how you approach, your strategy expected value will always be simply the BS price you pay for the strategy. Let' see why. For the sake of ease, let's assume a bull call spread (put requires flipping of notation), you buy a call strike K1, and sell at K2 (K2 > K1). You have tried to express it as two cash or nothing binaries (#1 and #2 in your post) and something else (#3 in your post that you are unable to interprete). The same can be recast as follows.
First, you can take out the 'max-loss' part - this arises from the fact that you have to pay the net premium and it has a probability of one (assuming no default risk). For the rest, 1) you receive max payout (K2-K1) if price is above K2, 2) nothing if below K1 and 3) between K1 and K2, you receive an asset and pay K1. This is equivalent to 1) a long cash or nothing binary for price > K2 and payout K2-k1 2) a long asset or nothing between K1 and K2 and 3) a short cash or nothing between K1 and K2 and payout K1. This can be recast as (in black form):
(N(d11) - N(d21)).F - (N(d12) - N(d22)).K1 + N(d22).(K2 - K1). (N(d12) - N(d22)). Here d11 is the regular d1 value for the option 1 (long call at K1), and so on.
The last part of the expression is max-profit*probability the stock is higher than K2 and corresponds to #1 above (and also the #1 in your post). (N(d11) - N(d21)).F is the asset or nothing under #2 above and (N(d12) - N(d22)).K1 is the cash or nothing under #3. Here N(.) captures the correct risk nuetral probabilities required. Note: 1) all these "probabilities" we are takling about are risk neutral probabilities and 2) even then they are different based on the appropriate "numeraire". To calculate the probability of cash or nothing you need the N(dX2) values (bank account as the correct numeraire) and for asset or nothing you need the N(dX1) values (asset as the numeraire).
Now, the long expression above simplifies to N(d11).F - N(d12).K1 - N(d21).F + N(d22).K2. And now you realize, after all this exercise, we have an expression of the expected strategy value which is nothing different than just the price different between the long and short options - the BS price of the strategy.
Now instead of risk neutral, if you try to use the regular (real world) probabilities, things become very very difficult. The standard value of anything is the payout X probability X discounting. Risk neutral assumption makes discounting easy (it is always the risk-free rate). For real world proability, it is very very hard to come up with a mathematically consistent discouting rate - it involves complext modeling of human and market behaviour that are very difficult to calibrate. Almost always when you see probabilities in option text, they are risk neutral, and that is very very different than our day to day understanding of the term probability.