Overall Statistics
Total Trades
0
Average Win
0%
Average Loss
0%
Compounding Annual Return
0%
Drawdown
0%
Expectancy
0
Net Profit
0%
Sharpe Ratio
0
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0
Beta
0
Annual Standard Deviation
0
Annual Variance
0
Information Ratio
0
Tracking Error
0
Treynor Ratio
0
Total Fees
$0.00
class MomentumBasedTacticalAllocation(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2007, 8, 1)  
        self.SetEndDate(2010, 8, 1)  
        self.SetCash(3000)  
        
        self.spy = self.AddEquity("SPY", Resolution.Hour)  
        self.bnd = self.AddEquity("BND", Resolution.Hour) 
        
        self.spyMomentum = self.MOMP("SPY", 50, Resolution.Daily) 
        self.bondMomentum = self.MOMP('BND', 50, Resolution.Daily) 
        
        #1. Set SPY Benchmark
        self.SetBenchmark("SPY")
        
        #2. Warm up algorithm for 50 days to populate the indicators prior to the start date
        self.SetWarmUp(50)
    
    def OnData(self, data):
        pass