Commit Graph

686 Commits

Author SHA1 Message Date
Jared 16124d17f7 Merge pull request #3059 from AlexCatarino/feature-3058-python-manual-universe-selection-model
Implements the Python Version of ManualUniverseSelectionModel
2019-04-08 13:35:40 -07:00
Martin Molinero 91f19f781d Implement AddUniverseSelectionModel
- Implementing `QCAlgorithm.AddUniverseSelectionModel`
- Adding C#/Py regression algorithms using the new API
- Modifying `ManualUniverSelectionModels` symbol, adding hash of
the selected `Symbol.Values`
- Modifying `Coarse` and `Fine` symbol, adding random GUID
- Adding `NullUniverseSelectionModel`
2019-04-08 16:58:42 -03:00
AlexCatarino dc4dd7dfcb Required Changes after Classic/Framework Merge 2019-04-08 20:30:14 +01:00
Martin Molinero 4d108094e5 Implement QCAlgorithm.AddRiskManagement
- Implemention `QCAlgorithm.AddRiskManagement`
- Adding Py/C# regression test algoririthms
- Moving `CompositeRiskManagementModel` from `Framework` to `Algorithm`
project
2019-04-08 10:53:06 -03:00
AlexCatarino 2801bc6218 Removes G10CurrencySelectionModel from Algorithm.Framework
Removes `G10CurrencySelectionModel` from `Algorithm.Framework` and implement them in the `G10CurrencySelectionModelFrameworkAlgorithm`
Minor change in the Python version of `ManualUniverseSelectionModel` to improve exception messages.
2019-04-05 23:16:55 +01:00
AlexCatarino a0dce83b72 Implements G10CurrencySelectionModel
Implements `G10CurrencySelectionModel` as an example of a selection model with a fixed list of securities.
2019-04-05 23:16:46 +01:00
Jared d9ee31c979 Merge pull request #3055 from QuantConnect/feature-3041-merge-framework-classic-algorithm
Merge Framework, Bridge and Classic Algorithms
2019-04-05 14:54:31 -07:00
Martin Molinero 68d9f48c2d Address reviews
- Adding new `CompositeAlphaModel.AddAlphaModel()`
- Adding C#/Py regression algorithms using the new `QCAlgorith.AddAlphaModel()`
- Improving exception message
- Add python version of `QCAlgorith.AddAlphaModel()`
2019-04-05 18:34:18 -03:00
Martin Molinero 4bc7ec124c Rebase - Improve exception message 2019-04-03 22:00:27 -03: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
Jack Simonson 363c07fa23 Stylistic changes from alex and jared 2019-04-03 17:39:39 -07:00
Jack Simonson e0d742f8e1 minor formatting changes per recommendations from Jared 2019-04-03 16:25:57 -07:00
Jack Simonson 849d7080a1 CSharp and Python versions of new alpha, MortgageRateVolatilityAlpha 2019-04-03 15:52:30 -07:00
AlexCatarino 45eb639dfa Adds Example Algorithm of Expiry Helper Class Usage in Alpha Models 2019-04-03 22:08:52 +01:00
Jared 2d35b61017 Merge pull request #3049 from QuantConnect/feature-3046-update-pythonnet
Updates pythonnet to 1.0.5.19
2019-04-03 09:06:26 -07:00
Stefano Raggi 875666f42d Fix date bug in BaseDataCollectionSubscriptionEnumeratorFactory
This bug was causing coarse data to be shifted ahead one day and was introduced in PR #2996
2019-04-02 20:43:23 +02:00
AlexCatarino da6519b9f4 Updates pythonnet to 1.0.5.19
Updates PythonNet to 1.0.5.19
 - Related  https://github.com/QuantConnect/pythonnet/pull/28/
2019-04-02 17:17:40 +01:00
Martin Molinero 9d5b1f5be6 Fix auto generated insight period
- Updating regression test to assert of period value
2019-03-28 18:43:09 -03:00
Jared c5d4be415c Merge pull request #3033 from QuantConnect/feature-3032-update-pythonnet
Updates pythonnet to 1.0.5.18
2019-03-28 11:11:39 -07:00
Jared 9bf537a9b3 Merge pull request #3030 from QuantConnect/feature-3029-order-based-insight-autogeneration
Emiting Insights based on Order Fills
2019-03-28 10:04:54 -07:00
AlexCatarino 6d2460d8ed Updates pythonnet to 1.0.5.18
- Updates PythonNet to 1.0.5.18
  - Cherry picks the memory leak fix from upstream/pythonnet
2019-03-28 00:47:38 +00:00
Martin Molinero 5b04cfe202 Emiting Insights based on Fills
- Classic Algorithms will emight insights based on order fills.
   - To be able to update generated insights closed time, we will not
   clone emitted insights.
   - `InsightAnalysisContext` will update `AnalysisEndTimeUtc` when the
   Insight period is closed and the period is `EndOfTimeTimeSpan`
