Overall Statistics
Total Trades
36641
Average Win
0.02%
Average Loss
0.00%
Compounding Annual Return
11.288%
Drawdown
26.000%
Expectancy
1.690
Net Profit
240.708%
Sharpe Ratio
0.955
Probabilistic Sharpe Ratio
37.246%
Loss Rate
37%
Win Rate
63%
Profit-Loss Ratio
3.26
Alpha
0.004
Beta
0.722
Annual Standard Deviation
0.125
Annual Variance
0.016
Information Ratio
-0.748
Tracking Error
0.054
Treynor Ratio
0.166
Total Fees
$36644.94
Estimated Strategy Capacity
$2800000.00
Lowest Capacity Asset
TLT SGNKIKYGE9NP
class FocusedSkyBlueSalmon(QCAlgorithm):

   def Initialize(self):
       self.SetStartDate(2010, 1, 1) # Set Start and End Date
       self.SetEndDate(2021, 6, 15)
       self.SetCash(100000) #Set Cash
      
       self.SpySymbol = self.AddEquity("SPY", Resolution.Minute) #Request Data
       self.TMFSymbol = self.AddEquity("TLT", Resolution.Minute)
    
       
       Quandl.SetAuthCode("zkdoRxRXbAQdUxzXZKBy")
       
       self.shiller = self.AddData(QuandlCustomColumns, "MULTPL/SHILLER_PE_RATIO_MONTH", Resolution.Daily, TimeZones.NewYork)
       
       
       

   def OnData(self, data):
       if self.shiller.Close < 10:
          self.SetHoldings("SPY", .40,)
          self.SetHoldings("TLT", .60)
          
       elif self.shiller.Close < 14 and  self.shiller.Close > 10:
           self.SetHoldings("SPY", .60,)
           self.SetHoldings("TLT", .40)
           
       else:
           self.SetHoldings("SPY", .8)
           self.SetHoldings("TLT", .20)
       
class QuandlCustomColumns(PythonQuandl): 
   
    def __init__(self):
        self.ValueColumnName = "value"