Overall Statistics
Total Trades
2
Average Win
0%
Average Loss
0%
Compounding Annual Return
-2.232%
Drawdown
1.000%
Expectancy
0
Net Profit
-0.190%
Sharpe Ratio
-0.924
Probabilistic Sharpe Ratio
23.911%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.031
Beta
0.008
Annual Standard Deviation
0.032
Annual Variance
0.001
Information Ratio
-3.769
Tracking Error
0.059
Treynor Ratio
-3.567
Total Fees
$2.00
Estimated Strategy Capacity
$220000.00
Lowest Capacity Asset
WDFC X4K9WJONKMME|WDFC R735QTJ8XC9X
# region imports
from AlgorithmImports import *
# endregion

class SmoothSkyBlueBarracuda(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2019, 4, 1)  # Set Start Date
        self.SetEndDate(2019, 5, 1)
        self.SetCash(100000)  # Set Strategy Cash
        option = self.AddOption("WDFC", Resolution.Minute)  # WDFC 190517C00180000
        option.SetFilter(minExpiry=timedelta(days=10), maxExpiry=timedelta(days=50))
        self.done = False

    def OnData(self, data: Slice):
        if not self.Portfolio.Invested:
            self.MarketOrder("WDFC", 100)
        if self.Time.day < 22 or self.done:
            return
        selected = None
        for chain in data.OptionChains.Values:
            symbols=[x.Symbol.Value for x in chain.Contracts.Values]
            for contract in chain.Contracts.Values:
                if contract.Symbol.Value == "WDFC  190517C00180000":
                    selected = contract
        if selected:
            self.MarketOrder(selected.Symbol, -1)
            self.done = True