Commit Graph

305 Commits

Author SHA1 Message Date
AlexCatarino 88b97bd8e4 Adds overload to ScheduleManager.On method that accepts a PyObject parameter
Adding an overload to `ScheduleManager.On` method that accepts a `PyObject` parameter enables python algorithm to pass a method as parameter directly.
- Fixes `ScheduleEventsAlgorithm` to show the new feature in action.
2018-05-07 12:05:00 +01:00
AlexCatarino 61b5859446 Implements SectorExposureRiskFrameworkAlgorithm
This algorithm and its regression test are meant to test the `MaximumSectorExposureRiskManagementModel`.
2018-05-03 21:53:14 +01:00
Michael d878857e50 Merge pull request #1938 from StefanoRaggi/feature-1093-ib-time-in-force-day
Add TimeInForce.Day support in backtesting and IB brokerage
2018-05-03 14:33:40 -04:00
Michael 4eb896bbee Merge pull request #1946 from jingwu74/master
Fix issue of no traded options in OptionChainProviderAlgorithm
2018-05-02 20:36:55 -04:00
Michael Handschuh c25afbad29 Add fill/update/cancel times to order object
LastFillTime is updated on each partial/fill order event
LastUpdateTime is updated on each submitted order event w/ update count > 0
CancelTime is updated on canceled order events

