You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Lean Data SDK is a cross-platform template repository for developing custom data types for Lean.
@@ -25,74 +23,13 @@ Specifically, the enviroment where these scripts will be run is [quantconnect/re
25
23
26
24
#### Installation
27
25
28
-
This repository should be forked by each new data provider.
26
+
This repository should be forked for each unique data source which requires its own data processing. Once it is cloned locally, you should be able to successfully build the solution, run all tests and execute the conveter scripts.
29
27
30
-
Once it is cloned locally, should be able to successfully build the solution, run all tests and execute the conveter scripts.
28
+
Once ready, please contact support@quantconnect.com and we will create a listing in the QuantConnect Data Market for your company and link to your public repository and commit hash.
31
29
32
30
#### Usage
33
31
34
-
- Once the repository is forked, the existing example implementation should be adjusted to create a new data type for a particular data set.
35
-
- The Assembly name and data type have to be changed since they should be unique.
36
-
- Converter and downloader scripts should be developed following the [examples in this repository](https://github.com/QuantConnect/LeanDataSdk/tree/master/DataConverterScript). These script should be provided to `QuantConnect` as well as the fork repository at a particual commit.
37
-
38
-
### User guide
39
-
40
-
TODO:
41
-
42
32
### Tutorials
43
33
44
-
#### Create Data Type
45
-
46
-
##### Introduction
47
-
48
-
This tutorial we will create a new custom C# data type that will allow Lean algorithms or research environment to consume a particular data set.
49
-
50
-
##### New Lean Data Type
51
-
52
-
In [Lean](https://github.com/QuantConnect/Lean) each data type inherits from [BaseData](https://github.com/QuantConnect/Lean/blob/master/Common/Data/BaseData.cs), overrides a set of methods and incoporates any specific property this data set has.
53
-
The `DataLibrary` project holds an example custom data type [MyCustomDataType](https://github.com/QuantConnect/LeanDataSdk/blob/master/DataLibrary/MyCustomDataType.cs).
54
-
55
-
-`GetSource()` method returns an instance of `SubscriptionDataSource` which will tell Lean from where should it source data for a particular given date, ticker, and configuration.
56
-
-`Reader()` method should return a new instance of this data type for a given line of data
57
-
-`Clone()` Clones the data
58
-
-`RequiresMapping()` Indicates whether the data source is tied to an underlying symbol and requires that corporate events be applied to it as well, such as renames and delistings
59
-
-`IsSparseData()` Indicates whether the data is sparse. If true, we disable logging for missing files
60
-
-`ToString()` converts the instance to string format
61
-
-`DefaultResolution()` gets the default resolution for this data and security type if the user provided none
62
-
-`SupportedResolutions()` gets the supported resolution for this data and security type
63
-
-`DataTimeZone()` specifies the data time zone for this data type
64
-
65
-
##### Tests
66
-
67
-
It will be a requisite that each data type has a json and protobuf round trip serialization and deserialization, as well as a clone unit test. Examples provided at [MyCustomDataTypeTests](https://github.com/QuantConnect/LeanDataSdk/blob/master/Tests/MyCustomDataTypeTests.cs)
68
-
69
-
The only adjusment `MyCustomDataTypeTests` test suite requires for a new data type should be the `CreateNewInstance()` method. Which should returned a fully initialized data point.
70
-
71
-
#### Create Algorithm
72
-
73
-
##### Introduction
74
-
75
-
Creating an example `QCAlgorithm` will allow quants to understand how to consume a data set and what value could it provide to their trading strategy.
76
-
77
-
##### Developing Algorithm
78
-
79
-
A [sample](https://github.com/QuantConnect/LeanDataSdk/blob/master/Tests/CustomDataAlgorithm.cs) algorithm is provided in this repository for the defined custom data type.
80
-
81
-
-`Initialize()` Specifies the **data** and resolution required, as well as the cash and start-end dates for the algorithm. This is where the custom data should be added.
82
-
-`OnData(Slice slice)` is the primary entry point for the algorithm. Each new data point will be pumped through it. This should be where the custom data is retrieved from the `slice` object and used.
83
-
84
-
#### Create Data Converters
85
-
86
-
##### Introduction
87
-
88
-
Data converter scripts will be in charge of fetching new data and processing it into a format that Lean and the [new data type](https://github.com/QuantConnect/LeanDataSdk#create-data-type) will be able to read.
89
-
90
-
TODO:
91
-
92
-
##### Python Notebook
93
-
##### Python Script
94
-
##### Bash Script
95
-
96
-
### Api reference
97
-
98
-
TODO:
34
+
- See [Tutorials](https://github.com/QuantConnect/Lean/blob/master/tutorials.md) for a step by step guide for creating a new LEAN Data Source.
0 commit comments