Commit Graph

429 Commits

Author SHA1 Message Date
Stefano Raggi 64fa74b5d5 Add missing import and fix indentation 2018-11-14 21:12:57 +01:00
Stefano Raggi 67e3e98546 Merge pull request #2692 from QuantConnect/bug-2670-intrinio-regression-test-failing
Increment Intrinio time between calls to 1 minute for testing
2018-11-14 19:03:19 +01:00
Juan José D'Ambrosio f6b5da261a Implement method for setting the time interval between calls
Update Python version of BasicTemplateIntrinioEconomicData
2018-11-14 14:10:59 -03:00
AlexCatarino 70e2ef9480 Changes the custom data type base class
By using the python object parant class, which is either `PythonQuandl` or `PythonData`, instead of `DynamicData`, the `AlgorithmManager.Stream` method can find a matching subcription data configuration used to create a data feed packet.

Closes #2694
2018-11-13 19:29:34 +00:00
AlexCatarino 25baaf179a Implements python version of TrailingStopRiskManagementModel
- Implements python version of `TrailingStopRiskManagementModel`
- Implements python version of `TrailingStopRiskFrameworkAlgorithm`
2018-11-07 15:50:40 +00:00
AlexCatarino 5389f9bf8b Implements python version of MaximumDrawdownPercentPortfolio
- Implements python version of `MaximumDrawdownPercentPortfolio`
- Implements python version of  `MaximumPortfolioDrawdownFrameworkAlgorithm`
2018-11-06 23:52:52 +00:00
AlexCatarino b20716a282 Adds python version CompositeRiskManagementModel
The C# version was supposed to handle python modules, but when they inherit from a C# module, pythonnet send them as C# objects. Consequently, they are not wrapped and cannot be used. The python version of `CompositeRiskManagementModel` solves the issue.

- Implements python version of `MaximumUnrealizedProfitPercentPerSecurity`

- Updates `CompositeRiskManagementModelFrameworkAlgorithm` in order to use python risk model.
2018-11-06 23:22:53 +00:00
Kamuela Franco 621765fbd0 Update ScheduledUniverseSelectionModelRegressionAlgorithm.py 2018-10-28 14:52:48 +00:00
Martin-Molinero 11f5bf2a74 Merge pull request #2629 from StefanoRaggi/bug-2628-custom-data-regression-fix
Fix failing CustomDataRegressionAlgorithm
2018-10-25 10:22:50 -03:00
Stefano Raggi 82e5af0408 Add CompositeRiskManagementModelFrameworkAlgorithm Python regression 2018-10-24 22:45:13 +02:00
Stefano Raggi ea55b8ba09 Fix failing CustomDataRegressionAlgorithm 2018-10-22 14:48:16 +02:00
Michael Handschuh 614451ca30 Merge pull request #2615 from AlexCatarino/feature-2614-implements-datadictionary-getvalue
Implements DataDictionary.GetValue
2018-10-18 12:25:27 -04:00
Alexandre Catarino 5e9fac14f4 Updates readme.md by adding direct links to the installers 2018-10-18 00:23:20 +01:00
AlexCatarino 6ee4363942 Implements DataDictionary.GetValue
`DataDictionary.GetValue` is meant to be used as an alternative to `DataDictionary.TryGetValue`. It was created due to limitations to the python implementation.
2018-10-17 22:18:12 +01: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
Stefano Raggi 399274b29b Fix ScheduledUniverseSelectionModelRegressionAlgorithm.py regression failure 2018-09-28 15:17:38 +02:00
Michael Handschuh fdc866fda0 Reverting 'Merge pull request #2483 python-history-provider'
We didn't experience the expected performance improvements. Locally under
unit test there was aboout an order of magnitude throughput increase, but
when run against the history benchmark, this new approach was 60% slower.
We're reverting this for now to perform further analysis and better
understand the performance profiling of the python history stack.
2018-09-18 18:37:23 -04:00
AlexCatarino 3e4a71cd50 Creates QCAlgorithm.py: a bridge between C# QCAlgorithm and python algorithms 2018-09-17 19:05:48 +01:00
AlexCatarino 720e0400fc Implements custom seed function to CustomSecurityInitializerAlgorithm 2018-09-17 18:28:59 +01:00
AlexCatarino 62d4cb837a Updates PythonPackageTestAlgorithm to use QCAlgorithm.Log instead of print 2018-08-28 15:06:34 +01:00
AlexCatarino 93a88eda95 Updates FractionalQuantityRegressionAlgorithm to use SetBuyingPowerModel 2018-08-21 16:49:07 +01:00
Michael b30d429be6 Merge pull request #2427 from QuantConnect/bug-2064-add-option-contract-throw-if-underlying-not-raw
AddOptionContract - throw if existing underlying equity not in Raw mode
2018-08-21 11:44:16 -04:00
Stefano Raggi b4a2536b86 AddOptionContract - throw if existing underlying equity not in Raw mode
Also added OptionChainProviderAlgorithm to regression test suite
2018-08-21 14:51:43 +02:00
AlexCatarino 76cc75006c Refactors BlackLittermanOptimizationPortfolioConstructionModel
1. Apply the pattern used in `EqualWeightingPortfolioConstructionModel`
2. Change the logic to compute the views from the insights.
3. Change the logis to compute the posterior mean and covariance

Use `UnconstrainedMeanVariancePortfolioOptimizer` in `BlackLittermanPortfolioOptimizationFrameworkAlgorithm` to bypass the difference in regression tests with `IPortfolioOptimizer` that rely on different algorithms in C# and python.

