Commit Graph

978 Commits

Author SHA1 Message Date
Juan José D'Ambrosio b1734d6948 IndicatorSuiteAlgorithm implemented in Python 2018-02-28 21:45:56 -03:00
Michael Handschuh 18a559943e Upgrade LEAN Python to 3.6 from 2.7
- Adds log to display the python version the algorithm is using.
- Fixes python algorithms that were failing because of small subtleties
like leading zeroes.
- Updates pythonnet with a version compiled with python 3.6 flags

- Changes in DockerfileFoundation: we now use miniconda to manage the python
environment.
- Took the opportunity to add NTLK (#1349), Tensorforce (#1369) and
PyTorch/Pyro (#1385).
- Changes readme in Algorithm.Python to show steps to install miniconda
2018-02-23 15:09:06 -05:00
Stefano Raggi a39e6a8e28 Revert "Merge pull request #1526 from AlexCatarino/python3"
This reverts commit 2e523992d0, reversing
changes made to fa48fc23ea.
2018-02-14 16:03:12 +01:00
AlexCatarino 34a271adac Updates pythonnet
In this update, we had compiled pythonnet with python 3.6 instead of 2.7 flags
2018-02-13 13:00:50 +00:00
Stefano Raggi 23c4e0ccd9 Fix rebase conflicts 2018-02-12 17:40:28 +01:00
Stefano Raggi a5f02d646b Add comment for BuyingPowerModel in FractionalQuantityRegressionAlgorithm 2018-02-12 17:40:27 +01:00
Stefano Raggi c235dc7ada Add BasicTemplateCryptoAlgorithm
Also added both C# and Python versions as regression tests
2018-02-12 17:40:26 +01:00
Stefano Raggi 415542fcbc Set CashBuyingPowerModel as default for Crypto/GDAX 2018-02-12 17:38:12 +01:00
Michael Handschuh fc4ce5da43 Add extra logging to CoarseUniverseTop5DollarVolumeAlgorithm
This was added to confirm no changes of substance happened as a result of
altering the subscription synchronization code. Leaving these in as debug
aids in case of further failures w/ this algorithm.
2018-02-06 19:52:31 -05:00
Michael Handschuh c9f82d4228 Extend option split regression to include split warning event 2018-02-05 12:12:55 -05:00
Jared 92b3ab33c3 Merge pull request #1504 from AlexCatarino/multisymbolalgofix
Fixes MultipleSymbolConsolidationAlgorithm
2018-01-29 15:12:56 +00:00
Jing Wu b94e62f796 fix sign typo 2018-01-25 15:03:58 -05:00
AlexCatarino 29a002575c Fixes MultipleSymbolConsolidationAlgorithm
It was using TradeBarConsolidator for forex whereas it should use QuoteBarConsolidator
2018-01-24 18:17:23 +00:00
Jared Broad 29e62968c9 Add python examples, improve comments 2018-01-15 18:55:06 -05:00
Jared Broad b54f165006 Added library example to LEAN 2018-01-15 18:22:22 -05:00
Jared d01ac3b980 Merge pull request #1360 from Jay-Jay-D/IntrinioEconomicDataIndices
Intrinio economic data indices
2018-01-12 12:35:09 -05:00
Juan José D'Ambrosio 41d1646a27 SetUserAndPassword static method moved to IntrinioConfig 2018-01-08 19:32:32 -03:00
Juan José D'Ambrosio fc888265ea static class IntrinioConfig added 2018-01-05 21:50:57 -03:00
AlexCatarino 9459f47cba Updates pythonnet
In this update, methods overloads with decimal parameters accept python float.

- Fixes FractionalQuantityRegressionAlgorithm:
With the pythonnet update we can pass a python float where a decimal is required.
2017-12-29 17:25:48 +00:00
Jared 702bb5616d Merge pull request #1430 from jingwu74/master
add OptionChainProviderAlgorithm
2017-12-26 09:47:04 -05:00
Jared ed87e19020 Merge pull request #1429 from StefanoRaggi/fractional-quantity-regression
Update FractionalQuantityRegressionAlgorithm
2017-12-22 19:44:11 -05:00
Stefano Raggi c6693cb237 Disable automatic security seeding
In this PR we are disabling the default security seeding (automatically getting the last price for a security when added to the algorithm) for a couple reasons, both when using large universes:
- In live trading, these history requests are sent to a history server, potentially causing timeouts
- In backtesting, depending on the algorithm this could also cause slowdowns up to 30%
2017-12-22 21:49:14 +01:00
Juan José D'Ambrosio dab155c51d Merge branch 'master' into IntrinioEconomicDataIndices 2017-12-22 13:27:52 -03:00
Jing Wu 7373d85d4a remove data normalization setting 2017-12-22 10:09:40 -05:00
Jing Wu 4a4ba49aed fix indentation 2017-12-21 15:20:33 -05:00
Jing Wu 03057e9ca2 add OptionChainProviderAlgorithm(Csharp) 2017-12-21 14:37:12 -05:00
Stefano Raggi 51e7726431 Update FractionalQuantityRegressionAlgorithm
This algorithm has been updated because of the recent minimum order size change (in PR #1400).

Also, PR #1428 needsto be merged for the test to pass.
2017-12-21 11:31:10 +01:00
andrewhart098 c606a67b33 Merge pull request #1355 from AlexCatarino/pythonnet-update
Updates pythonnet
2017-12-20 16:30:54 -05:00
AlexCatarino 98a1b6a2a2 Refactors options algorithms
AddEquity and SetDataNormalization calls were removed because they are not mandatory since PostInitialize calls them.
2017-12-18 11:24:08 +00:00
AlexCatarino c912c0d190 Updates pythonnet
In this update, we fixed type correspondence from C# Decimal to python decimal that caused wrong method overload binding.
2017-12-18 10:57:26 +00:00
Juan José D'Ambrosio b644e05328 Clean old stuff 2017-12-15 20:41:05 -03:00
Juan José D'Ambrosio a330f63506 Intrinio example algorithm cleaned 2017-12-15 20:27:21 -03:00
Michael Handschuh b4b3aae112 Rename Signal -> Alpha
Whoa... I think I got everything :)
2017-12-15 18:24:58 -05:00
Michael Handschuh 5910bc620f Add ISignalHandler
Handles signals generated by the algorithm. The default implementation
sends a SignalPacket to the messaging handler.
2017-12-12 08:56:19 -05:00
Juan José D'Ambrosio ab4ff006d9 Merge remote-tracking branch 'origin/IntrinioEconomicDataIndices' into IntrinioEconomicDataIndices 2017-12-11 12:56:13 -03:00
Juan José D'Ambrosio 76dc84aa2a Time between API call adjusted
Basic rought oil arbitrage strategy.
2017-12-11 12:55:49 -03:00
Michael Handschuh d0b7c9b31e Make ISignal.Period a required field
Requiring a period here forces signal models to place a time frame on
when their signal is valid. This also allows consumers of signals to
have some expectation of when a prediction should come to fruition.
2017-12-10 08:41:29 -05:00
Juan José D'Ambrosio 65241a2279 Merge branch 'master' into IntrinioEconomicDataIndices 2017-12-09 20:05:40 -03:00
Michael Handschuh 2f319fdbdf Add MACDSignalModel and CustomFrameworkModelsAlgorithm 2017-12-08 10:07:54 -05:00
Michael Handschuh 8093a818c7 Rename Direction -> SignalDirection
This follows the naming convention of the other direction enums
2017-12-08 10:07:54 -05:00
Michael Handschuh dac63225cf Set default executon and risk management models 2017-12-08 10:07:54 -05:00
Michael Handschuh d6496ebb85 Change ManualPortfolioSelectionModel to accept params Symbol
This will make life easier for python while also keeping things easy for csharp.
2017-12-08 10:07:54 -05:00
Michael Handschuh 160a28076c Use simpler ManualPortfolioSelectionModel constructor for example 2017-12-08 10:07:54 -05:00
Michael Handschuh 755dcb30ab Add IRiskManagementModel
The risk management model is intended to check the algorithm's positions
at the end of each time step to potentially exit positions that are losing
too much.
2017-12-08 10:07:54 -05:00
Michael Handschuh 7076928904 Add IExecutionModel
The execution model is responsible for executing trades to achieve the desired
portfolio targets
2017-12-08 10:07:54 -05:00
Michael Handschuh 343bbf2c59 Add IPortfolioConstructionModel
The portoflio construction model generates portoflio targets from signals
2017-12-08 10:07:53 -05:00
Michael Handschuh 514434692b Add ISignalModel
This change includes a check to prevent users from overriding methods  required
by the framework. This is non-ideal and we should perhaps look into alternatives
to this approach, which could involve additional methods on IAlgorithm. In order
to not lose access to these events at the algorithm level, we could expose them
as C# events (not sure python compatibility?)
2017-12-08 10:07:53 -05:00
Michael Handschuh e4e82bd2bc Add BasicTemplateFrameworkAlgorithm
This example algorithm serves as a template for building framework algorithms
2017-12-08 10:07:53 -05:00
Stefano Raggi 0c42c1ad1d Remove SetBenchmark call from WeeklyUniverseSelectionRegressionAlgorithm 2017-12-06 18:55:46 +01:00
Stefano Raggi 88be6d245b Fix bugs in WeeklyUniverseSelectionRegressionAlgorithm
This algorithm had a couple of issues:
- it was using a coarse universe with no data files available, so it has been changed to use a custom universe
- it was using algorithm time instead of selection time in the selector function

The regression stats have also been updated to match the new algorithm code.
2017-12-06 17:58:33 +01:00