Commit Graph

686 Commits

Author SHA1 Message Date
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
Stefano Raggi 38ac2c5d72 Add TimeInForceAlgorithm regression tests 2018-04-30 20:18:18 +02:00
AlexCatarino 11489b3edf Modifies BasicTemplateFrameworkAlgorithm
- Use `MaximumDrawdownPercentPerSecurity` as `RiskManagementModel`.
- Modifies regression test to reflect risk model choice
- Use SetXXX to set models in python version
2018-04-27 23:08:53 +01:00
Michael Handschuh 891ab365ab Reverse a day when reading fine data
The fine enumerator factor accepts a 'date'. This date is that day
that the data is produced, so the emit time on that data is midnight
the following day. When we go to read the fine data we can't use the
current time because that's the 'emit time' -- instead we need to back
the time up a full day to find the correct start time. In addition,
the fine data was being read using UTC time stamps which led to even
more confusion here -- this change resolves both issues.

In addition to the above, the security.Fundamentals property wasn't being
properly set for the first time step when a security is selected due to
a bug in the subscription synchronizer not clearing out the universeData
in preparation for another loop (in the event changes != None).
2018-04-27 14:54:07 -04:00
Michael Handschuh eabd2fffb7 Update CoarseFineFundamentalRegressionAlgorithm to use fine data
This change adds a requirement to the test that we're able to access the fine
fundamental data via the Security.Fundamentals property.
2018-04-24 19:12:32 -04:00
Michael Handschuh d1b9c8fde6 Change date range to where we have data
This regression algorithm covered dates for which there is no coarse
fundamental data, leading to potential oversights when making changes.
2018-04-24 15:32:58 -04:00
Michael Handschuh 38d749caa4 Add PairsTradingAlphaModel w/ regression test
The PairsTradingAlphaModel is a simple example of defining an insight
grouping. Insights that are grouped together are assigned a unique
group-id that can be used by the portfolio construction model.

Updates were made to the CommonAlphaModelTests to give more control to
derived types. Some changes are still needed here to give securities
unique prices. I would recommend using a psuedo-random walk approach
by using Random with a constant seed value.
2018-04-19 16:30:20 -04:00
Michael Handschuh a161f4bf9d Add CompositeAlphaModelFrameworkAlgorithm w/ regression
Showcases the CompositeAlphaModel and provides a regression tests as well.
Also demonstrates using AddXXX methods coupled with a manual universe
2018-04-18 11:02:49 -04:00
Jared eb9e15c507 Merge pull request #1866 from jingwu74/master
Use available resolution in options and futures algorithms
2018-04-13 15:58:56 -04:00
Jared 21fd784a64 Merge pull request #1869 from Jay-Jay-D/feature-874-Automated-Lean-Nuget-Releases
Nuspec files added for automatic Nuget package build
2018-04-13 15:26:10 -04:00
Jared b9ce320f6b Merge pull request #1857 from StefanoRaggi/bug-1852-gdax-fees-limit-orders
Fix GDAX fees for limit orders in backtesting
2018-04-13 15:21:25 -04:00
Stefano Raggi 0310b2945a Fix GDAX fees for limit orders in backtesting
Fixes #1852
2018-04-13 20:57:21 +02:00
Juan José D'Ambrosio bda5b11cc2 Nuspec files added for all projects.
Launcher project is packed as `QuantConnect.Lean`but as a mean ot having all Lean features just calling one package. 

In the same sense, `QuantConnect.Algorithm.CSharp` is included as package and added as dependecy in the `QuantConnect.Lean` package just to have a working example aailable out-of-the-box.
2018-04-13 07:28:34 -03:00
Jing Wu 4c98817c9e change the benchmark setting 2018-04-12 18:33:01 -04:00
Jing Wu 4c86c5f3df change the resolution of option history request to minute 2018-04-12 16:54:57 -04:00
Jing Wu 4fee2a8f3f minor change 2018-04-12 15:45:59 -04:00
Jing Wu c8a66c0192 modified project file for deleting the futures daily algorithm 2018-04-12 15:41:01 -04:00
Jing Wu 955366ee48 change the resolution to minute for futures history request 2018-04-12 15:39:59 -04:00
Stefano Raggi b2027c9022 Update BasicTemplateCryptoAlgorithm to include crypto specific features
Fixes #1820
2018-04-12 11:04:49 +02:00
Michael Handschuh 3db242203e Add ScheduledUniverseSelectionModel
The ScheduledUniverseSelectionModel wraps the new ScheduledUniverse.
ScheduledUniverse is similar to the UserDefinedUniverse we use to create
universes for dopbox/remote files w/ symbol listing. The new abstraction
that 'turns on' this no-data/scheduled based universe behavior is the
ITimeTriggeredUniverse, which exposes GetTriggerTimes which yields the
date/times your univese selection function will be called.

