Commit Graph

79 Commits

Author SHA1 Message Date
Adalyat Nazirov 1e3a1e3c43 Historical data requests start & time fix (#4733)
* regression tests

* fix: apply the same time convertion to history request time as for data time

* ver2

* fixup

* unit tests

* do not need this conversion because RoundDownInTimeZone returns in proper TZ

* comment

* requested changes

* refactoring

* more refactoring

* fix existing test: should return Sunday if open

* more symbols

* fix existing tests: submit new btcusd data

* fix

* add Cfd symbol
2020-09-24 14:51:35 -03:00
Michael Sena a5d7bdafde Add a futures universe selection model that uses open interest 2020-05-19 00:30:58 +10:00
AlexCatarino 898a5c2324 Addresses Peer-Review 2020-01-08 22:21:15 +00:00
AlexCatarino f205a7e8cd Refactors QC500 Universe and Universe Selection Model
The class field that tracks the current month is updated only if there are securities that passed the selection criteria. It prevents division by zero and allows the universe selection a new attempt on the next trading day while keeps the universe unchanged
2020-01-07 09:24:58 +00:00
Frank Norman 721e8c2c13 Added a check for zero denominator. 2020-01-07 08:45:17 +00:00
AlexCatarino 7ae63af388 Fixes LiquidETFUniverse Misplaced ETFs
`SHV`, `TBT` and `TBF` are `Inverse` ETF and were listed as `Long`.
`UGAZ` and `DGAZ` were in the opposite list.
`TVIX` was marked as `Inverse`.
2019-11-08 21:36:27 +00:00
Jared 63076f4a18 Merge branch 'master' into bug-3740-scheduled-universe-selection-model-time-zone 2019-11-08 07:56:41 -08:00
AlexCatarino fb76003048 Adds New Static Members to LiquidETFUniverse
New members represent the different ETF categories. Each one has a `List<Symbol>` for Long and Inverse ETFs.
2019-11-07 17:01:15 +00:00
Martin Molinero 98ae5cdd4e Fix TimeRules time zone issues
- `ITimeRules` are expected to yield time date in UTC, fixing `Noon`,
`Midnight` and `Every`
- `ScheduledUniverseSelectionModel` will use UTC time zone by default
since that is the default expected time zone `ITimeRule` provides
- Adding regression test
2019-11-04 15:34:57 -03:00
Jared e0f0a04f0f Update LiquidETFUniverse.cs 2019-11-01 20:48:55 -07:00
Jared 9a3ab283aa Update LiquidETFUniverse.cs 2019-11-01 20:41:21 -07:00
AlexCatarino 74d1f7b79c Adds Liquid ETF Universe Selection Model 2019-11-02 03:36:21 +00:00
AlexCatarino ee7e71e63c Improves ETF Basket Universe Selection Models
- Creates `CustomUniverseSelectionModel` that mimics `QCAlgorithm.AddUniverse(String, Func<DateTime, IEnumerable<string>>)`
- Replaces `BaseETFUniverse` for `InceptionDateUniverseSelectionModel` that inherits from `CustomUniverseSelectionModel`
- ETF Basket USMs inherits from `InceptionDateUniverseSelectionModel`
2019-10-03 23:26:43 +01:00
Jack Simonson fc52d9e730 Update VolatilityETFUniverse.cs
Removes DUST, which is an ETF tracking gold mining activity.
2019-10-03 11:04:09 -07:00
Jared 638af4186f Fix incorrect ticker 2019-10-02 17:52:31 -07:00
Jack Simonson 3cf8a3c95f Update USTreasuriesETFUniverse.cs
Remove duplicate ticker from the universe.
2019-10-02 09:46:32 -07:00
AlexCatarino 163fddcf75 Adds ETF Basket Universe Selection Models
Adds `BaseETFUniverseSelectionModel` that handles the common universe selection logic for all ETF Basket.
Adds the following ETF Baskets:
- Energy
- Precious Metals
- S&P500 Sectors
- Technology
- US Treasuries
- Volatility
2019-10-02 14:53:58 +01:00
Rohan Talip d046befcb7 Removed a print statement from FundamentalUniverseSelectionModel.py 2019-08-01 05:23:34 -07:00
Martin Molinero 1983f36792 Allow Python selection to return unchanged
- We will now check if python selection method returned `Universe.Unchanged`
- Removing `ToList()` call on fine and coarse data before sending it to
the python algorithm
- Adding regression algorithms
2019-07-31 15:36:07 -03:00
HalldorAndersen 13c9f6fd02 Update UncorrelatedUniverseSelectionModel.py 2019-04-11 15:23:03 -07:00
HalldorAndersen 5b8ec0160f Update UncorrelatedUniverseSelectionModel.py 2019-04-10 17:33:59 -07:00
HalldorAndersen 6e5b7ddd1d Update UncorrelatedUniverseSelectionModel.py 2019-04-10 16:31:04 -07:00
HalldorAndersen 682836677f Update UncorrelatedUniverseSelectionModel.py 2019-04-10 15:34:20 -07:00
Martin Molinero cfa08a11fb Address reviews
- Removing `using QCAlgorithmFramework = QuantConnect.Algorithm.QCAlgorithm`
- Removing `QCAlgorithmFrameworkBridge`
- Removing `IsFrameworkAlgorithm`
- Making `EmitInsightBasedOnFill` private. Adding new
`IOrderEventProvider` exposing an `event` to which `QCAlgorithm` will
subscribe.
- `AccountType.Cash` algorithms will be allowed to manually trade and
emight insights manually or with alpha model.
2019-04-03 21:55:44 -03:00
Martin Molinero 19f1806ddc Address review: readd Framework project 2019-04-03 21:55:43 -03:00
Martin Molinero 32ac3146b4 Merge Framework and Classic Algorithms
- Merging Framework and Bridge algorithms into classic QCAlgorithm
class.
- Removing Framework project, VS17 and VS15
2019-04-03 21:54:32 -03:00
HalldorAndersen 8509cf9f22 Update UncorrelatedUniverseSelectionModel.py 2019-04-01 10:50:16 -07:00
HalldorAndersen de753e0e43 Update UncorrelatedUniverseSelectionModel.py 2019-04-01 10:28:54 -07:00
HalldorAndersen 3fe468d2d5 Update UncorrelatedUniverseSelectionModel.py 2019-04-01 09:51:58 -07:00
HalldorAndersen 716652e6fa Rename UncorrelatedToBenchmarkUniverseSelectionModel.py to UncorrelatedUniverseSelectionModel.py 2019-03-26 11:20:29 -07:00
HalldorAndersen ac3667cef9 Rename UncorrelatedToSpyUniverseSelectionModel.py to UncorrelatedToBenchmarkUniverseSelectionModel.py 2019-03-26 10:18:30 -07:00
HalldorAndersen fdae6a9f9a Update UncorrelatedToSpyUniverseSelectionModel.py 2019-03-26 10:05:38 -07:00
HalldorAndersen 6e36e55836 Update UncorrelatedToSpyUniverseSelectionModel.py 2019-03-26 09:59:46 -07:00
HalldorAndersen 1194a04678 Update and rename Algorithm.Python/UncorrelatedToSpyUniverseSelectionModel.py to Algorithm.Framework/Selection/UncorrelatedToSpyUniverseSelectionModel.py 2019-03-25 16:40:27 -07:00
AlexCatarino 0d64032dfe Remove logging 2019-03-12 16:36:40 +00:00
AlexCatarino fa179b4659 Fix QC500 bugs and inconsistencies
- ConstituentsQC500GeneratorAlgorithm:
  - Change monthly flag to be consistent with Selection Model that cannot use Schedule events.
  - Use a Dictionary keyed by `Symbol` instead of `string`.
  - Selector functions return `Universe.Unchanged` instead of empty list;
  -Refactoring and more informative logging.
- QC500UniverseSelectionModel
  - SelectFine methods were performing all the logics every day and it should be only once per month
  - Log and return `Universe.Unchanged` before division by zero if universe drops to zero members after filtering before selection by sector.
  - Refactoring
2019-03-12 10:57:01 +00:00
Stefano Raggi 57d50c69c4 Fix XML documentation compiler warnings
- Fixed all warnings except for missing XML comments (CS1591)
2018-11-09 11:44:03 +01:00
Martin Molinero 2c2612aa71 Addressing reviews
- SecurityManager will no longer inherit ISecurityService
- Rebase from master
2018-10-18 16:45:16 -03:00
Martin Molinero a288648929 Creating new ISecurityService
- Adding new ISecurityService and its implementation SecurityService.
Expose by SecurityManager.
This class will expose a method for creating new securities. The
SecurityManager is exposing this new interface, calling _securityService
internally, so Future/OptionUniverseSelectionModel.cs can use it
- Replacing all usages of SecurityManager.CreateSecurity for new
ISecurityService
- Modifying `Cash.cs` and `CashBook.cs` `EnsureCurrencyDataFeeds()` to
return newly added `SubscriptionDataConfig` instead of `Security`. This
will avoid using `Security.Subscriptions` at call site.
- Moving old SecurityManager.CreateSecurity into new
SecurityServiceTests.cs
2018-10-18 16:25:32 -03:00
Martin Molinero eaba3ab24e Fix ManualUniverse duplicate effort
- Removed usages of algorithm.Securities.key as a parameter for the
`ManualUniverseSelectionModel()` since those securities, added through
`AddXXXX` calls will be managed by the `UserDefinedUniverse`. This was
causing for Universes to try to add the same subscription requests
- Adding new empty constructor for ManualUniverseSelectionModel,
required for Python
- ManualUniverse will return any existing SDC for the
symbol. This is for maintaining existing behavior and
preventing breaking changes: Specifically motivated by usages of
Algorithm.Securities.Keys as constructor parameter of the
ManualUniverseSelectionModel, since those Symbols added by Addxxx()
calls will already be managed by the UserDefinedUniverse
- Making some format modifications to aling with used Lean formatting
2018-10-12 18:30:04 -03:00
Martin Molinero 5221999b88 Addressing reviews
- Some formatting, comments changes
- Removing SubscriptionManager from new FuturesChainUniverse constructor
- Making Option and Future properties in FutureChainUniverse and
OptionChainUniverse
2018-10-04 16:08:12 -03:00
Martin Molinero 4e424c4f19 Refactor UserDefinedUniverse, UniverseSelection
- Obsolete Universe.CreateSecurity, Universe.SetSecurityInitializer,
Universe.GetSubscriptionRequests(Security security, DateTime currentTimeUtc, DateTime maximumEndTimeUtc)
- Adding new GetSubscriptionRequests() overload that will receive
instance which implementes new ISubscriptionService
- UserDefinedUniverse will stop using Security.Subscriptions
2018-10-02 09:59:23 -03:00
Stefano Raggi 9d2ed09068 Fix symbol name in ManualUniverseSelectionModel 2018-08-21 17:03:24 +02:00
AlexCatarino 38b03bfd28 Adds XML documentation for selection models 2018-08-01 18:47:46 +01:00
AlexCatarino 0bc157a8e7 Removes logging from framework models and algorithms
Shipped modules should be silent unless error case.
2018-07-31 19:16:17 +01:00
AlexCatarino e5ed09924b Implements BasicTemplateFuturesFrameworkAlgorithm
This algorithm shows how to implement a futures strategy in a framework algorithm.
`FutureUniverseSelectionModel` portfolio selection model was implemented to provide a base class to help create other futures universe selection models.
2018-07-30 22:21:47 +01:00
AlexCatarino 049fba334e Implements python version of OptionUniverseSelectionModel
Since `OptionUniverseSelectionModel` derives from `UniverseSelectionModel`, a python version of this class was also implemented.
2018-07-05 20:59:08 +01:00
AlexCatarino ac6564d4c5 Fixes UniverseSelectionModelPythonWrapper
- Typo in `GetNextRefreshTimeUtc` method.
- Logics bug in constructor.
2018-07-05 20:59:08 +01:00
Stefano Raggi 2ff5650b4a Add price and split factors to CoarseFundamental class 2018-06-01 12:19:06 +02:00
Michael Handschuh 65393d4e54 Replace config security with an option chain filter function
The ConfigureOptionChainSecurity method somewhat was overshadowing the security
initializer's responsibilities. This method has been trimmed down into a contract
filter function sub classes can use to define what option contracts they want to
select.
2018-06-01 00:36:17 -04:00