Add BaseData.AdjustResolution

- Adding `BaseData.AdjustResolution()` that should return a valid
resolution for the given data and security type.
This allows us to set a limitation which is useful to avoid invalid data
requests or unnecessary fill forward situations. The user will be
notified through a console message.
- Adding unit and regression test
- Updating example algorithms custom data resolution
- Some performance improvements. Wont change console color if
`SelectedOptimization` is defined
This commit is contained in:
Martin Molinero
2019-10-28 12:57:09 -03:00
parent 7e33be1853
commit 1d43dcd601
40 changed files with 477 additions and 60 deletions
+2 -2
View File
@@ -37,8 +37,8 @@ class SECReportDataAlgorithm(QCAlgorithm):
self.SetCash(100000)
self.ticker = "AAPL"
self.symbol = self.AddData(SECReport10Q, self.ticker).Symbol
self.AddData(SECReport8K, self.ticker)
self.symbol = self.AddData(SECReport10Q, self.ticker, Resolution.Daily).Symbol
self.AddData(SECReport8K, self.ticker, Resolution.Daily)
def OnData(self, slice):
# OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.