A regression algorithm was also added to cover the new feature.
2018-04-10 19:24:36 -04:00
Michael 4eda0e659d Merge pull request #1825 from AlexCatarino/feature-1821-updates-pythonnet
Updates QuantConnect.pythonnet to 1.0.5.7
2018-04-09 15:38:49 -04:00
AlexCatarino a4db921b87 Updates pythonnet
Rebase with pythonnet/master
2018-04-09 18:59:59 +01:00
Stefano Raggi e034fd3960 Fix buying power error handling bug in BacktestingBrokerage
Fixes #1843
2018-04-09 19:55:12 +02:00
Michael Handschuh 92c5e64024 Adds VWAP and STD execution models
VWAP will submit market orders while the current price is more favorable than VWAP.
STD will submit market orders while the current price is a configured number of
standard deviations away from the mean in the favorable direction.
2018-04-06 16:30:26 -04:00
Michael 7905753631 Merge pull request #1828 from Jay-Jay-D/bug-1827-update-QCAlgorithmMACD-method
Update QCAlgorithm.MACD method default MovingAverageType to use Exponential
2018-04-03 22:10:39 -04:00
Juan José D'Ambrosio e475385146 remove obsolte property, make EMA default
Update HistoryAndWarmupRegressionAlgorithm
2018-04-03 17:35:10 -03:00
Michael Handschuh a56d02e8a2 Set default values for MacdAlphaModel ctor args
Model constructor arguments changed to only accept MACD indicator parameters.
2018-04-03 16:20:38 -04:00
Jared 56bbc4c3da Merge pull request #1808 from QuantConnect/refactor-1807-rename-portfolio-selection-to-universe-selection
Rename IPortfolioSelectionModel -> IUniverseSelectionModel
2018-04-02 12:30:33 -04:00
Stefano Raggi 4ce6976446 Add DuplicateSecurityWithBenchmarkRegressionAlgorithm
Closes #1612
2018-03-30 10:00:30 +02:00
Michael Handschuh d87c121d4b Rename IPortfolioSelectionModel -> IUniverseSelectionModel 2018-03-29 12:18:44 -04:00
Jared Broad bfe2f7f33f Reduce length of benchmark and fix name conflict with loader tests 2018-03-27 16:12:02 -04:00
Jared Broad 69e7df6d77 Rename benchmark algorithms and fix headers 2018-03-27 15:45:17 -04:00
Jared Broad a10be8f4d4 Rename the benchmark algorithms, include header and comments 2018-03-27 15:24:59 -04:00
Jared 634188c5ad Merge pull request #1781 from QuantConnect/feature-1779-add-rsi-alpha-model
Add rsi alpha model
2018-03-27 15:06:02 -04:00
Michael Handschuh c9cf10157c Update EmptyMinute400EquityAlgorithm to be self contained
Keeping the dependencies limited to a single file makes running these
in an automated fashion simpler
2018-03-27 14:06:34 -04:00
Michael Handschuh ecf6e59c88 Add EmptySingleSecuritySecondEquityAlgorithm 2018-03-27 14:05:53 -04:00
Michael Handschuh c5704a1cd4 Rename SimplePortfolioConstructionModel -> EqualWeightingPortoflioConstructionModel
The simple name was too simple and too vague. Equal weighting nicely
describes the purpose and intent of this model
2018-03-26 17:33:13 -04:00
Juan José D'Ambrosio b2b541483f Intrinio template modified, C# regression test added
Intrinio Python port added


Python regression test added


RateGate implemented in static IntrinioConfig


Clean stuff


Intrinio C# regression test pass


Intrinio working, Python port, C# regression test
2018-03-26 09:41:10 -03:00
Jing Wu 8cc38591c1 reformat code 2018-03-16 09:43:55 -04:00
Jing Wu 75c5902f89 add CustomDataIndicatorExtensions Algorithm 2018-03-15 17:11:55 -04:00
Michael 3fb429e5f4 Merge pull request #1685 from QuantConnect/feature-update-alpha-framework-for-consistency-with-api
Finalizes implementation of alpha framework, including alpha.spanner updates, many name changes, and harmonizes insight serialization with alpha streams API
2018-03-12 16:39:33 -04:00
Michael 88bd9c882f Merge pull request #1681 from StefanoRaggi/bug-1680-cash-model-use-quotes
Increase accuracy of order quantity calculation in CashBuyingPowerModel
2018-03-12 13:18:24 -04:00
Stefano Raggi 58a65bee97 Fix Forex data not received when reusing an existing internal feed
Fixes #1611
2018-03-09 23:28:23 +01:00