Commit Graph

60 Commits

Author SHA1 Message Date
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
Michael Handschuh 398e4d5856 Refactor IUniverseSelectionModel.NextRefreshTime into method
Methods are much easier to manage in python that implementing properties.
2018-05-31 14:58:39 -04:00
Michael Handschuh ad331118ab Add refresh to IUniverseSelectionModel to support dynamic universes
This change allows the universe selection model to select different universe
definitions as time proceeds. This enables the definition of a universe model
that, for example, could add option chains for securities selected by a different
universe model.

The BasicTemplateOptionsFrameworkAlgorithm was added to showcase and provide
regression for a universe model that selects different universes.
2018-05-31 11:48:23 -04:00
AlexCatarino 16a80ecbec Fixes CreateUniverses method modifier
`UniverseSelectionModelPythonWrapper.CreateUniverses` method modifier should be `override` instead of `virtual`, since that class inherit from `UniverseSelectionModel`.
2018-05-30 22:29:29 +01:00
Michael 8534df4e20 Merge pull request #1979 from AlexCatarino/feature-1961-python-qc500
Implements python version of QC500UniverseSelectionModel
2018-05-11 14:47:09 -04:00
Michael Handschuh afbbf9b1f4 Add UniverseSelectionModel base class
Update existing models to derive from new base class
2018-05-11 01:50:45 -04:00
AlexCatarino f723952457 Implements python version of QC500UniverseSelectionModel 2018-05-09 11:37:25 +01:00
AlexCatarino ff574b9d86 Fixes EmaCrossUniverseSelectionModel indicator update logic
Instead of using the `&&` operator, use `&` so that both EMA are updated.
2018-05-08 19:47:20 +01:00
AlexCatarino 5d6dea6473 Simplify EmaCrossUniverseSelectionModel by using list instread of dict 2018-05-08 18:54:17 +01:00
AlexCatarino 04f357f2b8 Implements python version of EmaCrossUniverseSelectionModel
Adds EmaCrossUniverseSelectionModel and EmaCrossUniverseSelectionFrameworkAlgorithm to show the new model in action
2018-05-08 18:54:17 +01:00
AlexCatarino 433feff1df Implements python version of FundamentalUniverseSelectionModel
- This version serves two purposes: example of universe selection model and base class for other universe selection models, since the pythonnet doesn't deal well with inheritance of abstract classes.

- Adds PyObject overload to `CoarseFundamentalUniverse`.
2018-05-08 18:54:17 +01:00
AlexCatarino b476e22e41 Implements EmaCrossUniverseSelectionModel
Adds EmaCrossUniverseSelectionModel and EmaCrossUniverseSelectionFrameworkAlgorithm to show the new model in action
2018-05-08 18:54:17 +01:00
Michael Handschuh 353e62c6e9 Make universe selection models overrideable 2018-05-07 16:13:07 -04:00
AlexCatarino 264da8a596 Calls python destructor to trigger exceptions
The exception in ignored because the generator isn't closed until it is being deleted (automatically in this case, when Python exits); the generator __del__ handler closes the generator, which triggers an exception of there is one.
2018-04-26 18:46:33 +01:00
Michael Handschuh 0ddc160028 Fix ManualUniverseSelectionModel w/ custom data present
We add entries for custom data w/ symbol references, so the generic look
up being performed here never resolves and throws an exception. With
custom data we add the entry manually and that same pattern has been
repeated here for consistency.
2018-04-20 17:37:39 -04:00
Michael Handschuh c1c741f55f Remove canonical symbols from manual universe model
This happens when users pass Securities.Keys into the manual model,
causing the SecurityChanges object to have references to the canonical
securities, thereby leading to indicators and other things being
done to them unknowningly.
2018-04-20 09:32:22 -04:00
AlexCatarino df698d1925 Adds constructor overloads with PyObject parameter to UniverseSelectionModel
The PyObject parameter is converted into selector function of `Func<T1,T2>` type so that the model can user universe selector methods defined in python algorithms.
2018-04-12 17:09:03 +01:00
Michael Handschuh 3db242203e Add ScheduledUniverseSelectionModel
The ScheduledUniverseSelectionModel wraps the new ScheduledUniverse.
ScheduledUniverse is similar to the UserDefinedUniverse we use to create
universes for dopbox/remote files w/ symbol listing. The new abstraction
that 'turns on' this no-data/scheduled based universe behavior is the
ITimeTriggeredUniverse, which exposes GetTriggerTimes which yields the
date/times your univese selection function will be called.

A regression algorithm was also added to cover the new feature.
2018-04-10 19:24:36 -04:00
Michael Handschuh b1ac56d63c Fix capitalization of QC acronyms 2018-03-29 15:30:05 -04:00
Michael Handschuh d87c121d4b Rename IPortfolioSelectionModel -> IUniverseSelectionModel 2018-03-29 12:18:44 -04:00