Overall Statistics
Total Trades
6130
Average Win
0%
Average Loss
0%
Compounding Annual Return
-100.000%
Drawdown
25.600%
Expectancy
0
Net Profit
-19.865%
Sharpe Ratio
-0.688
Probabilistic Sharpe Ratio
0%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
10.34
Beta
-14.171
Annual Standard Deviation
1.454
Annual Variance
2.115
Information Ratio
-1.156
Tracking Error
1.557
Treynor Ratio
0.071
Total Fees
$6130.00
Estimated Strategy Capacity
$180000000.00
Lowest Capacity Asset
VIX 31OHOSQYOWULQ|VIX 31
class IndexOptionsDataAlgorithm(QCAlgorithm):
    
    def Initialize(self):
        self.SetStartDate(2021, 6, 1);
        self.SetEndDate(2021, 6, 5);
        self.SetCash(1000000);
        
        # set for all security when they're initialize
        self.SetSecurityInitializer(self.CustomSecurityInitializer)
        
        self.indexSymbol = self.AddIndex('VIX').Symbol
        option = self.AddIndexOption(self.indexSymbol, Resolution.Minute)
        option.SetFilter(-1, 1, 0, 15)
        self.option_symbol = option.Symbol
        
    def CustomSecurityInitializer(self, security):
        # custom fee model
        security.SetFeeModel(ConstantFeeModel(1.0))
        # custom slippage model
        security.SetSlippageModel(VolumeShareSlippageModel())
        
        # can also include fill model, margin model, settlement model, data normalization mode, ..

    def OnData(self, data):
        
        chain = data.OptionChains.get(self.option_symbol)
        if not chain: return
    
        for contract in chain:
            self.Buy(contract.Symbol, 1)