Overall Statistics
Total Trades
2
Average Win
0%
Average Loss
0%
Compounding Annual Return
-17.056%
Drawdown
4.200%
Expectancy
0
Net Profit
-3.508%
Sharpe Ratio
-1.811
Probabilistic Sharpe Ratio
5.657%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.033
Beta
0.208
Annual Standard Deviation
0.056
Annual Variance
0.003
Information Ratio
1.107
Tracking Error
0.204
Treynor Ratio
-0.485
Total Fees
$4.30
Estimated Strategy Capacity
$59000000000.00
Lowest Capacity Asset
ES XZDYPWUWC7I9
# region imports
from AlgorithmImports import *
# endregion

class JumpingOrangeCoyote(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2022, 4, 22)  # Set Start Date
        self.SetEndDate(2022,6,30)
        self.SetCash(1000000)  # Set Strategy Cash
        
        self.px_multi = {}

        tickers = [
            #Futures.Indices.VIX,
            Futures.Indices.SP500EMini
        ]

        for ticker in tickers:
            #get symbols
            self.future = self.AddFuture(ticker)
            self.sym = self.future.Symbol
            self.px_multi[self.sym] = self.future.SymbolProperties.ContractMultiplier
        
        self.SetWarmup(26)

        self.contract = None

    def OnData(self, data):
        if self.IsWarmingUp:
            return
        
        for contracts in data.FutureChains.Values:
            self.Debug(f" {contracts}")

        # #get most liquid fut (OI)
        # for contracts in data.FutureChains.Values:
            
        #     sorted_contracts = sorted(contracts, key=lambda c: c.Expiry, reverse = True)
        #     if len(sorted_contracts) == 0: continue 
            
        #     self.Debug(f" contract: {sorted_contracts[0]}")

        #for each item in futures px multiplier dictionary if not invested buy 1 lot 
        for key,value in self.px_multi.items():
            if not self.Portfolio[self.Securities[key].Mapped].Invested:
                self.MarketOrder(self.Securities[key].Mapped,1)