Commit Graph

978 Commits

Author SHA1 Message Date
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
Michael Handschuh 6b239674e2 Renames Alpha -> Insight
The term 'alpha' is used to describe the entire algorithm. Therefore, 'alpha'
produces insights. From this we have things like IAlphaModel, which is the model
defining how insights are produced. We have IAlphaHandler, which defines how the
insights from a single 'alpha' (the algorithm) are managed, analyzed, and stored.
Types closer to the individual prediction level, such as InsightDirection, or
InsightScore relate directly to exactly 1 insight. The distinction between the
two became more clear as we developed the insights API, and from that effort it
was decided to harmonize alpha/insight terminology across the various QC systems.
2018-03-09 16:12:56 -05:00
Stefano Raggi 1fcb4a6b96 Increase accuracy of order quantity calculation in CashBuyingPowerModel
Fixes #1680
2018-03-09 16:08:21 +01:00
Jared 7dcc6de68c Merge pull request #1663 from jingwu74/master
Add C# and Python Algorithms of QC500 Constituents Generator
2018-03-06 11:54:13 -05:00
Jared 5db949a31c Merge pull request #1660 from QuantConnect/bug-1658-remove-universe-securities-from-history-requests
Remove universe symbols from history requests
2018-03-06 11:51:54 -05:00
Jing Wu 797b6d4f8a add tags and comments 2018-03-06 11:47:23 -05:00
Jing Wu 8565d0f7b9 add csharp example of ConstituentsQC500Generator 2018-03-05 18:18:57 -05:00
Michael Handschuh 5ba44ed5ab Remove universe symbols from history requests
The engine defines securities for each universe to properly track them within
the data feed. These securities are not tradable and have no price data associated
with them, and as such, we should not be sending history requests for these symbols.
This change removes all universe symbols from history requests.
NOTE: Requests made directly to the history provider are not filtered out, as the
filtering happens within the QCAlgorithm implementation.
2018-03-05 14:18:33 -05:00
Michael Handschuh e70e18254b Add regression algorithm for framework crypto algo
This covers the case defined in #1635.
2018-03-02 11:23:35 -05:00