Adds unit tests for BLOPCV to test the implementation against Black and Litterman 1999 paper.
2018-08-20 21:01:14 +01:00
Martin Molinero ed33286842 Updating regression statistics 2018-08-15 21:10:49 -03:00
Jared Broad db0f85122c Increase the universe of assets to increase insights 2018-08-15 18:41:46 -04:00
Martin Molinero c1272874fb Adding regression statistics 2018-08-15 11:58:46 -03:00
Jared Broad ff172add77 Added missing examples to py proj 2018-08-14 21:28:35 -04:00
Jared Broad c4d0baab49 Added 2 example benchmark alphas 2018-08-14 18:43:45 -04:00
AlexCatarino 68dfe0648a Adds more requirements checks and updates readme 2018-08-13 11:56:51 +01:00
Stefano Raggi 3a93f3e4db Update download paths to cdn.quantconnect.com 2018-08-06 17:41:54 +02:00
Michael cfb05d190f Merge pull request #2328 from AlexCatarino/feature-2326-implements-futures-template-framework
Implements BasicTemplateFuturesFrameworkAlgorithm
2018-08-02 10:44:09 -04:00
Michael 65d3e43ef6 Merge pull request #2332 from QuantConnect/bug-2313-coarse-fundamental-regression-update
Update CoarseFundamentalTop5Algorithm to run as cloud regression test
2018-08-01 11:10:30 -04:00
Stefano Raggi dc4b961ec8 Update CoarseFundamentalTop5Algorithm to run as cloud regression test
- The algorithm has been renamed to CoarseFundamentalTop3Algorithm and updated to select the Top 3 instead of Top 5.
- The only new data required is daily, map and factor file for FB and has been added (map and factor files are dated 6/4/2018, as required by all regression tests).
- The coarse fundamental open source data has been updated.
- The expected regression statistics for the algorithm have been updated.
2018-07-31 21:20:06 +02: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 b741ed82a4 Minor fix in BasicTemplateFrameworkAlgorithm.py
Use python version of `EqualWeightingPortfolioConstructionModel` in python version of `BasicTemplateFrameworkAlgorithm`
2018-07-31 12:12:06 +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
Stefano Raggi 5382a0c72c Add Quandl API key to URL in CustomDataRegressionAlgorithm 2018-07-25 15:21:59 +02:00
Stefano Raggi 16f856031c Update start date for OptionSplitRegressionAlgorithm 2018-07-24 18:59:53 +02:00
Stefano Raggi 3d48efcbea Add Tiingo Daily Prices example algorithm 2018-07-24 13:24:52 +02:00
AlexCatarino d75794ede2 Adds indicator with custom data in BasicTemplateIntrinioEconomicData.
This addition aims to show that the fix of the preivious commit solves the bug.
2018-07-23 17:26:43 +01:00
AlexCatarino b0d1606118 Refactors portfolio construction models with portfolio optimization
- Creates `MinimumVariancePortfolioOptimizer` and `MaximumSharpeRatioPortfolioOptimizer` portfolio optimizer. They implement `Optimize` method that returns a array of float representing the portfolio weights.
- Refactors `BlackLittermanOptimizationPortfolioConstructionModel` and `MeanVarianceOptimizationPortfolioConstructionModel` to use the portfolio optimizers. Part of the logic in BLOPC was changed to match the MVOPC one.
- Adds `BlackLittermanPortfolioOptimizationFrameworkAlgorithm` similar to `MeanVarianceOptimizationFrameworkAlgorithm` that uses BLOPC.
2018-07-20 23:09:48 +01:00
Michael 0515893ba7 Merge pull request #2278 from QuantConnect/bug-2268-timeinforce-regression-fix
Fix TimeInForceAlgorithm regression tests
2018-07-19 10:17:41 -04:00
Stefano Raggi 1138b0c1e2 Fix TimeInForceAlgorithm regression tests 2018-07-19 11:52:40 +02:00
Stefano Raggi 7bd2a2049c Fix BasicTemplateFuturesAlgorithm C#/Python difference 2018-07-19 00:57:34 +02:00
Michael 975c2845c3 Merge pull request #2246 from QuantConnect/feature-2245-updates-pythonnet
Update pythonnet version to v1.0.5.8
* Includes fix for date time UTC bug
2018-07-18 11:26:19 -04:00
Michael 3bf8cd228b Merge pull request #2259 from AlexCatarino/master
Fixes typo in PearsonCorrelationPairsTradingAlphaModelFrameworkAlgorithm.py
2018-07-18 10:55:17 -04:00
AlexCatarino 6fcb381c46 Fixes typo in PearsonCorrelationPairsTradingAlphaModelFrameworkAlgorithm.py
The lookback period for one year should be 252, since one year has 252 trading days.
2018-07-17 22:18:17 +01:00
Juan José D'Ambrosio ae99f7b9a1 Add Python version
Add comments to `IRegressionAlgorithmDefinition` members.
2018-07-17 18:01:53 -03:00
AlexCatarino 8e3b7153b2 Rebase with pythonnet/master and fix datetime UTC bug
Updates pythonnet with pythonnet/master and fix datetime issue ([65ac279](https://github.com/QuantConnect/pythonnet/commit/65ac279a03dbded39fe3e28bb79c233f0c970f6f)).
2018-07-16 11:52:54 +01:00