Commit Graph

861 Commits

Author SHA1 Message Date
AlexCatarino 183cb917fe Makes IAlgorithm Debug/Error/LogMessages a ConcurrentQueue
IAlgorithm DebugMessage, ErrorMessage and LogMessage are now ConcurrentQueue<string> instead of List<string> because List.Add is not thread safe.
Copying a list (using ToList()) at LiveTradingResultHandler while adding an element to it at QCAlgorithm caused a runtime error.
2016-09-27 14:02:28 -03:00
quant1729 dd72878d2c Implementing futures support. Future, FutureCache, Futures Chain, Futures Universe classes and more 2016-09-26 13:56:02 +02:00
Andrew Hart a8621ba99c Default security markets are specified in BrokerageModel.DefaultMarkets
The default value for the market parameter in AddForex, AddOption, AddEquity and AddCfd is null.  This allows unspecified markets to be set from the BrokerageModel.DefaultMarkets in the AddSecurity method for new securities added with these methods.  SetBrokerageModel updates BrokerageModel.DefaultMarkets and therefore the market used for all new securities.
2016-09-22 14:50:48 -04:00
AlexCatarino 82d81108ad Implements price variation models
Implements IPriceVariationModel interface which takes the security object and returns a decimal variation
Implemets SecurityVariationModel class: default implementation of IPriceVariationModel that returns a fixed value (read from symbol-properties-database) for decimal variation
Implemets EquityVariationModel class: implementaion of IPriceVariationModel that returns a decimal variation as a function of equity price
Implemets AdjustedPriceVariationModel class: implementaion of IPriceVariationModel that returns zero
Adds unit test
2016-09-20 15:36:04 -03:00
quant1729 b3590647b5 Support for option strategies in API, QL option pricing models:
- Added OptionStrategies class with 10 popular option strats
- Defined OptionStrategy class
- Added support for trading of option strategies in QCAlgorithm.Trading.cs
- Added several estimator interfaces to introduce QL pricing models extention points: IDividendYieldEstimator, IRiskFreeRateEstimator, IUnderlyingVolatilityEstimator provided default implementation (flat term structure)
- Added QLOptionPriceModel class that contains meat of the calculations
- Added OptionPriceModels class that exposes 12 popular option pricing models to the user: those include Black Scholes, Barone-Adesi Whaley, Bjerksund Stensland, Crank Nicolson FD, Binomial Trees and more.
- Modified Greeks class to support lazy evaluation and introduce IV
- Partially tested on live data and trading (IQFeed/IB) and backtests. Need more data for tests.
2016-09-20 17:14:25 +02:00
Stefano Raggi c59a1776b0 Add new overload for AddUniverse with fine fundamental selection
Accepts a predefined universe instead of a coarse selection function
2016-09-20 16:07:21 +02:00
quant1729 5b2b4753d4 Added support for basic option strategies 2016-09-18 21:26:38 +02:00
quant1729 0396841d82 - Added support for sourcing and caching the full symbol list from IQFeed website.
- Added IQFeed options support to toolbox: option chain universe, option symbol list, subscriptions, live prices
- Added LiveTradingDataFeed to support options live screaming
- Added IB live options trading support: trading orders, holdings, live option exercising
- Modified ISymbolMapper interface to support derivatives (options, futures)
- Fixed minor bugs with (introduced ealier) symbol changes for options
Tested with IQFeed version 5.2.4.2. IB TWS offline version 957.
2016-09-14 21:56:12 +01:00
quant1729 2dce74e26d - Extended Option security and Option holding classes
- Updated IB fee model to support option exercise
- Added support for splits for options. Not tested on real data yet.
- Added option exercise functionality for long positions. Unit Tests. Not tested on real data yet.
- Added option assignment functionality for short positions. Assignment event. Unit Tests.
- Added basic option assignment simulator for backtesting brokerage. Simulates assignments for deep ITM short positions close to expiration. Unit Tests.
2016-08-31 18:00:00 +02:00
jameschch@outlook.com befbfc20ca merge latest upstream 2016-07-26 20:03:03 +01:00
Stefano Raggi 81e723405f Merge branch 'master' into fundamental 2016-07-18 21:44:53 +02:00
jaredbroad 1642aed05a Refactor PreOrderChecksImpl() and add lot size check for 0-quantity orders 2016-07-13 16:00:37 -04:00
jameschch@outlook.com 464e2a1a15 Remove obsolete comment 2016-07-03 18:57:57 +01:00
Stefano Raggi 50fe22163c Adds AddUniverse(coarse, fine) method to QCAlgorithm 2016-06-29 00:39:37 +02:00
Michael Handschuh 1652bce513 Make DollarVolumeUniverseDefinition symbols unique 2016-06-28 04:03:39 -04:00
Michael Handschuh db8592058a Add CoarseFundamentalUniverse type 2016-06-28 04:03:33 -04:00
jameschch@outlook.com 0e8755dc48 Changes related to #330 order quantity decimalized 2016-06-24 11:53:29 +01:00
jameschch@outlook.com 7763efdc83 Changes related to #330 order quantity decimalized 2016-06-24 11:28:21 +01:00
devalkeralia 5387f9403d Added logic for Rounding off Order Quantity for SetHolding method 2016-06-15 18:17:44 -04:00
jameschch@outlook.com 18f3bbe4c2 Add remaining SWISS tests 2016-06-08 10:29:27 +01:00
jameschch@outlook.com 830692f7ad Adds SWISS factory method 2016-05-31 15:06:41 +01:00
jameschch@outlook.com 92728c386d Adds FRAMA external data testing 2016-05-26 11:27:28 +01:00
jameschch@outlook.com 4001cf8a8b Adds FRAMA factory method 2016-05-25 15:38:36 +01:00
Stefano Raggi 114f82f391 Merge from master 2016-05-12 21:29:58 +02:00
AlexCatarino 34b664460d Adds VWAP indicator via WeightedBy indicator extension
Adds WindowIdentity indicator and its test. We need this at WeightedBy to keep values and weights at sync (same sample number).
Adds WeightedBy indicator extension and a simple test in IndicatorExtensionsTests
Adds VolumeWeightedAveragePriceIndicator (VWAP indicator), its test and external data file for testing.
2016-04-21 19:34:52 -03:00
jaredbroad dd8a6442b6 Tidy unneccessary TravisCI build configuration 2016-04-19 19:51:51 -04:00
jaredbroad e93006b6a5 Added Travis CI release configuration and disabled views from building in linux 2016-04-15 12:44:37 -04:00
Michael Handschuh 04db12106a Merge remote-tracking branch 'origin/multi-subscriptions' into options-new
Conflicts:
	Engine/DataFeeds/UniverseSelection.cs
	Tests/QuantConnect.Tests.csproj
