Commit Graph

1000 Commits

Author SHA1 Message Date
jjd d8b2a1a63b Test passed 2017-09-01 14:40:26 -03:00
jameschch@outlook.com 0f4e166499 Changes market deriving logic and adds extra test cases 2017-09-01 12:29:25 +01:00
Jared fe6c9fa584 Merge pull request #1102 from AlexCatarino/python-adddata-fix
Fixes hard-coded resolution in AddData for Python algorithms
2017-08-30 13:20:42 -04:00
AlexCatarino d2c144ff1e Fixes hard-coded resolution in AddData for Python algorithms 2017-08-30 17:59:55 +01:00
jameschch@outlook.com 6c06413fe4 Moves existing bitfinex to crypto and updates crypto tests 2017-08-30 13:46:30 +01:00
jjd 21a7685e64 helper method added. 2017-08-29 15:48:08 -03:00
jameschch@outlook.com 578efe843f Further changes for crypto type 2017-08-29 12:19:15 +01:00
jameschch@outlook.com ca4cd13476 Merge branch 'master' of https://github.com/QuantConnect/Lean 2017-08-29 11:11:04 +01:00
Jared 71a6e293bd Merge pull request #1082 from StefanoRaggi/options-futures-tick-fix
Fix Options and Futures subscriptions at Tick resolution
2017-08-28 10:49:34 -04:00
Jared Broad 8281911bd0 Revert "Upgrades pythonnet version"
This reverts commit 310e5c4211.
2017-08-22 16:11:54 -04:00
12112 4be1b7b413 Merge branch 'master' of https://github.com/QuantConnect/Lean 2017-08-22 16:56:52 +01:00
Jared 0b15bd6979 Merge pull request #1081 from andrewhart098/history-request-timezone
Require specification of DataTimeZone on history requests
2017-08-22 11:56:42 -04:00
12112 921ec8f983 merge from upstream 2017-08-22 16:56:35 +01:00
Andrew c82f31aa6a Use GetCommonTickTypeForCommonDataTypes to get default tick types for history requests 2017-08-22 11:17:07 -04:00
Jared 4d9d60dfff Merge pull request #1083 from AlexCatarino/pythonnet-datetime-fix
Upgrades pythonnet version
2017-08-22 10:54:27 -04:00
Andrew 08bb34a1eb Add TickType field to the HistoryRequest class 2017-08-22 09:42:42 -04:00
Stefano Raggi 492bc70229 Fix Options and Futures subscriptions at Tick resolution
Previously Tick resolution subscriptions only received ticks with TickType.Trade, now TickType.Quote and TickType.OpenInterest are received as well.

This PR replaces PR #1065
2017-08-22 02:20:36 +02:00
AlexCatarino 310e5c4211 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-08-21 21:59:59 +01:00
Andrew 6aa87b458c Added Security.IsCustomData method
This method is a convient way to check if the security has a subscription that represents custom data. It returns true if the security contains at least one subscription that represents custom data
2017-08-21 16:27:51 -04:00
Andrew 40aa9dad65 Seperate time zones for the exchange and the data can be specified in AddData 2017-08-21 14:59:31 -04:00
Andrew 8a5af16051 Remove parameterless HistoryRequest constructor
This contractor was removed so that history requests do not assume any defaults - especially with exchange time zones and data time zones
2017-08-21 14:55:49 -04:00
Jared 746a7e1bbc Merge pull request #1080 from StefanoRaggi/options-futures-warmup-fix
Fix Warmup for Options and Futures
2017-08-21 11:07:00 -04:00
Stefano Raggi 001183a917 Fix Warmup for Options and Futures
Warmup history requests for options and futures were only creating a single subscription for open interest (no trades or quotes).

Also some History overloads had the same issue.
2017-08-21 15:58:23 +02:00
AlexCatarino bcd25b56b4 Refactors PyObject to List of Symbol parsing 2017-08-21 13:52:48 +01:00
AlexCatarino b322dec666 Modifies the pandas dataframe created from a history request
History requests should not return a dictionary with a dataframe, but a multi-index dataframe.
It is more common to work with multi-index dataframes rather than multi-column.
2017-08-18 18:23:11 +01:00
Andrew cd94d4f507 Clear cache when security is removed 2017-08-15 18:03:05 -04:00
Stefano Raggi 49b2240a73 Fix bug in security seeding when using Tick resolution
With securities added at Tick resolution the wrong data type was used for the seeding history request.
2017-08-09 17:58:38 +02:00
andrewhart098 ba565e2b11 Merge pull request #1047 from QuantConnect/option-chain-provider
Option Chain Providers
2017-08-08 11:15:53 -04:00
Andrew e116709b24 Specify <LangVersion> of 6 in all csproj files 2017-08-07 15:27:26 -04:00
Stefano Raggi e379457757 Refactor option chain providers
- Moved provider implementations out of brokerages into their own classes
- Removed DefaultOptionChainProvider
- Added BacktestingOptionChainProvider and LiveOptionChainProvider
- Moved SetOptionChainProvider call from Engine to setup handlers
2017-08-02 22:43:15 +02:00
Stefano Raggi 8fdb79e578 Add OptionChainProvider to IAlgorithm/QCAlgorithm
- SetOptionChainProvider method
- OptionChainProvider property
2017-08-02 22:43:12 +02:00
AlexCatarino 46ead54f79 Implements Quandl support for Python
Implements Quandl support for Python.
It was not possible to derive from Quandl in order to select the column. If the data did not have "close", it would thrown an exception since it would look for this work in a dictionary.
It is now possible to select the column.
See example QuandFuturesDataAlgorithm.py
2017-07-27 00:18:08 +01:00
Stefano Raggi 9b3909b6e8 Fix a couple of bugs in BasicTemplateOptionsAlgorithm
The algorithm had two issues:
1. the LINQ query for contract selection was not including the option right (Put or Call)
2. the algorithm was submitting two extra orders at the end of the day (when market closed)

