Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
-61.557%
Drawdown
0.800%
Expectancy
0
Net Profit
-0.696%
Sharpe Ratio
-7.483
Probabilistic Sharpe Ratio
0%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.393
Beta
-4.105
Annual Standard Deviation
0.078
Annual Variance
0.006
Information Ratio
-8.467
Tracking Error
0.097
Treynor Ratio
0.142
Total Fees
$1.00
Estimated Strategy Capacity
$460000.00
Lowest Capacity Asset
GOOCV WMDHMHJR5012|GOOCV VP83T1ZUHROL
from QuantConnect.Securities.Option import OptionPriceModels
from datetime import timedelta
class OptionsAlgorithm(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2017, 7, 1)
        self.SetEndDate(2017, 7, 3)
        self.SetCash(100000)
        option = self.AddOption("GOOG")
        option.SetFilter(-10, +10, timedelta(0), timedelta(30))
        option.PriceModel = OptionPriceModels.CrankNicolsonFD()
        self.SetWarmUp(TimeSpan.FromDays(7))


    def OnData(self,slice):
        if self.Portfolio.Invested: return

        for kvp in self.CurrentSlice.OptionChains:
            chain = kvp.Value
            contracts = [i for i in chain]
            if len(contracts) == 0: continue
            self.Log("Delta: " + str([i.Greeks.Delta for i in contracts]))
            self.Log("Vega: " + str([i.Greeks.Vega for i in contracts]))
            self.Log("Gamma: " + str([i.Greeks.Gamma for i in contracts]))
            self.MarketOrder(contracts[0].Symbol, 1)