- `GetCashBalance()` will return a `List<CashAmount>`, will not need to
set conversion rates, which requires knowing what the account currency is.
- Removing `Global.Holding` conversion rate field. It wasn't being used
and required knowing what the account currency is.
- Adding equality operators for `CashAmount`. Adding unit tests.
This follows the pattern used by delisting events, where we send a warning event
before the start of trading on the trading day before the split will happen. This
change also adds a SplitType enum having a Warning and SplitOccurred values.
* Recommitted. Fixed missing code
* Renamed tests for Api to ApiTests
* Renamed Live to LiveAlgorithm
* Add LiveAlgorithm configuration classes for supported brokerages
The QuantConnect api v2 enables users to launch live algorithms with one of the supported brokerages. The LiveAlgorithmSettings class adds brokerage specific configuration classes that will allow algorithms to be configured to run live on a specific brokerage.
* Projects can now be updated via the Api v2
* Projects can be created via the Api with LiveAlgorithmSettings class
* Renamed CreateLive to CreateLiveAlgorithm in IApi
* Added tests for luanching live algorithms via api V2 for brokerages
* Created ProjectUpdateResponse to represent api response when project is updated
The new class ProjectUpdateResponse derives from RestReponse and adds a field, Files, that represents the project files associated with a project. This new class is now what the Api method returns. A new test, Update_ProjectFiles_Successfully, tests updating the files for a project via the Api
* Refactored ApiTests and expanded ApiTest docs
* Renamed brokerage specific classes that derive from BaseLiveAlgorithmSettings
* Refactored Oanda and Tradier LiveAlgorithm settings
Tradier and Oanda do not required certain parameters like password and username to trade live, however, they are required for the QC Api v2. A new constructor was added to BaseLiveAlgorithmSettings that does not take in these parameters and sets the unneeded parameters to blank strings. Tradier and Oanda LiveAlgorithmSettings implement this new constructor.
* Minor tweaks to OandaLiveAlgorithmSettings
* Brokerage Api tests now use appropriate algorithms
Some brokerage tests were using algorithms that traded securities that did not pertain to the brokerage. This has been corrected.
* Refactored naming of certain Api methods to be more consistent
* Added extra parameters to Api method ListLiveAlgorithms
* Added class that represents chart data from "live/read" api endpoint
* Minor change to LiveAlgorithmResults
* Version is now an optional parameter for LiveAlgorithmApiSettingsWrapper
* Minor formatting changes to long method signatures in Api.cs
* IApi now accepts versionId for CreateLiveAlgorithm
* Removed BrokerageName from LiveAlgorithmSettings.
* Fixed spelling mistake
* Added custom JsonConverter for LiveAlgorithmResults
In order to properly deserialize the results of an algorithm from the api endpoint "live/read", a custom deserializer is added to deal with null ChartPoints. In order to deserialize ChartPoints that are null, ChartPoint has been changed from a struct to a class.
* Fixed type-o in ApiTests
* Add Ignore NUnit attribute to ApiTests
* Removed ApiAlgorithmStatus
In order to better align with the rest of the project, ApiAlgorithmStatus has been replaced by the existing AlgorithmStatus enum. Only certain values of AlgorithmStatus can be used with the Api. Unsuported values throw an ArgumentException error.
* Changed Resolution field in LiveAlgorithmResults from string to enum
* BrokerageEnvironment enum added to represent live/paper trading
* Environment set based on user in InteractiveBrokersLiveAlgorithmSettings
* Minor tweaks to BaseLiveAlgorithmSettings constructor
* Environment is hard coded for TradierLiveAlgorithmSettings
* Updated ApiTests to reflect changes to LiveAlgorithmSettings
* ApiConnection uses OrderJsonConverter to deserialize orders
* AlgorithmStatus is now nullable for ListLiveAlgorithms
* Tweaked account variable for InteractiveBrokersLiveAlgorithmSettings
* Replaced null comparisons with call to HasValue for LiveAlgo status
- 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.
Fixes bug in backtest history provider
Requests for bar counts were always incorrect because the history provider
was emitting bars whose end time is equal to the start time.
Implemented a FilterEnumerator<T> privately so he can filter those out
when using non-tick data
This includes updating all usages of symbol as a security identifier to use the new type.
The type includes a unique field, SID, as well as the current ticker's value. This allows
for consistent addressability while also allowing the ticker to evolve over time with the
mapping changes.
Effort was made to maintain compile and runtime backwards compatibility.
This change adds OnData(Delisting data) event handler to the algorithm and is fired when a security gets delisted.
Likewise, when a security is delisted, data will stop being sent into the algorithm and if the algorithm has any
holdings then a MarketOnClose order is submitted at midnight on the last day of trading. If you require that the
algorithm does not sell its shares, then you must cancel the MarketOnClose order before close of trading.
Removed unused BaseDataFeed and IQFeedDataFeed
Add catch for NullReferenceException in stream store
ConsoleSetupHandler now throws on live jobs, use BrokerageSetupHandler
Renamed/moved FixedSizedQueue to Util\FixedSizeQueue