A helper method was also added in QCAlgorithm to determine if the market is open for a given symbol at the current time.
2017-07-22 21:26:03 +02:00
Stefano Raggi e7172a6841 Update QCAlgorithm.RuntimeStatistics to be a ConcurrentDictionary
This change enables SetRuntimeStatistics to be called from event handlers fired by other threads (for example in the OnOrderEvent with IB)
2017-07-20 20:39:51 +02:00
12112 83fdf9c386 crypto wip 2017-07-14 16:53:42 +01:00
Stefano Raggi f704747696 Downgrade NodaTime to version 1.3.4 due to breaking changes in 2.x 2017-07-08 03:09:35 +02:00
Stefano Raggi e4005fa78c Upgrade NodaTime to version 2.0.3 2017-07-08 01:12:43 +02:00
Stefano Raggi 4f483abcd9 Upgrade libraries Accord.NET, CloneExtensions, MathNet, QLNet 2017-07-08 00:31:40 +02:00
Stefano Raggi 6d160533c3 Upgrade DotNetZip to version 1.10.1 2017-07-07 23:37:09 +02:00
Stefano Raggi d88d82af12 Upgrade Json.NET to version 10.0.3 2017-07-07 23:21:47 +02:00
Stefano Raggi e463ccf088 Upgrade all projects to target .NET Framework 4.5.2
In the advanced build settings, Language version was also upgraded from C# 5.0 to C# 6.0. The minimum Visual Studio version required will now be VS2015.
2017-07-07 22:49:17 +02:00
AlexCatarino 3c23759efd Implements History Requests returning pandas.DataFrame
Algorithms written in python can access to new overloads for the QCAlgorithm.History method that returns a dictionary with pandas.DataFrame
2017-07-06 15:09:59 +01:00
Jared 24fcd239a7 Merge pull request #982 from QuantConnect/issue-330/decimal-quantity
Order and Holding Decimalization Support
2017-06-26 09:51:51 -04:00
AlexCatarino 37b22d4693 Updates pythonnet nuget version
In this version, we have just included a dll for macOS
2017-06-23 13:22:24 +01:00
Stefano Raggi 9139ca7c40 Merge master into issue-330/decimal-quantity 2017-06-19 23:50:26 +02:00
AlexCatarino 6ca9d7cf14 Updates pythonnet package
This update implemented implicit conversion.
From now on, python algorithms will be able to use string object instead of Symbol object when a method overload requires Symbol.
2017-06-15 18:32:29 +01:00
AlexCatarino 919e0225aa Removes Impromptu.ActLike call at the python wrapper
Calling Impromptu.ActLike<IAlgorithm> to make the python object acts like a IAlgorithm caused multiple AlgorithmPythonWrapper objects running in parallel to hold the same python object. That call was removed and instead we access the python object directly.

- Removes AlgorithmPythonUtil.py and add its code directly in AlgorithmPythonWrapper.cs

- Clean up: removes all references to IronPython and ImpromptuInterface
2017-06-02 17:54:54 +01:00
AlexCatarino 77d1b537ee Charting support for python
Adds overloads to Plot and PlotIndicator to handle calls from python.
Adds CustomChartingAlgorithm and changes MACDTrendAlgorithm to showcase the feature
2017-06-02 10:45:45 +01:00
AlexCatarino f6aa31643c Updates pythonnet package
This new pythonnet package makes available the latest version from pythonnet master branch and includes modifications to enable charting in Lean for python.

The dockerfile to create images for the cloud is updated to reflect the package update and adds keras and tensorflow
2017-06-02 10:45:45 +01:00
Stefano Raggi 5c270e620d Fix SetBrokerageModel resetting leverage when called after AddSecurity 2017-05-31 18:50:59 +02:00