Commit Graph

68 Commits

Author SHA1 Message Date
Martin-Molinero 91e8393aac DividedEventProvider distribution computation (#4828)
* DividedEventProvider distribution computation

- Update regression algorithm which was using a different reference
  price when calculating the dividend
- Adjust divided event provider to compute distribution using factor
  file reference price, if not 0. Adding unit tests
- For equities, only emit auxiliary data points for
  TradeBar configurations, not for QuoteBars, nor internal.

* Address reviews

- Split and Dividend event provider will throw an exception when there
  is no reference price available. Updating `wm` factor file which was
  missing references price and regression algorithms using WM.
- Updating unit tests asserting new exception
2020-11-11 15:47:51 -03:00
Michael Handschuh b1b8da1e17 Fixes Market Simulated Automatic Option Assignment (#4853)
* Add underlying holdings to regression result handler details log

When debugging option exercise/assignment issues it's useful to see the
underlying holdings at the time the option contract fill event is processed.

Also adds the full symbol string to the top of the order event section.
The Symbol.Value was being logged via OrderEvent.ToString(), but it wasn't
the full SecurityIdentifier - by including the full SID string it makes it
easier to correlate fills over symbol rename boundaries.

* Fix automatic option assignment from market simulation

During the recent OptionExerciseOrder.Quantity refactor, this case was missed.
Additionally, it was realized that there were no regression tests covering the
automatic assignment via the market conditions simulation. This change introduces
a regression algorithm that covers the automatic assignment of put/call options.

* Update BasicOptionAssignmentSimulation._rand to be non-static

If this value is static then we reuse the same Random instance for ALL regression
tests, thereby defeating the purpose of using a well known seed number. This means
we get different results based on the order execution of preceding algorithms.
By making this an instance variable each algorithm will start with the same seed
value, ensuring consistent runs between regression tests, either run as a suite or
running a single algorithm in isolation.
2020-10-13 19:39:25 -03:00
Martin-Molinero 6ef2ead929 Do not update price scale for fillforward data & IsFillForward flag fix (#4836)
* Do not update price scale for fillforward data

- Do no update price scale for fill forward data. FillForward data
  should keep using the prev scale for which it was created. Adding unit tests
- When cloning do not lose IsFillForward flag state, affects
QuoteBars/Ticks, does not affect TradeBars since they perform a memberwise clone.
Adding unit tests

* Auxiliaries shouldn't really affect on applied price factor scale.

Despite we can receeive FillForward'ed data points, corresponding
Auxiliaries for them are not FillForward so we do meet the condition
and then refresh price factor. As a result all futher FF data points are scaled too.

* Regression algorithm to check that FillForward'ed data points arrived with last real price factor

* Add trade for regression algorithm

- Minot tweaks and adding trade for new regression algorithm.
- Updating AddOptionContractExpiresRegressionAlgorithm because it is
  using the symbol for which new data was added.

Co-authored-by: Adalyat Nazirov <aenazirov@gmail.com>
2020-10-09 18:09:30 -03:00
Martin Molinero 63bf4e72a0 Revert "Revert "Fix market open missing FillForward bar""
This reverts commit 1ac8146eae.
2020-05-08 12:46:02 -03:00
Martin-Molinero 1ac8146eae Revert "Fix market open missing FillForward bar" 2020-05-08 11:38:59 -03:00
Martin Molinero f78142fe32 Fix rebase after data update 2020-04-28 15:53:01 -03:00
Martin Molinero 075e82629a Add more unit tests
- Add more fill forward unit test including a weekend using different
combinations of resolutions
- Add required AIG second data file
- Avoid list in most common FF case
2020-04-28 15:23:07 -03:00
Martin Molinero de05f15a12 Address review
- Adding live trading unit test
2020-04-24 19:04:41 -03:00
Martin Molinero 499248fe12 Revert "Revert "Adding Support for Equity L1 Quote Data""
This reverts commit 8cd8d206ca.
2020-04-06 10:32:59 -03:00
Jared 8cd8d206ca Revert "Adding Support for Equity L1 Quote Data" 2020-03-11 19:16:05 -07:00
Juan José D'Ambrosio d4bec86df0 Update daily and hourly sample files 2020-03-11 20:22:13 +00:00
Martin Molinero d5d00f8472 Update tests
- Update regression tests
- Add missing data
- Revert Messaging.cs change
- Update unit tests
2020-03-11 14:34:16 -03:00
D 3b25ea4240 Update test after adding the new sample data 2020-03-11 14:34:16 -03:00
D 336caf9856 Update sample data 2020-03-11 14:34:16 -03:00
D 222105f60d Update sample data 2020-03-11 14:34:14 -03:00
Juan José D'Ambrosio 1269966e51 Rebase and squash commits
Update test to the new crypto and equity subscriptions  rules:
- Only consolidates trades
- Low resolution data are only trades.
Update and fix tests

Add missing minute sample files

Update Regression algorithms statistics
2020-03-11 14:34:13 -03:00
Juan José D'Ambrosio 95336d69c5 Add tick sample data 2020-03-11 14:34:13 -03:00
Juan José D'Ambrosio 0794f4d472 Add second sample data 2020-03-11 14:34:05 -03:00
Juan José D'Ambrosio fd9de5895a Consolidate only trades, low resolution reads trades only, update tests
Crypto and Equities will consolidate trades by default

Daily and hourly resolution will return only trades for crypto and equities. 
Update equity TAQ regression test 

Add minute sample files

Updating regression algorithms

Update SpotMarket test cases

Add regression test for equity trades and quotes
- History request.
- Trades and quotes pumped into OnData.
- Subscriptions are added correctly.

Add sample data

Checks low resolution only subscribes to trade bars
2020-03-11 14:34:05 -03:00
Martin Molinero 8f14f1bdfa Fix failing regression tests
- After https://github.com/QuantConnect/Lean/pull/4000
CoarseFineFundamentalRegressionAlgorithm started using `MarketCap`, but
this value was always 0 in existing data, so it caused undeterministic
results. Adding new data and update expected result.
- `AccumulativeInsightFrameworkAlgorithm` expected statistic were not
correct, updating.
2020-01-17 11:14:09 -03:00
Martin Molinero 394130e58a Revert qc500 constituent - Fix data order
- Reverting qc500 constituent universe
- Fix data parsing order, based on the constituent universe data already
generated
2019-11-20 19:47:19 -03:00
Martin Molinero 70358482d4 Add ConstituentsUniverseDataGenerator algorithm
- Fix `ToString` implementation of the `SecurityIdentifier.None`. Adding
unit test
2019-11-20 17:22:27 -03:00
Martin Molinero 81974b3fb3 Address reviews 2019-11-20 17:20:33 -03:00
Martin Molinero e2c129a311 Improved version
- Renaming `PreSelected` to `Constituents`
- Adding base `ConstituentsUniverse`
- Adding Py and C# regression algorithm
- Fixing bug in `UniverseSelection`, it wasn't removing pending to be
removed securities unless the universe selection changed
- Adding test data
2019-11-20 17:16:44 -03:00
Martin Molinero eee4c7cb79 Adding PreSelected data types
- Adding new custom data `PreSelected` type and `PreSelectedQC500` using
it.
- Adding 1 day worth of pre selected data for the QC500
2019-11-20 16:58:43 -03:00
Martin Molinero b56af03c64 Address reviews: more tests 2019-11-19 16:38:46 -03:00
Jared e12bb68891 Update readme.md 2019-06-20 17:45:00 -07:00
Juan José D'Ambrosio a01825992b Add AssetClassification and CompanyProfile fine data 2019-04-24 04:21:46 +00:00
Stefano Raggi e37acc3601 Update sample coarse data files 2019-03-11 22:02:32 +01:00
Gerardo Salazar 463dd1d329 Add documentation for cfd, crypto, forex, future, and option data (#2978)
* Add documentation for cfd, crypto, forex, future, and option data

* Update data documentation to ensure consistency

* Fix titles, removed timezone reference
2019-03-04 16:54:02 -08:00
Stefano Raggi dba83a7755 Add missing factor file for WM 2019-01-17 18:02:47 +01:00
Stefano Raggi 6f212418c8 Add data files required for HistoryWithSymbolChangesRegressionAlgorithm 2019-01-17 12:56:03 +01:00
Michael Handschuh 57affafdc2 Implement 'live' factor files
Adds reference price to dividend/split
Adds GetSplitsAndDividends to FactorFile
Adds Apply methods to FactorFile/FactorFileRow
Updates factor files to include reference prices
2018-08-14 17:58:44 -04:00
Michael c1d7649175 Merge pull request #2335 from QuantConnect/bug-2334-stdev-regression-missing-data
Add missing data files for StandardDeviationExecutionModelRegressionAlgorithm
2018-08-01 11:33:22 -04:00
Stefano Raggi b24e6e3e70 Add missing data files for StandardDeviationExecutionModelRegressionAlgorithm 2018-08-01 12:28:11 +02:00
Stefano Raggi dc4b961ec8 Update CoarseFundamentalTop5Algorithm to run as cloud regression test
- The algorithm has been renamed to CoarseFundamentalTop3Algorithm and updated to select the Top 3 instead of Top 5.
- The only new data required is daily, map and factor file for FB and has been added (map and factor files are dated 6/4/2018, as required by all regression tests).
- The coarse fundamental open source data has been updated.
- The expected regression statistics for the algorithm have been updated.
2018-07-31 21:20:06 +02:00
Stefano Raggi 9040f2b5fa Fix MapFileResolver with remapped and delisted symbol 2018-07-24 12:06:19 +02:00
Stefano Raggi 0cc39e53b3 Add missing map/factor files for BasicTemplateIntrinioEconomicData regression 2018-07-18 15:09:08 +02:00
Michael Handschuh 7eb4526724 Update open source data set and regression statistics
Factor files from 2018.06.04
Data   files from 2018.07.05
2018-07-05 15:13:57 -04:00
Michael Handschuh 8402b6f01e Update factor files to 2018.06.04
It's important that we keep the factor files consistent with respect to
the date that they were generated. This enables us to run the regression
algorithms in the cloud and get the same results by using the factor files
from the correct date.
2018-06-07 12:16:45 -04:00
Jared efddacf4bd Create US equity data format readme.md 2018-05-10 09:03:46 -04: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
Michael Handschuh c9f82d4228 Extend option split regression to include split warning event 2018-02-05 12:12:55 -05:00
Juan José D'Ambrosio 9db5f7ded3 Add files via upload 2018-01-03 21:31:31 -03:00
Stefano Raggi eac552169d Add regression algorithms for splits with hourly data 2017-06-06 18:35:44 +02:00
Anshul afd0cb7a66 Copies gbsn factor file to Data folder from TestData 2017-05-17 20:30:22 +05:30
Stefano Raggi 88172992cc Add missing file to seed SPY in BasicTemplateAlgorithm
Prevents logging the following error:
ERROR:: DefaultDataProvider.Fetch(): The specified file was not found: ../../../Data/equity\usa\minute\spy\20131004_trade.zip
2017-02-22 17:58:34 +01:00
quant1729 1305d96edd Open interest support: backtesting, converters, live data handlers (IQFeed/IB), live trading (IB). First cut. Regression Test. 2016-11-15 21:33:33 +01:00
quant1729 1141cd21e6 Merge branch 'futures' into master
Conflicts:
	Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj
	Algorithm/QCAlgorithm.cs
	Brokerages/InteractiveBrokers/InteractiveBrokersBrokerage.cs
	Common/QuantConnect.csproj
	Common/Securities/Option/Option.cs
	Data/equity/usa/factor_files/aapl.csv
	Data/symbol-properties/symbol-properties-database.csv
	Engine/DataFeeds/Enumerators/Factories/BaseDataSubscriptionEnumeratorFactory.cs
	Engine/DataFeeds/Enumerators/Factories/OptionChainUniverseSubscriptionEnumeratorFactory.cs
	Engine/DataFeeds/SubscriptionDataReader.cs
	ToolBox/QuantConnect.ToolBox.csproj
2016-11-07 16:18:11 +01:00
quant1729 38cc4d3073 Added regression tests data 2016-10-26 21:41:28 +02:00