### Introduction

Long volatility means that the value of your portfolio increases when the volatility goes up. Short volatility means that you make money when the volatility goes down. The simplest example of volatility selling involves the sale of put and call contracts. Traders often long volatility by holding the long position of put or call Options for hedging purpose. In contrast, the short volatility strategy expects to earn the systematic risk premium by selling Options. This algorithm will explore the risk premium effect in volatility selling.

### Method

This short volatility algorithm first prescreens the Option contracts by the expiry and the strike. To include the weekly contract, we use the universe function.

```
def Initialize(self):
option = self.AddOption("GOOG", Resolution.Minute)
option.SetFilter(self.UniverseFunc)
def UniverseFunc(self, universe):
return universe.IncludeWeeklys().Strikes(-20, 20).Expiration(timedelta(0), timedelta(31))
```

The algorithm selects contracts with one month until maturity so we choose a small range for expiration.

In OnData(), we divide the OptionChain into put and call Options. Then we select the closest expiration date.

The algorithm needs three Option contracts with one month to the maturity: one ATM call, one ATM put to contruct the ATM straddle,
one 15% OTM put. As it's difficult to find the contract with the specified days to maturity and strikes,
we use `sorted`

to find the most closest contract.

```
# Get the nearest expiration date of the contracts
expiry = sorted(chain, key = lambda x: x.Expiry)[0].Expiry
# Select the call Option contracts
puts = [i for i in chain if i.Expiry == expiry and i.Right == OptionRight.Put]
if len(puts) == 0: return
# Select the ATM strike price from the remaining contracts
underlying_price = chain.Underlying.Price
atm_strikes = sorted([x.Strike for x in puts], key=lambda x: abs(x - underlying_price))[0]
```

From the above expiration date and strike price, we pick three Option contracts. We can use `OptionStrategies.Straddle`

to order the multi-leg positions.

```
option_strategy = OptionStrategies.Straddle(self.symbol, atm_strikes, expiry)
# Select 15% OTM put
otm_put = sorted(puts, key=lambda x: abs(x.Strike - 0.85*underlying_price))[0]
self.Buy(option_strategy, 1)
self.Sell(otm_put.Symbol, 1)
```

In trading, we sell the ATM straddle by selling one ATM call and one ATM put. Then we buy an OTM put Option as insurance against a market crash. Then we wait until the expiration and sell the underlying positions after Option exercise and assignment. The portfolio is rebalanced once a month.