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
@@ -37,7 +37,7 @@ class SECReport8KAlgorithm(QCAlgorithm):
# Request underlying equity data.
ibm = self.AddEquity("IBM", Resolution.Minute).Symbol
# Add news data for the underlying IBM asset
earningsFiling = self.AddData(SECReport10Q, ibm).Symbol
earningsFiling = self.AddData(SECReport10Q, ibm, Resolution.Daily).Symbol
# Request 120 days of history with the SECReport10Q IBM custom data Symbol
history = self.History(SECReport10Q, earningsFiling, 120, Resolution.Daily)