Overall Statistics
Total Trades
2
Average Win
0%
Average Loss
0%
Compounding Annual Return
-17.470%
Drawdown
31.500%
Expectancy
0
Net Profit
-17.499%
Sharpe Ratio
-0.604
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.084
Beta
-3.688
Annual Standard Deviation
0.261
Annual Variance
0.068
Information Ratio
-0.68
Tracking Error
0.261
Treynor Ratio
0.043
Total Fees
$4.91
import numpy as np


class BasicTemplateAlgorithm(QCAlgorithm):
    
    def Initialize(self):
        

        self.SetStartDate(2017, 12, 20)  
        self.SetEndDate(2018, 12, 20)  
        self.SetCash(100000)
        
        self.AddEquity("SPY", Resolution.Second)
        
        self.symbols = ["KORS", 
                        "BA"]
                        
        for symbol in self.symbols:
            self.AddEquity(symbol, Resolution.Second)

    def OnData(self, data):
        target = 1.0 / len(self.symbols)
        for symbol in self.symbols:
            if not self.Portfolio[symbol].Invested:
                self.SetHoldings(symbol, target)