Commit Graph

861 Commits

Author SHA1 Message Date
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
Jared 51253e96db Merge pull request #945 from AlexCatarino/py-time
Upgrades pythonnet to version 1.0.2.1
2017-05-26 16:06:37 -04:00
AlexCatarino 4eb80e78e9 Upgrades pythonnet to version 1.0.2.1
Previous version was not matching methods with nullables accordingly
2017-05-26 01:16:54 +01:00
Stefano Raggi f9fdd82b06 Time-based removal of option contracts from universe in live mode
Previously, removal of option contracts from the option chain universe was allowed only on date change (in both live and backtesting).

Now, in order to reduce market data subscriptions in live mode, removal is allowed intraday if the contract has been in the universe for at least 15 minutes. When backtesting, behavior is unchanged.
2017-05-24 22:23:25 +02:00
Jared 1d0644b7a4 Merge pull request #936 from AlexCatarino/py-time
Updates python framework to support python datetime
2017-05-23 19:05:01 -04:00
Stefano Raggi eb8bbcb027 Move default IB subscription limit to BrokerageSetupHandler 2017-05-24 00:24:44 +02:00
AlexCatarino 18d83fb8ec Updates python framework to support python datetime
Updates nuget package to support conversion from C# DateTime to python datetime.
Updates algorithms to reflect this change.
2017-05-23 13:40:26 +01:00
Stefano Raggi f84d6f915c Add DataSubscriptionLimit property to AlgorithmSettings 2017-05-23 02:08:13 +02:00
Stefano Raggi 6d47ab94b8 Add AlgorithmSettings class and IAlgorithm.Settings property 2017-05-22 20:50:23 +02:00
Stefano Raggi 2fb4847b41 Handle subscriptions for existing brokerage Option holdings 2017-05-19 15:50:45 +02:00
Stefano Raggi 0fc2af8025 Handle existing brokerage holdings in Futures universe selection filters 2017-05-17 22:11:43 +02:00
AnshulYADAV, Computer Artist (CoArsey) 350e58567f Fixes 18 warnings with code CS1572 (#908)
* Fixes 5 warnings with code CD1572

* Adds the Xml Comment parameter and implements the missing selector parameter

* Fixes rest of the 13 warnings with code CS1572
2017-05-12 09:28:46 -04:00
Juan José D'Ambrosio b9c5557ea6 ALMA sigma parameter default value (#890)
* Update the ALMA using the correct default value for sigma

* makes ALMA default sigma = 6

* Incorporate the statistical interpretation of the parameters in the docstring.

* documentation small fixes.
2017-05-08 09:17:10 -04:00
Jared c6e7f2e968 Merge pull request #891 from QuantConnect/warmup-history-canonical-fix
Fix Warmup/History requests for canonical symbols
2017-05-08 09:07:53 -04:00
Stefano Raggi b5c6af53c7 Fix Warmup/History requests for canonical symbols
CreateDateRangeHistoryRequests and CreateBarCountHistoryRequests were incorrectly including canonical symbols in history request generation
2017-05-05 15:07:13 +02:00
Alexandre Catarino 58f0caf647 Updates example algorithms written in Python (#889)
Some python algorithms suffered corrections to run under the new python framework (pythonnet).
Others were deleted because some features will be supported in futures implementations.

Adds a method in AlgorithmPythonUtil to transform C# DateTime into Python datetime
2017-05-04 13:02:25 -04:00
Jared bc9af8784b Merge pull request #885 from Jay-Jay-D/patch-1
ALMA implementation
2017-05-03 11:40:54 -04:00
AlexCatarino 372823d2d7 Adds check for custom data existence after security removal 2017-05-02 17:34:17 +01:00
AlexCatarino bb1c960fb5 Removes lock from AddData method
AddData method has a lock that prevents the subscription of new custom data after initialization.
2017-05-02 17:34:17 +01:00
jjd fae8e681e8 Helper method added.
Indicators helper method sorted alphabetically.
2017-05-02 12:14:49 -03:00
Jared e8528cf9c0 Merge pull request #879 from QuantConnect/history-request-redundant-properties
Remove redundant properties in HistoryRequest class
2017-05-01 08:56:11 -04:00
jaredbroad 8f52e15564 Final rework of Pytuils 2017-04-30 18:02:15 -04:00
jaredbroad 469abd42cf Shuffle PyUtil to build-none, common project 2017-04-30 17:44:43 -04:00
jaredbroad 2ac57081a6 Fix static activator reuse and made PyUtils copy to bin directory 2017-04-30 17:17:09 -04:00
jaredbroad fd64b05db8 Apply sed to use UC4 by default (linux), windows should use UC4
sed -i -e 's/UCS2/UCS4/' Common/QuantConnect.csproj

sed -i -e 's/UCS2/UCS4/' Algorithm/QuantConnect.Algorithm.csproj

sed -i -e 's/UCS2/UCS4/' Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj

sed -i -e 's/UCS2/UCS4/' AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj
2017-04-30 14:19:09 -04:00
jaredbroad f07748135e Merging updates from master 2017-04-29 17:38:06 -04:00
Stefano Raggi 2cbe2af4fd Remove redundant properties in HistoryRequest class
SecurityType and Market properties are already implicitly included in the Symbol property.

With this change we avoid forgetting to set these properties when creating HistoryRequest objects (issue #863)
2017-04-29 20:31:39 +02:00
jjd 26b1f5de90 Helper method renamed from HULL to HMA.
Hull value added in the MovingAverageType enumeration.
MovingAverageTypeExtensionsTests added.
2017-04-28 08:47:11 -03:00
jjd c37282d522 HullMovingAverage, tests and helper method implemented 2017-04-27 20:52:27 -03:00
oswaldozapata 255823390a Updated to use liquidated string as default value of argument so this can be consistent with other methods that accept a tag. 2017-04-24 21:07:59 -04:00
oswaldozapata e3ae31258b Now when Liquidating, the tag field on the trade list will show as "Liquidated" to indicate that this was due to a Liquidate() call. 2017-04-24 00:41:39 -04:00
AlexCatarino b51464361b Fixes current holdings value computation in CalculateOrderQuantity
The variable currentHoldingsValue didn't take into account the quote currency conversion rate.
2017-04-21 17:03:50 +01:00
Stefano Raggi 29da91847d Reuse LeanData.GetDataType in CreateHistoryRequest 2017-04-19 13:25:45 +02:00
Stefano Raggi f9de571521 Fix history request data type with Tick data and non-Tick resolution 2017-04-19 02:23:17 +02:00
Stefano Raggi e1710e9031 Remove BaseData underlying symbol from Future symbol 2017-04-17 13:52:23 +02:00
AlexCatarino 40e570b2cb Updates QuantConnect.Pythonnet package
New version include instructions to copy nPython.exe to bin directories
2017-04-11 17:05:29 +01:00
AlexCatarino 479fadea55 Updates QuantConnect.Pythonnet nuget package
In the new version, it was included nPython.exe that compiles python scripts.
2017-04-11 12:08:38 +01:00
Stefano Raggi a62fab742c Fix SetBrokerageModel when called after AddSecurity and friends
Currently, calling SetBrokerageModel after AddSecurity, AddForex, etc. has no effect, the security initializer has already been initialized and its models have been set to their default implementations.

For example, Forex backtests using OandaBrokerageModel will report fees calculated with the default fee model (Oanda fees are spread-based, so they should always be reported as zero).

In this PR, SetBrokerageModel now calls SecurityInitializer.Initialize on all securities added before SetBrokerageModel is called.

Fees will be calculated using the correct fee models and the order of the calls in algorithm Initialize is now irrelevant.
2017-04-07 15:40:24 +02:00
jaredbroad 664308e7fa Merge in the IDataProvider updates 2017-03-26 10:27:42 -04:00
jaredbroad 0f40b0df05 Merge remote-tracking branch 'origin/master' into pythonnet 2017-03-26 10:14:03 -04:00