Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
9.409%
Drawdown
55.200%
Expectancy
0
Net Profit
321.995%
Sharpe Ratio
0.533
Probabilistic Sharpe Ratio
1.590%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.104
Beta
-0.114
Annual Standard Deviation
0.175
Annual Variance
0.031
Information Ratio
-0.001
Tracking Error
0.262
Treynor Ratio
-0.823
Total Fees
$5.65
class TachyonOptimizedCompensator(QCAlgorithm):

    def Initialize(self):
        '''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.'''

        self.SetStartDate(2005,1,1)    #Set Start Date
        self.SetEndDate(2021,1,1)      #Set End Date
        self.SetCash(100000)           #Set Strategy Cash
        self.spy = self.AddEquity('SPY', Resolution.Daily, fillDataForward=True).SetDataNormalizationMode(DataNormalizationMode.Adjusted)
        self.SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Margin)

        # initialize list
        # self.close = []

    def OnData(self, data):
        if not data.ContainsKey("SPY"): return
        
        if not self.Portfolio.Invested:
            self.SetHoldings('SPY', 1)