Also fixes bug in regression algorithm where it used Time instead of UtcTime
for creating the SubmitOrderRequest object.
2018-05-02 14:16:33 -04:00
Jing Wu 7569467f45 fix bugs of no traded options 2018-05-01 15:34:40 -04:00
Stefano Raggi 2d19ab7ead Review TimeInForce handler interface
- removed IAlgorithm dependency from time in force handlers
- renamed GoodTilCancelled to GoodTilCanceled
- added GTC time in force in regression algorithms
- inlined initialization of time in force handler dictionary
2018-05-01 20:53:43 +02:00
Stefano Raggi 38ac2c5d72 Add TimeInForceAlgorithm regression tests 2018-04-30 20:18:18 +02:00
AlexCatarino 11489b3edf Modifies BasicTemplateFrameworkAlgorithm
- Use `MaximumDrawdownPercentPerSecurity` as `RiskManagementModel`.
- Modifies regression test to reflect risk model choice
- Use SetXXX to set models in python version
2018-04-27 23:08:53 +01:00
AlexCatarino 991b15a6d1 Adds python version of PairsTradingAlphaModelFrameworkAlgorithm 2018-04-25 13:45:44 +01:00
Michael 0c8119de8a Merge pull request #1889 from AlexCatarino/feature-1884-python-execution-models
Adds python version of execution model examples
2018-04-19 13:24:27 -04:00
AlexCatarino 4722e1cab5 Adds python version of execution models regression algorithms 2018-04-19 12:53:29 +01:00
AlexCatarino c4cde0e06d Adds python version of CompositeAlphaModelFrameworkAlgorithm 2018-04-19 11:32:33 +01:00
AlexCatarino b0265ba7f5 Adds support to python selectors in Renko Consolidators 2018-04-16 14:39:25 +01:00
AlexCatarino 35e8e0891e Fixes RenkoConsolidator for python
- Missing `event` keyword prevented pythonnet to recognize `DataConsolidated` as a event handler.
- Adds python version of `RenkoConsolidatorAlgorithm`.
2018-04-16 13:39:16 +01:00
Jared eb9e15c507 Merge pull request #1866 from jingwu74/master
Use available resolution in options and futures algorithms
2018-04-13 15:58:56 -04:00
Jing Wu 4c98817c9e change the benchmark setting 2018-04-12 18:33:01 -04:00
Jared 699bfe0812 Merge pull request #1861 from StefanoRaggi/bug-1820-crypto-basic-template
Update BasicTemplateCryptoAlgorithm to include crypto specific features
2018-04-12 17:05:07 -04:00
Jing Wu 4c86c5f3df change the resolution of option history request to minute 2018-04-12 16:54:57 -04:00
Jing Wu 955366ee48 change the resolution to minute for futures history request 2018-04-12 15:39:59 -04:00
AlexCatarino 41d539140f Fixes MeanVarianceOptimizationAlgorithm
Passes the selector method directly to the algorithm. Also, use `self.SetXXX` (closes #1856) for setting all the models.
2018-04-12 19:32:55 +01:00
AlexCatarino db1149b169 Adds python version of ScheduledUniverseSelectionModelRegressionAlgorithm 2018-04-12 17:09:54 +01:00
Stefano Raggi b2027c9022 Update BasicTemplateCryptoAlgorithm to include crypto specific features
Fixes #1820
2018-04-12 11:04:49 +02:00
AlexCatarino 61dce36ff9 Fixes readme 2018-04-09 19:04:11 +01:00
AlexCatarino 248926c644 Updates macOS installation instructions 2018-04-09 18:59:59 +01:00
AlexCatarino a4db921b87 Updates pythonnet
Rebase with pythonnet/master
2018-04-09 18:59:59 +01:00
Jared f32f351a4d Merge pull request #1832 from AlexCatarino/feature-1798-adds-meanvariancemodel
Implements MeanVarianceOptimizationAlgorithm
2018-04-08 20:27:17 -04:00
Jared 35edb6f802 Updates to use "UniverseSelection" property
The old name "PortfolioSelection" still on the example code. Updated to UniverseSelection
2018-04-08 20:21:48 -04:00
Jared 59e6451caf Update to consistently use properties setters 2018-04-08 20:17:12 -04:00
AlexCatarino 1d6e21af2c Use CoarseFundamentalUniverseSelectionModel in MeanVarianceOptimizationAlgorithm
With this universe selection model, we can show the consequences of a security removal from the universe
2018-04-06 19:46:19 +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
Michael Handschuh b1ac56d63c Fix capitalization of QC acronyms 2018-03-29 15:30:05 -04:00
Michael Handschuh c5704a1cd4 Rename SimplePortfolioConstructionModel -> EqualWeightingPortoflioConstructionModel
The simple name was too simple and too vague. Equal weighting nicely
describes the purpose and intent of this model
2018-03-26 17:33:13 -04:00
Jared b22f8f3cbf Merge pull request #1773 from Jay-Jay-D/bug-1772-Intrinio-error-too-many-requests
Intrinio error fixed, Python port and regression test added
2018-03-26 12:11:06 -04:00
Juan José D'Ambrosio b2b541483f Intrinio template modified, C# regression test added
Intrinio Python port added


Python regression test added


RateGate implemented in static IntrinioConfig


Clean stuff


Intrinio C# regression test pass


Intrinio working, Python port, C# regression test
2018-03-26 09:41:10 -03:00
AlexCatarino 543698f1f9 Updates installation instructions of python support on Linux
By default, miniconda is installed in the users' home directory, therefore the instalation instructions were changed to keep it simple.
2018-03-26 12:33:30 +01:00
Juan José D'Ambrosio e4f4943ec6 Update FractionalQuantityRegressionAlgorithm.py 2018-03-23 09:38:39 -03:00
Jared 10f81cbe3f Merge pull request #1744 from jingwu74/master
Add Python Example of DisplacedMovingAverageRibbon Algorithm
2018-03-22 09:48:09 -04:00
Jing Wu 0c9ad729b3 add project file of DisplacedMovingAverageRibbon.py 2018-03-21 18:27:41 -04:00
Jing Wu 5d02f3dc20 add python aexample of DisplacedMovingAverageRibbon algorithm 2018-03-21 18:26:59 -04:00
AlexCatarino eaabaef7f9 Fixes python version of BasicTemplateFrameworkAlgorithm
Renames AlphaType for `InsightType` and `AlphaDirection` for `InsightDirection`, since these `enum` were renamed in a previsous commit.
Adds this algorithm to regression tests.
2018-03-17 19:52:24 +00:00
Jing Wu 8cc38591c1 reformat code 2018-03-16 09:43:55 -04:00
Jing Wu 764c7e467a fixed bug with porting from python2 to python3 2018-03-15 17:18:40 -04:00
Jing Wu 75c5902f89 add CustomDataIndicatorExtensions Algorithm 2018-03-15 17:11:55 -04:00
Michael 88bd9c882f Merge pull request #1681 from StefanoRaggi/bug-1680-cash-model-use-quotes
Increase accuracy of order quantity calculation in CashBuyingPowerModel
2018-03-12 13:18:24 -04:00
AlexCatarino 9eb0999802 Removes installation instructions for macOS
Replaces the installation instructions for macOS to directions to github issue in pythonnet
2018-03-09 23:29:54 +00:00
AlexCatarino 444a50d977 Improves Algorithm.Python ReadMe
Simplifies ReadMe.
Adds the information about rebuilding LEAN to get the right
Python.Runtime.dll version in the bin folder.
2018-03-09 23:17:17 +00:00
Stefano Raggi 66822fb95c Simplify log statement in BasicTemplateCryptoAlgorithm.py 2018-03-09 17:36:32 +01:00
Stefano Raggi 1fcb4a6b96 Increase accuracy of order quantity calculation in CashBuyingPowerModel
Fixes #1680
2018-03-09 16:08:21 +01:00