Commit Graph

711 Commits

Author SHA1 Message Date
Martin Molinero 0ee2102bb1 Fix or ignore failing unit tests 2019-07-26 12:46:02 -03:00
AlexCatarino 83d9d6d850 Fix Equity Fee Logic for AlphaStreamsFeeModel
Since cashbook receives a fee for a short equity positions, the fee is negative.
2019-07-25 17:06:15 +01:00
Oleg Sheyner 06a8d22f23 #3386 Trade Builder creates incorrect trades: finalize fixes + add regression tests 2019-07-11 12:52:02 -04:00
AlexCatarino 1495345b88 Removes Alternative Data Files
Use `.keep` file as a place holder to keep folder structure.
2019-07-11 00:12:01 +01:00
Alexandre Catarino c34e966409 Merge branch 'master' into feature-3351-alphastreams-fee-model 2019-07-10 22:57:09 +01:00
Martin Molinero f7665bf596 Address reviews
- Adding missing header file
- Adding string.Empty as default value for email data/message and subject. If null will use string.Empty
2019-07-10 18:44:28 -03:00
AlexCatarino aa85c7028e Remove LIBOR dependency
Borrowing costs will be modelled separately.
2019-07-10 21:46:46 +01:00
AlexCatarino 8a479e07c2 Refactors AlphaStreamsFeeModel
- Refactors and symplifies `AlphaStreamsFeeModel`.
- LIBOR is represented by `Security` since it can be updated
- Improve unit tests.
2019-07-10 17:01:33 +01:00
Jack Simonson 27f183fcd3 Create AlphaStreams Fee Model 2019-07-10 17:01:33 +01:00
Michael Handschuh eeae2e291e BUG #3021: Validate email addresses in NotificationEmail
* Adds Validate class in util with accompanying regular expressions
* Provides tests for NotificationEmail and Validate.EmailAddress
* Provides default values for NotificationEmail Subject and Message
  These default values resolve the underlying issue of #3021 w/out
  needing to modify external sources (such as impl of IMessagingHandler)
