Commit Graph

978 Commits

Author SHA1 Message Date
Stefano Raggi 2ff5650b4a Add price and split factors to CoarseFundamental class 2018-06-01 12:19:06 +02:00
Michael Handschuh 65393d4e54 Replace config security with an option chain filter function
The ConfigureOptionChainSecurity method somewhat was overshadowing the security
initializer's responsibilities. This method has been trimmed down into a contract
filter function sub classes can use to define what option contracts they want to
select.
2018-06-01 00:36:17 -04:00
Michael Handschuh ad331118ab Add refresh to IUniverseSelectionModel to support dynamic universes
This change allows the universe selection model to select different universe
definitions as time proceeds. This enables the definition of a universe model
that, for example, could add option chains for securities selected by a different
universe model.

The BasicTemplateOptionsFrameworkAlgorithm was added to showcase and provide
regression for a universe model that selects different universes.
2018-05-31 11:48:23 -04:00
Michael Handschuh 43a7d0c3e8 Rename HasDiffs to AreDifferent
No need to be so terse :)
2018-05-30 15:55:34 -04:00
Michael Handschuh 80e01e0d1f Add support for removing universes
Adds the concept of universe disposal which is requested by an algorithm
through invocation of UniverseManager.Remove, which is invoked via
algorithm.RemoveSecurity. This instructs the data feed that the algorithm
has requested to completely remove the universe and any child subscriptions
from the feed. Security changes are fired for all removed securities.
2018-05-30 15:55:33 -04:00
Michael d2ac77b037 Merge pull request #2032 from StefanoRaggi/feature-1093-timeinforce-gtd
Add TimeInForce.GoodTilDate (GTD) support in backtesting and IB brokerage
2018-05-30 14:36:10 -05:00
Stefano Raggi 8613deb3ef Minor refactor
- Added TimeInForce.GoodTilDate static method
- Made GoodTilDateTimeInForce.Expiry readonly
2018-05-30 18:25:52 +02:00
Stefano Raggi 1fea8b8bb0 Added more orders in TimeInForceAlgorithm regression 2018-05-30 11:58:51 +02:00
Stefano Raggi 4b2cc4388d Add GTD sample code in TimeInForceAlgorithm 2018-05-30 10:00:12 +02:00
AlexCatarino 5ae4b3da0c Minor fixes on ConvertToFrameworkAlgorithm
Typo and unnused variable removal.
2018-05-29 22:42:16 +01:00
Michael Handschuh e95157b097 Add QCAlgorithmFrameworkBridge for easier porting of QCAlgorithm
Provides demonstration algorithm showing the steps required to convert a
QCAlgorithm into the framework with minimal code changes.

1. Subclass QCAlgorithmFrameworkBridge
2. Add EmitInsights calls to where orders are placed
3. Profit :)
2018-05-29 22:42:16 +01:00
Michael Handschuh 6f4b15e182 Add demonstration of porting old algorithm to framework 2018-05-29 22:41:07 +01:00
Jared f0a3196b00 Merge pull request #2041 from jingwu74/master
Adding Benchmark algorithms
2018-05-29 17:38:55 -04:00
Jing Wu 6045aa0579 minor change 2018-05-29 17:36:11 -04:00
Jing Wu e3ae079b6b modify benchmark namespace 2018-05-29 16:11:58 -04:00
Jing Wu 9982c6cb2e modify using statement 2018-05-28 10:31:54 -04:00
Jing Wu 6e8dd0d40f modify project file 2018-05-26 01:55:39 -04:00
Jing Wu cbc948a535 add ScheduleEventsBenchmark algorithm 2018-05-26 01:55:00 -04:00
Jing Wu 093d6d56a1 add IndicatorRibbonBenchmark algorithm 2018-05-26 01:54:08 -04:00
Jing Wu 98027e2025 add HistoryRequestBenchmark algorithm 2018-05-26 01:52:45 -04:00
Jing Wu 4481f200ba add CoarseFineUniverseSelectionBenchmark algorithm 2018-05-26 01:51:45 -04:00
Stefano Raggi ae427a14d0 Add regression algorithms for this bug fix 2018-05-25 22:06:28 +02:00
Michael Handschuh 5d69b2a5e2 Remove disposed security data from TimeSlice
If we pull data and on the same time step that security gets removed,
we can still get that data in OnData(Slice) even though it was removed.
This change filters out removed securities by tracking a reference to
the subscription's disposed flag. Another change was made to wait until
the end of the time step to dispose of subscriptions.

