Commit Graph

13 Commits

Author SHA1 Message Date
Martin Molinero e294b3c3e2 Fix overflow exception
- Adding new `AlgorithmSettings` Min and Max absolute portfolio target
percentage
- Adding new `PortfolioConstructionModel.FilterInvalidInsightMagnitude()`
helper method that will be used by the `BlackLitterman` and
`MeanVariance` optiomization portfolio construction models to skip
insights with extreme magnitudes that will cause exceptions
- `PortfolioTarget.Percentage()` will now verify requested percent is
withing the settings values
2019-05-23 20:30:44 -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
Stefano Raggi 399274b29b Fix ScheduledUniverseSelectionModelRegressionAlgorithm.py regression failure 2018-09-28 15:17:38 +02:00
Stefano Raggi 0f86363def Add missing null checks in Python models 2018-08-21 18:23:50 +02: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
AlexCatarino cfcc387f7f Fixes Div by Zero exceptions in framework models 2018-07-19 15:05:05 +01:00
AlexCatarino ab59c6970a Python portfolio construction models subclass C# PortfolioConstructionModel 2018-05-15 20:53:12 +01:00
AlexCatarino fd461ed252 Refactors python framework models to avoid using generator
We are not using python lists instead of generator (yield) because we get better exception information in this case. The aim is to lead users to avoid using generators and/or know its limitations.
2018-04-26 19:31:11 +01:00
AlexCatarino a73cf3e328 Fixes HistoricalReturnsAlphaModel and MeanVarianceOptimizationPortfolioConstructionModel
Those models were not handling security removal properly. Once a security is removed, consolidators need to be removed.
2018-04-06 19:44:15 +01:00
AlexCatarino 133d2cd461 Implements peer-review requests
1. `HistoricalReturnsAlphaModel`:
   1. Adds lookback period for return calculation
   2. Adds return-depend direction to insights
   3. Refactors indicator history warm-up
2. `MeanVarianceOptimizationPortfolioConstructionModel`:
   1. Adds lookback period for return calculation
   2. Adds exception for null magnitude
   3. Refactors indicator history warm-up
3. Other minor fixes:
   1. Default target return was 2 instead of 0.02 (2%)
   2. Proper removal of consolidator subscriptions
2018-04-06 00:28:05 +01:00
AlexCatarino 92238a02fc Implements MeanVarianceOptimizationAlgorithm
This framework algorithm alpha model is  HistoricalReturnsAlphaModel and the  portfolio construction model is MeanVarianceOptimizationPortfolioConstructionModel.
This examples implements an algorithm that rebalances the portfolio according to modern portfolio theory.
2018-04-06 00:28:05 +01:00