remove <summary> in comments
This commit is contained in:
@@ -53,17 +53,17 @@ class BubbleAlgorithm(QCAlgorithm):
|
||||
# add CAPE data
|
||||
self.AddData(Cape, "CAPE")
|
||||
|
||||
# Present Social Media Stocks:
|
||||
# # Present Social Media Stocks:
|
||||
# self._symbols.append("FB"), self._symbols.append("LNKD"),self._symbols.append("GRPN"), self._symbols.append("TWTR")
|
||||
# self.SetStartDate(2011, 1, 1)
|
||||
# self.SetEndDate(2014, 12, 1)
|
||||
|
||||
# 2008 Financials
|
||||
# # 2008 Financials
|
||||
# self._symbols.append("C"), self._symbols.append("AIG"), self._symbols.append("BAC"), self._symbols.append("HBOS")
|
||||
# self.SetStartDate(2003, 1, 1)
|
||||
# self.SetEndDate(2011, 1, 1)
|
||||
|
||||
# 2000 Dot.com
|
||||
# # 2000 Dot.com
|
||||
# self._symbols.append("IPET"), self._symbols.append("WBVN"), self._symbols.append("GCTY")
|
||||
# self.SetStartDate(1998, 1, 1)
|
||||
# self.SetEndDate(2000, 1, 1)
|
||||
@@ -76,9 +76,7 @@ class BubbleAlgorithm(QCAlgorithm):
|
||||
self._rsi = self.RSI(stock, 14, MovingAverageType.Exponential, Resolution.Daily)
|
||||
self._rsiDic[stock] = self._rsi
|
||||
|
||||
# <summary>
|
||||
# Trying to find if current Cape is the lowest Cape in three months to indicate selling period
|
||||
# </summary>
|
||||
def OnData(self, data):
|
||||
|
||||
if self._currCape and self._newLow is not None:
|
||||
@@ -144,19 +142,15 @@ class BubbleAlgorithm(QCAlgorithm):
|
||||
if self._newLow:
|
||||
self.Debug("New Low has been hit on " + str(self.Time))
|
||||
|
||||
# <summary>
|
||||
# Buy this symbol
|
||||
# </summary>
|
||||
def BuyStock(self,symbol):
|
||||
s = self.Securities[symbol].Holdings
|
||||
if self._macdDic[symbol].Current.Value>0:
|
||||
self.SetHoldings(symbol, 1)
|
||||
self.Debug("Purchasing: " + str(symbol) + " MACD: " + str(self._macdDic[symbol]) + " RSI: " + str(self._rsiDic[symbol])
|
||||
+ " Price: " + str(round(self.Securities[symbol].Price, 2)) + " Quantity: " + str(s.Quantity))
|
||||
# <summary>
|
||||
|
||||
# Sell this symbol
|
||||
# </summary>
|
||||
# <param name="symbol"></param>
|
||||
def SellStock(self,symbol):
|
||||
s = self.Securities[symbol].Holdings
|
||||
if s.Quantity > 0 and self._macdDic[symbol].Current.Value < 0:
|
||||
@@ -164,16 +158,12 @@ class BubbleAlgorithm(QCAlgorithm):
|
||||
self.Debug("Selling: " + str(symbol) + " at sell MACD: " + str(self._macdDic[symbol]) + " RSI: " + str(self._rsiDic[symbol])
|
||||
+ " Price: " + str(round(self.Securities[symbol].Price, 2)) + " Profit from sale: " + str(s.LastTradeProfit))
|
||||
|
||||
# <summary>
|
||||
# CAPE Ratio for SP500 PE Ratio for avg inflation adjusted earnings for previous ten years
|
||||
# Custom Data from DropBox
|
||||
|
||||
# CAPE Ratio for SP500 PE Ratio for avg inflation adjusted earnings for previous ten years Custom Data from DropBox
|
||||
# Original Data from: http://www.econ.yale.edu/~shiller/data.htm
|
||||
# </summary>
|
||||
class Cape(PythonData):
|
||||
|
||||
# <summary>
|
||||
# Return the URL string source of the file. This will be converted to a stream
|
||||
# </summary>
|
||||
# <param name="config">Configuration object</param>
|
||||
# <param name="date">Date of this source file</param>
|
||||
# <param name="isLiveMode">true if we're in live mode, false for backtesting mode</param>
|
||||
@@ -184,11 +174,9 @@ class Cape(PythonData):
|
||||
return SubscriptionDataSource("https://www.dropbox.com/s/ggt6blmib54q36e/CAPE.csv?dl=1", SubscriptionTransportMedium.RemoteFile)
|
||||
|
||||
|
||||
# <summary>
|
||||
# Reader Method :: using set of arguements we specify read out type. Enumerate
|
||||
# until the end of the data stream or file. E.g. Read CSV file line by line and convert
|
||||
# into data types.
|
||||
# </summary>
|
||||
''' Reader Method : using set of arguements we specify read out type. Enumerate until
|
||||
the end of the data stream or file. E.g. Read CSV file line by line and convert into data types. '''
|
||||
|
||||
# <returns>BaseData type set by Subscription Method.</returns>
|
||||
# <param name="config">Config.</param>
|
||||
# <param name="line">Line.</param>
|
||||
|
||||
Reference in New Issue
Block a user