Add IDataFeed.GetSubscription(SubscriptionDataConfig)
2018-05-24 17:40:29 -04:00
Jared b346a65e6b Merge pull request #2020 from jingwu74/master
Add python example of using FXCM volume
2018-05-21 20:15:09 -04:00
Jared d3c70c93b1 Update QuantConnect.Algorithm.CSharp.csproj 2018-05-21 19:59:31 -04:00
Jared 97e6d9efd6 Delete BasicTemplateFxcmVolumeAlgorithm.cs 2018-05-21 19:42:24 -04:00
Jing Wu f606c6f0a6 Fix zero value issue in Greeks 2018-05-21 14:54:05 -04:00
Michael 2d7e30babd Merge pull request #2001 from QuantConnect/refactor-improve-daily-regression
Change date range of daily regression
2018-05-11 12:02:21 -04:00
Michael Handschuh 1e83bb7b25 Change date range of daily regression
Since we start Monday and end on a Friday we aren't properly covering the
edge cases. As it currently stands, if we start on a date then we receive
data for that date, so a daily algo starting on the 8th receives it's first
data point on the 9th at 00:00 (daily bar is 8th 00:00 to 9th 00:00). Like
wise, the requested end date is the 17th and we include data from the 17th,
so the last data point is the 18th at 00:00 (daily bar is 17th 00:00 to 18th
00:00).
2018-05-11 10:04:31 -04:00
AlexCatarino c6fc61940d Modifies DisplacedMovingAverageRibbon data resolution
Subscribe to daily data instead of minute-resolution to be able to run tests locally.
- Adds regression test for that algorithm.
2018-05-10 19:44:19 +01:00
AlexCatarino ec63bffaa2 Modifies CoarseFundamentalTop5Algorithm
Renames CoarseUniverseTop5DollarVolumeAlgorithm.cs to CoarseFundamentalTop5Algorithm.cs: fine name was unconsistent with class name (not a QuantConnect pattern).

Adds Log method calls to python algorithm that are present in C# example.
2018-05-10 19:44:19 +01:00
AlexCatarino 5006600166 Modifies RenkoConsolidatorAlgorithm data resolution
Subscribe to daily data instead of minute-resolution to be able to run tests locally. Also, liquidate the position in one of the event handlers to generate more trades.
- Adds regression test for that algorithm.
2018-05-10 19:44:18 +01:00
AlexCatarino f77c0ae792 Consistency fix 2018-05-10 15:47:51 +01:00
AlexCatarino f23ef2a60c Uses the simplest SetSecurityInitializer overload in the examples. 2018-05-10 12:20:05 +01:00
AlexCatarino 24af1bd7cd Adds universe selection algorithm with custom security initilizer 2018-05-10 11:58:11 +01:00
AlexCatarino ff574b9d86 Fixes EmaCrossUniverseSelectionModel indicator update logic
Instead of using the `&&` operator, use `&` so that both EMA are updated.
2018-05-08 19:47:20 +01:00
AlexCatarino 5d6dea6473 Simplify EmaCrossUniverseSelectionModel by using list instread of dict 2018-05-08 18:54:17 +01:00
AlexCatarino b476e22e41 Implements EmaCrossUniverseSelectionModel
Adds EmaCrossUniverseSelectionModel and EmaCrossUniverseSelectionFrameworkAlgorithm to show the new model in action
2018-05-08 18:54:17 +01:00
Michael Handschuh 5879e477b7 Mark delisted securities as not tradable
Add regression test for delisted/tradable flags.
Add Security.IsDelisted to flag.
2018-05-07 11:41:24 -04:00
AlexCatarino aac5cb65ce Updates Framework example algorithms to use Set model methods 2018-05-07 14:20:35 +01:00
AlexCatarino 61b5859446 Implements SectorExposureRiskFrameworkAlgorithm
This algorithm and its regression test are meant to test the `MaximumSectorExposureRiskManagementModel`.
2018-05-03 21:53:14 +01:00
Michael 055812ce40 Merge pull request #1955 from QuantConnect/feature-1945-add-helper-method-for-in-universe-securities
Rework implementation of maintaining tradable flag
2018-05-03 14:34:31 -04:00
Michael d878857e50 Merge pull request #1938 from StefanoRaggi/feature-1093-ib-time-in-force-day
Add TimeInForce.Day support in backtesting and IB brokerage
2018-05-03 14:33:40 -04:00
Michael 4eb896bbee Merge pull request #1946 from jingwu74/master
Fix issue of no traded options in OptionChainProviderAlgorithm
2018-05-02 20:36:55 -04:00
Michael Handschuh 351ac55f7f Rework implementation of maintaining tradable flag
The previous implementation had some issues and introduced undue
complexity. This implementation follows established patterns of
having the algorithm manager apply changes to the algorithm that
result from universe selection.
2018-05-02 20:00:37 -04:00
Michael c926b68ed4 Merge pull request #1939 from QuantConnect/feature-1596-add-order-modified-time-utc
Add Order.LastFillTime, Order.LastUpdateTime, and Order.CanceledTime
2018-05-02 14:17:43 -04:00
Michael Handschuh c25afbad29 Add fill/update/cancel times to order object
LastFillTime is updated on each partial/fill order event
LastUpdateTime is updated on each submitted order event w/ update count > 0
CancelTime is updated on canceled order events

Also fixes bug in regression algorithm where it used Time instead of UtcTime
for creating the SubmitOrderRequest object.
2018-05-02 14:16:33 -04:00
Jing Wu 7569467f45 fix bugs of no traded options 2018-05-01 15:34:40 -04:00
Stefano Raggi 2d19ab7ead Review TimeInForce handler interface
- removed IAlgorithm dependency from time in force handlers
- renamed GoodTilCancelled to GoodTilCanceled
- added GTC time in force in regression algorithms
- inlined initialization of time in force handler dictionary
2018-05-01 20:53:43 +02:00
Stefano Raggi 1f47acb8f5 Removed obsolete comment in BasicTemplateCryptoAlgorithm
Reference to issue #1852 fixed in PR #1857
2018-05-01 15:49:49 +02:00