Commit Graph

1000 Commits

Author SHA1 Message Date
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
Stefano Raggi d4461bd473 Add method QCAlgorithm.SetTradeBuilder 2017-03-21 20:16:58 +01:00
Victor Baybekov de21307a32 Update Json.Net to 9.0.1 2017-03-14 01:35:59 +03:00
AlexCatarino 0f46f34418 Implements FilteredIdentity indicator
Represents an indicator that is a ready after ingesting a single sample and always returns the same value as it is given if it passes a filter condition
Adds an example algorithm
2017-03-06 14:40:14 -03:00
AlexCatarino 70735cea12 Fixes API indicators with quote subscriptions
When indicators received data from securities that were subscribed as QuoteBar or TickType.Quote, they were consolidated as TradeBars.
Tick were consolidated into TradeBar even when period were zero. Tick object information was lost in the process. With this fix, Tick keeps being Tick.

Adds tests for ResolveConsolidator to verify the consistency between input and output type
TradeBar -> TradeBar
QuoteBar -> QuoteBar
TickType.Trade -> TickType.Trade or TradeBar
TickType.Quote -> TickType.Quote or TradeBar
2017-03-06 10:22:27 -03:00
Stefano Raggi dad6d3282d Replace Obsolete attributes with Error message for FX and CFD 2017-02-22 16:14:16 +01:00
Stefano Raggi ce38515446 Obsoleted History methods returning IEnumerable<TradeBar>
Non-generic history methods returning IEnumerable<TradeBar> have been marked as obsolete because they return an empty result when called with Forex and CFD security types.

The recommended replacements are their generic equivalents, using TradeBar or QuoteBar data type arguments, depending on the security type.
2017-02-20 23:53:49 +01:00
Jared 685c0c4c25 Merge pull request #758 from andrewhart098/history-request-by-sec-type
History request by security type
2017-02-20 12:26:44 -05:00
Andrew f1e38f8fe4 Added test to ensure QuoteBars are properly seeded 2017-02-20 12:17:26 -05:00
Stefano Raggi 8f3181e621 Fixed data type bug in CreateHistoryRequest
This method is returning typeof(TradeBar) instead of typeof(QuoteBar) for Forex history requests
2017-02-20 16:01:40 +01:00
Andrew b413f95b3c Set proper security type when seeding a new security price 2017-02-17 17:03:01 -05:00
jaredbroad a2d822ea95 Set default plotting time to UTC 2017-02-15 13:03:33 -05:00