2016-04-13 12:45:05 -04:00
Michael Handschuh a95b4c722a Remove remaining single sub assumptions from Algorithm projects 2016-04-12 19:06:46 -04:00
Michael Handschuh a44ce9f2ab Remove single subscription assumption from history impl
When this was originally written, we were assuming one subscription per security.
This removes that assumption and tries to find subscriptions matching the request
2016-04-12 19:06:43 -04:00
Michael Handschuh 2ad63429b7 Memoize enumerables returned via the history API 2016-04-12 19:06:39 -04:00
Michael Handschuh 5fe577f331 Adds Option.Underlying, set via PostInitialize
Individual option securities will have this value set by the Universe on security creation
2016-04-07 14:33:55 -04:00
Michael Handschuh 7b183eded3 Add equity security for options in PostInitialize 2016-04-07 14:18:25 -04:00
Michael Handschuh e392183bb4 Adds QCAlgorithm.AddOption 2016-04-07 14:12:47 -04:00
Michael Handschuh e7c37a84ff Adds support for OnData(QuoteBars/OptionChains) 2016-04-07 13:39:30 -04:00
Michael Handschuh ae8c68f99c Adds Security.IsTradable flag
By default, all internal feeds are considered non-tradable, but this value can be overriden via public get/set
2016-04-06 19:15:50 -04:00
Michael Handschuh cc25950e10 Adds SubscriptionDataConfig.IsFilteredSubscription
Subscriptions can now be explicit as to whether or not a SubscriptionFilterEnumerator is to be applied.
Regular security price data subscriptions get filtered (user/market-hours)
Universe subscriptions don't get filtered (even if a subscription of equity price data, such as options underlying feeds)
2016-04-05 15:51:45 -04:00
Stefano Raggi 46a82a8a91 QCAlgorithm.Liquidate now liquidates holdings in symbol order 2016-04-01 01:00:42 +02:00
Michael Handschuh a221f35743 Revert "Fixes CalculateOrderQuantity regression bug from 5301d81"
This reverts commit 08181aa8c8.

This commit broke several regression tests relating to the SetHoldings function and should be reviewed further.
2016-03-29 09:50:59 -04:00
Michael Handschuh 08181aa8c8 Fixes CalculateOrderQuantity regression bug from 5301d81 2016-03-28 23:49:24 -04:00
Michael 0d720cedef Merge pull request #327 from StefanoRaggi/set-holdings-review
SetHoldings/CalculateOrderQuantity bug fixes + new tests
2016-03-28 13:41:42 -04:00
Stefano Raggi 6b0fa8259a PercentagePriceOscillator now derives from AbsolutePriceOscillator 2016-03-24 02:18:21 +01:00
Stefano Raggi ad60c42e75 Adds PercentagePriceOscillator indicator (PPO) 2016-03-23 21:15:39 +01:00
Stefano Raggi 890d668653 Adds AbsolutePriceOscillator indicator (APO) 2016-03-23 20:53:08 +01:00
Stefano Raggi bf80c482e6 Reduces number of iterations in CalculateOrderQuantity when fees high relative to price 2016-03-23 11:00:22 +01:00
Michael Handschuh 2b6ca278b8 Merge branch 'midprice-indicator' of https://github.com/StefanoRaggi/Lean into StefanoRaggi-trix-indicator 2016-03-22 11:14:54 -04:00
Michael Handschuh 1aee77e317 Merge branch 'trix-indicator' of https://github.com/StefanoRaggi/Lean into StefanoRaggi-trix-indicator
Conflicts:
	Algorithm/QCAlgorithm.Indicators.cs
	Tests/QuantConnect.Tests.csproj
2016-03-22 10:56:26 -04:00
Michael Handschuh e54d0f7d5d Merge branch 'ultosc-indicator' of https://github.com/StefanoRaggi/Lean into StefanoRaggi-ultosc-indicator
Conflicts:
	Algorithm/QCAlgorithm.Indicators.cs
2016-03-22 10:54:11 -04:00
Stefano Raggi ab44f5f18e Fixes typo in xml doc comment 2016-03-21 21:57:29 +01:00
Stefano Raggi 1a797a5c42 Adds MidPoint indicator (MIDPOINT) 2016-03-21 21:20:11 +01:00