Import OHLCV ASCII data (without Date)
Author: akar
Creation Date: 7/25/2020 5:58 AM
profile picture

akar

#1

I've subscribed to a service, which gives me a daily end of data in a csv file. The format is the following:

SYM1,Open,.High,Low,Close,Volume
..............................................
...............................................
SYMx,Open,.High,Low,Close,Volume

Is there a way I can import this data into WealthLab developer ?

Thanks
Andy
profile picture

Eugene

#2
Sorry, it's neither possible to import a file missing the Date (or Date/Time) component nor one that contains multiple securities (SYM1 ... SYMX).

It may be possible to come up with a script that 1) breaks the file into multiple files and 2) inserts the missing Date component. However, if the service only provides daily updates without the historical records then it wouldn't make great sense.
profile picture

akar

#3

Initally, I can create a separate file for every symbol and populate the files with daily data (using a script), It will look like

AAPL.csv
2020-07-24,Open,.High,Low,Close,Volume
2020-07-23,Open,.High,Low,Close,Volume
2020-07-22,Open,.High,Low,Close,Volume
...................
2010-07-25,Open,.High,Low,Close,Volume

MSFT.csv
2020-07-24,Open,.High,Low,Close,Volume
2020-07-23,Open,.High,Low,Close,Volume
2020-07-22,Open,.High,Low,Close,Volume
...................
2010-07-25,Open,.High,Low,Close,Volume

Then everyday I can add the day's data for the symbol to the end of the file.

Will this approach work ?

Thanks
profile picture

Eugene

#4
Probably no. In your example the dates are out of order. I believe that the ASCII provider requires aligned dates.

What script language do you plan to use? In C# it would be trivial to reverse the order of records so they could be accepted by the provider:

2020-07-22,Open,.High,Low,Close,Volume
2020-07-23,Open,.High,Low,Close,Volume
...................
2010-07-25,Open,.High,Low,Close,Volume
profile picture

akar

#5
As you said it's trivial to reverse the dates . Will use python. The 2010 date should be the first line, correct ? I think you read it as 2020

If I have it in the format you suggested, how do I import.

profile picture

Eugene

#6
The provider is order agnostic i.e. the dates can be either ascending or descending. Both will be recognized automatically. What will not is the intermittent order of dates i.e. when at first it decreases and later starts increasing (as in your post #3) or vice versa.

On how to import, please refer to the User Guide > Data > Data Manager > Create New DataSet > Data Providers > ASCII. As you'll be reading it, note when it says that Date/Time and Separator fields accept customized input i.e. not just the prefilled options. Many new users just do not realize how flexible this is.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).