Commit Graph

72 Commits

Author SHA1 Message Date
AlexCatarino de19c98827 Improves PandasConverter
In the previous implementation, each one of bars.Select statement causes an extra enumeration of the bars enumerable. To make matters worse, this is all invoked 4*N times, where N is the number of data points.

Another bottleneck was related to the way we concatenate pandas.DataFrames: we would add a new data frame to an existing data frame individually. Now, we collect all data frames and concatenate them in one operation.

With this new implementation, we have accomplshed a reduction of 90% of memory usage in a history request of 1000 symbols.
2017-10-27 23:49:01 +01:00
AlexCatarino 994c47e55b Implements SetSecurityInitializer for Python algorithms
Creates a class that wraps a PyObject that represents a ISecurityInitializer object for the case where we use a class to initialize securities
Adds SetSecurityInitializer method that accepts a PyObject that may represent a method, a function or class that is used to initialize securities
2017-10-11 10:37:47 +01:00
AlexCatarino b4313ad740 Implements SetBrokerageModel for python algorithms
Adds BrokerageModelAlgorithm to showcase the implementation
2017-10-03 00:17:34 +01:00
AlexCatarino 9998e65df9 Adds support for custom models for python
Adds support for fee, fill and slippage custom modelling.
Adds CustomModelsAlgorithm to showcase the new feature
Modifies C# version of CustomModelsAlgorithm to match existing data in github
2017-09-28 16:47:58 +01:00
AlexCatarino 9bbf52b4b8 Adds check for null Bid/Ask in QuoteBar for pandas.DataFrame 2017-09-13 23:09:10 +01:00
AlexCatarino 2d377b6f09 Adds QuoteBar handling to pandas.DataFrame creation 2017-08-21 13:41:00 +01:00
AlexCatarino b5dd2c403d Implements Indicator History in Jupyter project
With simple commands, we can use Lean indicators in QuantBook. It fetchs the historical data from the symbol, calculates the indicator and saves the output in a pandas.DataFrame.
2017-08-18 18:36:42 +01:00
AlexCatarino ccce9a0087 Lower-cases pandas.Dataframe columns names
Also changes BasicQuantBookTemplate to reflect the changes
2017-08-18 18:24:25 +01:00
AlexCatarino b322dec666 Modifies the pandas dataframe created from a history request
History requests should not return a dictionary with a dataframe, but a multi-index dataframe.
It is more common to work with multi-index dataframes rather than multi-column.
2017-08-18 18:23:11 +01:00
AlexCatarino 46ead54f79 Implements Quandl support for Python
Implements Quandl support for Python.
It was not possible to derive from Quandl in order to select the column. If the data did not have "close", it would thrown an exception since it would look for this work in a dictionary.
It is now possible to select the column.
See example QuandFuturesDataAlgorithm.py
2017-07-27 00:18:08 +01:00
Stefano Raggi b657c0d663 Fix speed issue in AlgorithmPythonWrapper 2017-05-21 22:40:55 +02:00
Stefano Raggi 226fa7321e Reduce Python locking in AlgorithmPythonWrapper
- Removed unnecessary Py.GIL() calls
- Cached some IAlgorithm properties
2017-05-21 14:45:01 +02:00
Stefano Raggi 8870a6baa1 Fix data type bug in BrokerageModelPythonWrapper.DefaultMarkets 2017-05-19 22:16:12 +02:00
Stefano Raggi 076204e92d Add BrokerageMessageHandlerPythonWrapper class 2017-05-19 21:46:01 +02:00
Stefano Raggi 5c4bd9a684 Add new methods to IAlgorithm for Python usage 2017-05-19 20:50:57 +02:00
AlexCatarino e7a744a236 Adds HasCustomData flag to SubscriptionManager
This flag will be used to speed python algorithms execution, since it avoids a wrapping operation that is only required when there is custom data in python algorithms.
2017-05-01 14:47:17 +01:00
jaredbroad 8f52e15564 Final rework of Pytuils 2017-04-30 18:02:15 -04:00
jaredbroad 469abd42cf Shuffle PyUtil to build-none, common project 2017-04-30 17:44:43 -04:00
jaredbroad 0e114cb94c Fix missing arg on Liquidate 2017-04-29 18:39:13 -04:00
AlexCatarino 050d5dc7dd Implements TradeBuilder for Python Framework 2017-04-10 12:06:53 +01:00
jaredbroad 664308e7fa Merge in the IDataProvider updates 2017-03-26 10:27:42 -04:00
AlexCatarino 9774af9adc Custom Data for Python Support 2017-02-09 17:48:50 -02:00