- Adding new regression algorithm asserting on the new emitted insights
- Adding unit tests
- `LiveTradingResultHandler` will store `AlphaRunTimeStatistics`
- Making `DefaultAlphaHandler.ProcessAsynchronousEvents` virtual to
facilitate cloud changes
2019-03-26 16:09:22 -03:00
Stefano Raggi d215d0a9f7 Add CfdTimeZonesRegressionAlgorithm 2019-03-14 12:13:14 +01:00
Stefano Raggi 5ddcf12428 Remove order event logging in BasicTemplateFuturesAlgorithm
Regression run time is now about 50% less
2019-03-14 12:03:41 +01:00
Jared 206d3bee50 Merge pull request #2997 from QuantConnect/bug-2994-qc500-inconsistencies
Implements IndexUniverseDefinitions
2019-03-13 08:17:02 -07:00
AlexCatarino fc780e6136 Remove logging 2019-03-12 21:56:09 +00:00
Jared 84b93d6e7c Merge pull request #2996 from QuantConnect/coarse-fundamental-updates
Remove Potential Look-Ahead Bias in Backtesting with Coarse Fundamental Data
2019-03-12 12:02:45 -07:00
AlexCatarino 6cc832c782 Implements IndexUniverseDefinitions
In this new UniverseDefintions, a member, QC500, defines the QC500 Universe. This helper can be used to add that custom universe to the user algorithm (both in C# and Python).
2019-03-12 18:50:18 +00:00
Stefano Raggi bd361fce3e Add comments for CoarseNoLookAheadBiasAlgorithm 2019-03-12 18:23:53 +01:00
Jared bba622a580 Merge pull request #2995 from AlexCatarino/bug-2994-qc500-inconsistencies
Fix QC500 bugs and inconsistencies
2019-03-12 09:58:00 -07:00
Jared 1e7fee1800 Merge pull request #2984 from AlexCatarino/feature-2950-adds-csharp-exemple-alphas
Adds matching version of C# and Python Alpha algorithms
2019-03-12 09:57:48 -07:00
AlexCatarino 0d64032dfe Remove logging 2019-03-12 16:36:40 +00:00
Stefano Raggi 9104655084 Update expected stats for regression algorithms using coarse data 2019-03-12 15:29:56 +01:00
Stefano Raggi c53ceaba09 Add CoarseNoLookAheadBias regression algorithm 2019-03-12 14:40:11 +01: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 e37acc3601 Update sample coarse data files 2019-03-11 22:02:32 +01:00
Jared e24f506486 Merge pull request #2983 from simonsonjack/university_updates
Python Demo Algorithm Updates
2019-03-08 18:46:55 -08:00
Jack Simonson 276b4c4484 Revert Qaundl class subscription data source, edit quandl tickers for examples to ensure compilation 2019-03-08 17:17:34 -08:00
Jack Simonson a55f90fe1c Rolled back QuoteBar to var 2019-03-08 15:40:19 -08:00
gsuatvo 5e5c83b391 Convert file example encoding to utf-8 2019-03-07 09:34:10 -08:00
Jack Simonson 11e66df6af Fix to ensure proper function and match Python algo. (#2985)
* Previous version entered Nifty OnData method prior to initializing CorrelationPair in DollarRupee method

Made this adjustment to ensure that CorrelationPair is properly instantiated -- previous method didn't initialize it in DollarRupee OnData method and so failed in evaluation later. Also, the Python version of this algo. used Portfolio.MarginRemaining to calculate quantity and so I changed this one to ensure they return the same results.

* Minor spacing edits to make cleaner
2019-03-07 09:09:44 -08:00
Jack Simonson fe757b7fca Added QuoteBar types to ensure proper function 2019-03-06 10:23:24 -08:00
AlexCatarino 89817a7b96 Adds GasAndCrudeOilEnergyCorrelationAlpha
- Adds C# version
- Some improments in python version
  - Refactors the CorrelationPairsSelection
  - Replace history request for rolling window
2019-03-05 23:01:07 +00:00
AlexCatarino df6bdedd64 Adds GreenblattMagicFormulaAlpha
- Adds C# version
- Minor improments in python version
2019-03-05 22:53:38 +00:00
Jack Simonson ffec0e3fe3 Setting brokerage to GDAX returns error, These mdoels are currently unsuitable for Cash Modeled brokerages, but GDAX does not support Margin trading either 2019-03-05 09:56:59 -08:00
AlexCatarino 6ca82fd196 Further Fixes From Peer-Review 2019-03-02 01:06:09 +00:00
AlexCatarino 774b32bc5f Apply Fixes Suggested by Peer-Review 2019-03-02 00:34:12 +00:00
AlexCatarino 0423e3d54d Adds C# version of IntradayReversalCurrencyMarkets 2019-03-01 14:55:08 +00:00