Hi Craig,
It is not possible to upload files, but it is possible to download files to QuantConnect with the Download method. Furthermore, data streaming is possible in LEAN.
However, for our scenario, one change we need to make to the data is to order the dates from oldest to newest, this way, LEAN will know to read all the dates. The next step is to define a custom BaseData class that contains all the fields we want, including the Dividend Yield, Dividend Pay Date, etc. Then, we create a reader that subscribes to a URL where we will pull the data from. Once we can read in the data line by line, we need to parse the data to fill in the fields we defined earlier, such as the Dividend Date. Two key fields of the BaseData class we need to fulfill is Symbol, and the Time, and we can use the ticker for Symbol and use the Ex Dividend date (EX-Date) for Time.
I’ve shown the necessary code in the attached backtest. Please note that if you choose to keep using tabs (“\t”), please comment out line 55 and uncomment line 56. Also, replace the URL with the data source, and make sure that the dates are ordered based on time as explained earlier.
Best,
Shile Wen