Commit Graph

1000 Commits

Author SHA1 Message Date
Michael 9b23180ec9 Merge pull request #1358 from Maly-Lemire/master
Added SetWarmUp resolution parameter.
2017-12-04 11:24:02 -05:00
AlexCatarino dfffbd6953 Adds IFutureChainProvider interface with base implementations
- Move BacktestingFutureChainProvider provider to Lean.Engine.DataFeeds along with its options equivalent.

- EmptyFutureChainProvider: provider that returns an empty list of symbols
- CachingFutureChainProvider: implements caching by date
- BacktestingFutureChainProvider: provider that gets chain from local files
- LiveFutureChainProvider: provider that gets chain from external source (empty list of symbols for now)
2017-12-04 14:16:59 +00:00
AlexCatarino 4c982f37f9 Fixes CalculateOrderQuantity
Since we were not rounding off feeToPriceRatio, we were reducing order quantity more than needed in limit cases.
Fixes RegressionTests that were wrongly modified.
2017-12-04 14:04:27 +00:00
AlexCatarino 122ff90e23 Fixes CalculateOrderQuantity to handle decimal quantities
In quantity calculation, we didn't reduce the order quantity by decimal numbers, leading to a big step when dealing with crypto-currencies. For example, from 2.3456 it would drop to 1.3456 where values in between should've been tested.
2017-12-04 14:03:03 +00:00
Maly-Lemire ba30b2c547 Merge branch 'master' into master 2017-11-29 21:12:16 -05:00
Maly Lemire 657d98fa59 Added SetWarmUp resolution parameter. 2017-11-29 20:57:41 -05:00
AlexCatarino 783d841a59 Changes AddData method return type
Unlike other methods used to add securities to the algorithm that return a Security or a derived object, AddData was returning void. This commit change it to return Security for consistency.
2017-11-16 14:41:08 +00:00
Andrew dcd6f478a0 Include the TickType in the HistoryPacket
Currently the HistoryRequest includes information regarding the tick type, but that information is not passed to the HistoryPacket. Therefore, only the common data types for a history request are returned for history requests. This is problematic for crypto history requests that specify Trade History.
2017-11-13 15:25:10 -05:00
Andrew 357c6c79c4 Lift History request restrictions on Crypto security types
Currently, Crypto security types are restrictied to history requests that return QuoteBars. This removes that restriction and allows Crypto securities to make TradeBar history requests.
2017-11-12 16:57:12 -05:00
Jared 4da946fe6c Merge pull request #1269 from andrewhart098/symbol-tostring-no-subscription
When string cannot be converted into a symbol, log an error message
2017-11-01 15:22:24 -04:00
Andrew bf3eadf0c9 Throw when History methods recieve Symbol.Empty
Often users will request History with a string instead of a Symbol. Because of the implicit conversion between Symbol and string, this only works if the ticker has been first added to the algorithm as a security using a method like AddSecurity(), AddEquity() etc. This commit checks for failed implicit conversions in History request and returns an error message to the user that should better enable users to debug what has gone wrong.
2017-11-01 15:13:16 -04:00
AlexCatarino b31e7e18a6 Adds support for Historical Requests of Custom Data for python 2017-11-01 12:43:06 +00:00
Jared dccbf635c8 Merge pull request #1264 from QuantConnect/ib-fills-fees
Add Financial Advisor support and Real Order Fees to IB Brokerage
2017-10-27 14:56:47 -04:00
Michael Handschuh 205b1cde3c Add QCAlgorithm.AddSeries method
Adding a scatter plot is an involved process because there's not
direct and easy way to just define a series object. This change
allows an algorithm to simply define the series without pumping
any data into it. This allows the user to set the series type and
the unit for the series
2017-10-27 00:04:03 -04:00
Stefano Raggi a24164ecec Refactor OrderProperties class to IOrderProperties interface
This change will make it easier to add other planned brokerage features:
for Interactive Brokers, besides Financial Advisor support, we will be adding IB algorithmic orders soon (PR #1203).
2017-10-26 18:22:11 +02:00
Stefano Raggi ddb3c7d33b Add DefaultOrderProperties to QCAlgorithm
The properties in the default instance can be modified by users duing Initialize.
These properties are always copied into all new orders submitted with any method available (Order, SetHoldings, etc.)
2017-10-26 18:15:08 +02:00
AlexCatarino c01470e1db Fixes PlotIndicator for python algorithms
Available PlotIndicator method overloads did not cover all the possibilities, so we now use PyObject as a pseudo-generic.
2017-10-24 20:24:52 +01:00
AlexCatarino c43a87d93e Enables Universe Selection Helpers in Python 2017-10-24 19:06:16 +01:00
Michael Handschuh 0e4fc0f7fb Prevent security price seeding if no history provider
This appears to be causing exceptions in travis when running the automated
test suite. I'm still unsure why it's only failing on this branch and not
on the master branch.
2017-10-17 12:15:58 -04:00
Jared ef9a841ae1 Merge branch 'master' into gdax 2017-10-13 21:43:19 -04:00
AlexCatarino 6fc55de371 Extends SetBenchmark to accept functions as paramenters in Python 2017-10-12 23:57:20 +01:00
Jared 73546cb8f0 Merge pull request #1200 from Jay-Jay-D/DetrendedPriceOscillator
DetrendedPriceOscillator indicator.
2017-10-12 18:18:30 -04:00
jjd df0714f5e2 Michael reviews. 2017-10-12 17:50:17 -03:00
Jared b78897c6cf Merge pull request #1198 from AlexCatarino/setsecinit-py
Implements SetSecurityInitializer for Python algorithms
2017-10-12 16:33:17 -04:00
AlexCatarino 9536123160 Updates pythonnet
In this update, we have changed our version of pythonnet to give precedence to methods that include a PyObject parameter.
2017-10-12 16:41:50 +01:00
jjd 354da79c04 DetrendedPriceOscillator indicator.
Small redudant code fix at CompositeIndicator.cs
2017-10-11 09:56:57 -03:00
AlexCatarino 994c47e55b Implements SetSecurityInitializer for Python algorithms
Creates a class that wraps a PyObject that represents a ISecurityInitializer object for the case where we use a class to initialize securities
Adds SetSecurityInitializer method that accepts a PyObject that may represent a method, a function or class that is used to initialize securities
2017-10-11 10:37:47 +01:00
Michael Handschuh 7c0a0c4698 Set algorithm name in setup handler
When using the console setup handler, the algorithm's type name
will be used as an identifier.
2017-10-06 16:23:38 -04:00
Michael Handschuh ecd92462da Clean white space 2017-10-06 16:23:37 -04:00
AlexCatarino 58a7f0cf8a Moves ToFunc method from QCAlgorithm to Util/PythonUtil
ToFunc method is used to convert a PyObject that represents a method into a System.Func. Since this method will be used across different classes, we are moving it to PythonUtil class.
2017-10-06 16:44:53 +01:00
AlexCatarino 1346acf0cf Adds support for FilteredIdentity indicator for python
Also adds FilteredIdentityAlgorithm as a working example.
2017-10-05 12:12:45 +01:00
andrewhart098 8bc187f38e Merge pull request #1171 from AlexCatarino/pythonnet-update
Updates pythonnet nuget version
2017-10-03 17:07:06 -04:00
AlexCatarino b4313ad740 Implements SetBrokerageModel for python algorithms
Adds BrokerageModelAlgorithm to showcase the implementation
2017-10-03 00:17:34 +01:00
AlexCatarino 751a66a36a Refactors Custom Models for python
Moves custom model setters from QCAlgorithm class to Security class.
Modifies algorithm examples to reflect the change.
2017-09-29 22:56:52 +01:00
AlexCatarino 099e871afd Updates pythonnet nuget version
In this new nuget package, we have included two versions Python.Runtime.dll for macOS
We also add the instructions to compile pythonnet for different operational systems
2017-09-29 17:59:38 +01:00
AlexCatarino 9998e65df9 Adds support for custom models for python
Adds support for fee, fill and slippage custom modelling.
Adds CustomModelsAlgorithm to showcase the new feature
Modifies C# version of CustomModelsAlgorithm to match existing data in github
2017-09-28 16:47:58 +01:00
AlexCatarino b03c9daa6f Improves Custom Universe Selection
Covers the case where the Symbol of a custom data source is important.
Adds CustomDataUniverseAlgorithm python algorithm as an working example
2017-09-27 00:33:19 +01:00
AlexCatarino a082f930fa Adds support for Custom Universe Selection
Includes DropboxBaseDataUniverseSelectionAlgorithm python algorithm as an working example
2017-09-27 00:33:19 +01:00
AlexCatarino 3da8449fea Improves Universe Selection for python
In python algorithm using Universe Selection, the selector method should return a List<Symbol>. To make it more pythonic, we allow returning python list. The conversion is, then, performed in C# side.
2017-09-27 00:33:19 +01:00
AlexCatarino e35ba389d9 Adds support for user-defined universe selection for python
Adds UserDefinedUniverseAlgorithm python script to show how to use user-defined universe selection for python.
2017-09-20 22:45:51 +01:00
jameschch@outlook.com 7fab872927 Integrates with crypto security 2017-09-15 13:42:51 +01:00
Jared 72b66501eb Merge pull request #1131 from QuantConnect/crypto-security
Crypto security
2017-09-14 10:48:31 -04:00
AlexCatarino d7f2411fcd Upgrades pythonnet version
In this version, we have fixed a bug that led to System.AccessViolationException when we add timezone information in the datetime.datetime object.
2017-09-12 17:33:52 +01:00
Stefano Raggi c0fa78080a Fix security type test 2017-09-11 20:48:43 +02:00
Stefano Raggi f5d4c4a318 Enable security seeding for Options and Futures 2017-09-11 20:37:07 +02:00
Jared 563d2df4b5 Merge pull request #1119 from StefanoRaggi/add-option-contract-underlying-fix
Fix missing underlying security in AddOptionContract
2017-09-06 16:41:38 -04:00
Jared 57fa355fc0 Merge pull request #1109 from Jay-Jay-D/IndicatorMassIndex
Indicator mass index
2017-09-06 16:38:38 -04:00
Stefano Raggi f94cb659cb Fix missing underlying security in AddOptionContract 2017-09-06 17:48:57 +02:00
Michael Handschuh 89c6a1a566 Remove multiple enumerations of enumerable
Depending on the IHistoryProvider implementation, this could result in
multiple history requests being sent GetLastKnownPrice function call.
2017-09-02 13:56:48 -04:00
jjd 215224de2f helper method renamed MI->MASS 2017-09-01 15:23:11 -03:00