2019-07-08 02:52:04 -04:00
Michael Handschuh fb6b87392c BUG #3021: Add NotificationManagerTests
Adds basic test coverage for default NotificationManager.
* Confirms correct notification type added to Messages
* Confirms rate limit set at 30 (unable to fully test due to hard-coded
  and non-abstracted rate limit logic (could upgrade to RateGate as ctor
  parameter to aid unit testing here)
2019-07-08 02:52:04 -04:00
Stefano Raggi 43a16c3580 Add retry logic to LiveOptionChainProvider.GetOptionContractList 2019-07-03 18:31:42 +02:00
Martin Molinero e1482c50c2 Validate TimeRules.Every TimeSpan
- Will verify `TimeSpan` is not zero or less, adding unit tests.
2019-06-28 13:02:21 -07:00
AlexCatarino bb5cec3a49 Address Review and Fix Unit Tests 2019-06-21 13:14:47 +01:00
AlexCatarino 7b81f1a64d Implements Estimize Equity Endpoints Alternative Data
- Release: Financial releases for the specified company
- Estimate: Financial estimates for the specified company
- Consensus: Consensus of the specified release

For each equity endpoint, we create a `BaseData`, a Downloader and add unit tests.
2019-06-21 13:14:47 +01:00
Jared 40da80357b Merge pull request #3314 from QuantConnect/bug-3287-universe-selection-schedule
Adding PredicateTimeProvider for live mode
2019-06-19 10:58:26 -07:00
Gerardo Salazar f93c7d8b53 Add unit tests to cover changes 2019-06-19 10:08:27 -07:00
Martin Molinero 65201cb808 Adding StepTimeProvider for live
- Adding new `StepTimeProvider` that will advance time based on a
desired custom evaluator.
- Live trading `Options`, `Futures` and `Coarse` data will use a
`FrontierAwareEnumerator` + `StepTimeProvider`. This will allow to hold
the selection data until its the desired time
- `Universe.CanRemoveMember` will round the members time in the universe
based on the `UniverseSettings.MinimumTimeInUniverse`
2019-06-17 23:40:55 -03:00
Gerardo Salazar 3c04d922c2 Address reviews 2019-06-17 16:45:53 -07:00
Gerardo Salazar 2ad1f19f85 Implements Sec Custom Data, ToolBox Application, and Sample Algorithm 2019-06-17 16:45:53 -07:00
Martin Molinero 1581801f9b Address reviews 2019-06-11 12:01:57 -03:00
Jared 9ee7075034 Merge pull request #3275 from QuantConnect/performance-smart-totalportfoliovalue-calculation
Smart TotalPortfolioValue Calculation
2019-06-07 14:08:14 -07:00
Martin Molinero 2c1cf0fa93 Address reviews
- Adding new regression test algorithm
- `SecurityPortfolioManager` will subscribe to the `CashBook.Updated`
event to invalidate the `TotalPortfolioValue
2019-06-07 17:51:30 -03:00
Jared ac9e3dd432 Merge pull request #3282 from Martin-Molinero/feature-3281-add-cash-cashbook-updated-event
Adding Updated event for Cash and CashBook
2019-06-07 12:34:35 -07:00
Martin Molinero 084353f182 Smart TotalPortfolioValue Calculation
- `SecurityPortfolioManager` will keep track of the current
`TotalPortfolioValue` and only re calculated when flagged as invalid.
2019-06-07 16:13:57 -03:00
Martin Molinero 90a8f23d98 Address reviews 2019-06-07 16:02:53 -03:00
Martin Molinero f5a28ff829 Adding Updated event Cash and CashBook
- Adding new `Updated` event for `Cash` and `CashBook`. Adding unit
tests.
- `CashBook.Update` event will also be called for updates in the `Cash`
instances he holds.
2019-06-07 13:43:41 -03:00
Gerardo Salazar b0406ba9eb Adds the following symbols to futures database: EI, EMD, ...
EN, EPN, ESK, EVC, EWG, EWN, EXR, F1U, FO, FRC, FSS, GCU, GD, GDK,
GNF, HCL, HG, HH, HP, HRC, HTT, IBV, J7

Add new utility functions in FuturesExpiryUtillityFunctions
2019-06-07 08:49:56 -07:00
Martin Molinero 168fb98e20 Fix Turnover Ratio for Futures/CFDs
- `Futures` and `CFDs` sales value will use `ContractMultiplier` as the
rest of the securities.
- `FitnessScore` values will be truncated, not rounded, to 3 decimal places.
- Reducing code duplication for calculating the
`CompoundingAnnualPerformance`
2019-06-06 20:06:54 -03:00
Jared 26f4a0a490 Merge pull request #3000 from Adalyat/bug-2874/custom-currency-length
Support custom currency length
2019-06-04 16:35:54 -07:00
Martin Molinero e7641edf25 Shift Sigmoidal Scale 2019-06-04 18:18:43 -03:00
Martin Molinero 877f59285b Update Portfolio Turnover to be average daily 2019-06-04 11:58:37 -03:00
Martin Molinero 61db544817 Address reviews 2019-06-03 15:10:19 -03:00
Martin Molinero 61bab7439b Address reviews 2019-06-03 15:10:18 -03:00
Martin Molinero c015d4ca1f Add Fitness Score
- Adding new `FitnessScore`, score of the strategys performance, and
suitability for the Alpha Stream Market
2019-06-03 15:10:18 -03:00
Adalyat Nazirov 66a027c24f requested changes: change exception message 2019-06-01 20:27:30 +03:00
Adalyat Nazirov 4f1491b57e requested changes: test other base currencies 2019-06-01 20:27:29 +03:00
Adalyat Nazirov 14c62ac14a test missed CSV entry for Crypto 2019-06-01 20:27:29 +03:00
Adalyat Nazirov bce2465f5c add CryptoTests to check base and quote 2019-06-01 20:27:29 +03:00
Adalyat Nazirov caa61a8b31 update tests 2019-06-01 20:27:29 +03:00
Martin Molinero bb6671b811 Fix tests after RemoteFileSubscriptionStreamReader changes 2019-05-28 13:24:52 -03:00
Stefano Raggi f113c60d68 IB FeeModel throws ArgumentException for unsupported security type 2019-05-21 23:38:44 +02:00
Stefano Raggi 12b3658622 Fix Invalid Currency exception in IB FeeModel 2019-05-21 18:41:46 +02:00
Jared 2f46e708a1 Merge pull request #3184 from Martin-Molinero/refactor-3183-remove-backtestingtransactionhandler-thread
Removing BacktestingTransactionHandler thread
2019-05-17 07:22:24 -07:00
Jared 87f03e68ca Merge pull request #3185 from gsalaz98/feature-2991-add-expirations-to-futures-database-part-4
Add Various Symbols to Futures Database (Part 4 / 11)
2019-05-17 07:16:54 -07:00
Jared cd80c70775 Merge pull request #2868 from gsalaz98/feature-2859-rdg-delistings-mappings-splits-dividends-generator
RandomDataGenerator Mapping, Delisting, Splits, and Dividends Generator
2019-05-14 15:46:24 -07:00
Gerardo Salazar 44a4451ea3 Adds the following futures to futures database: BTC, ...
BWF, BZ, CB, CJY, CNH, CRB, CSC, CSW, CSX, CU, D1N, DC,
DCB, DY, E6, E7, EAD, ECD, EDP, EH
2019-05-10 17:39:51 -05:00
Martin Molinero f976ffa099 Removing BacktestingTransactionHandler thread
- For backtesting the algorithm thread will sequentially process pending
order requests
   - Adding new non blocking `BusyCollection`
- Updating `UpdateOrderRegressionAlgorithm` that suffered of a race
condition: it supposed `OnOrderEvent` would be called after the call to
`Transactions.AddOrder()` was finished
2019-05-10 16:15:24 -03:00
Martin Molinero 4382aa1886 Add algorithm thread
- Adding `WorkerThread` class, wrapper for a worker thread that will
execute given `Actions`.
    - Algorithm related code (`Construction`, `Initialization`,
    `Execution` will be executed by the same `WorkerThread` instance,
    this is required for `Python` debugging.
2019-05-09 11:23:28 -03:00
Stefano Raggi f7e06510d4 Fix missing front month contract in energy futures backtesting
Energy futures (CL, HO, RB, NG) expire in the month before the contract month.

To handle these properly, the following changes have been implemented:
- the AlgoSeekFuturesReader has been updated to create the future symbol with the correct expiry date
- the zip entry names in futures data files now contain the full expiry date (in addition to the contract month)
- the sample data files have been updated to use the new zip entry names
- new unit tests have been added and existing ones updated
2019-04-29 09:40:59 +02:00