Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Futures and options #668

Merged
merged 198 commits into from Jan 14, 2017
Merged

Futures and options #668

merged 198 commits into from Jan 14, 2017

Conversation

@quant1729
Copy link
Contributor

quant1729 commented Dec 29, 2016

Support for futures and options live trading, data streaming, backtesting.

mchandschuh and others added 13 commits Apr 8, 2016
Conflicts:
	Common/Data/UniverseSelection/OptionChainUniverse.cs
quant1729
- 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.
…Feed 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.
- 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.
@mchandschuh

This comment has been minimized.

Copy link
Collaborator

mchandschuh commented on Common/Data/Market/OptionContract.cs in b359064 Sep 21, 2016

rogue comment :)

This comment has been minimized.

Copy link
Contributor Author

quant1729 replied Sep 21, 2016

Yes, sorry. Fixed.

@mchandschuh

This comment has been minimized.

curious about the suffix Handle on some of these types. What is this in reference to?

This comment has been minimized.

Copy link
Contributor Author

quant1729 replied Sep 21, 2016

Those are QuantLib types. I*Estimator interfaces are designed to give user QL extention points once user started working with QL option pricing models. Types are used and live in QLOptionPriceModel class. Those types are not supposed to leak into the LEAN.

quant1729 added 15 commits Sep 21, 2016
…/Lean into options-and-futures

Conflicts:
	Common/Securities/Option/OptionMarginModel.cs
	Tests/Common/Securities/OptionMarginModelTests.cs
… Hid QL estimator interfaces from end-user (for now). Added pricing model tests.
… Hid QL estimator interfaces from end-user (for now). Added pricing model tests.
… Hid QL estimator interfaces from end-user (for now). Added pricing model tests.
-Loading IQFeed futures universe
…tes for FX, and NY stamped - for all other asset classes
…s, financials, etc)

Added symbol properties for that nomenclature
Added IQFeed mapping for that nomenclature
Added basic futures algo class
andrewhart098 and others added 26 commits Jan 6, 2017
This method is used by both Future and OptionsChainUniverse.  This method is useful, espeically in the SecurityManager.  It will eventually be used there.
This method is helpful in determining if a Type is a common data type, which are TradeBar, QuoteBar and OpenInterest.
Added helpful LeanData methods for getting common types
…for Cacnonical securities

QCAlgorithm.History.GetLastKnownPrice sets the securityType on the history request.
…e provider. Refactored IDataFileProvider interface.
…e to work of limiter. Added regression test.
GetLastKnownPrice does not issue history request for Canonical securities
Update Future sample data files
Update Future symbol properties database
…data file provider. Refactored IDataFileProvider interface."

This reverts commit c59743d.
quant1729
Conflicts:
	Common/QuantConnect.csproj
…r all symbols before start. Refactored zip process spawning.
quant1729
quant1729
@rbohac
rbohac approved these changes Jan 14, 2017
@rbohac rbohac merged commit e7ebddf into master Jan 14, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@jaredbroad jaredbroad deleted the futures branch Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.