Git Product home page Git Product logo

Comments (2)

Heerozh avatar Heerozh commented on June 4, 2024

CsvDirLoader was not designed to cover all situations when designing (too difficult), you can refer to QuandlLoader (It has fewer lines) to rewrite one for your needs.

Answer your questions:

My broker provides me data feeds named (for instance) AAPL.txt (read: not .csv); can CsvDirLoader access those (without having to rename/link them?)

No, you need rename to *.csv. I will add a parameter in the future.

My broker "csv" data doesn't have a csv header, how can I tell CsvDirLoader which column is what?

This can be done by passing the pandas.read_csv parameters, as an example:

loader = CsvDirLoader('path_to_files', parse_dates=True, prices_index='date', header=None, names=['date','open','high','low','close','volume'])
print(loader._load())
date asset open high low close volume _time_cat_id
12/31/1980 TEST 0.4891 0.4891 0.4873 0.4873 11177100 0
12/31/1980 TEST 0.4926 0.4962 0.4926 0.4926 6772100 1
12/31/1980 TEST 0.4837 0.4837 0.4819 0.4819 11170100 2

Does spectre supports intraday data

Yes. But CsvDirLoader needs time and date in one column. For your data, you may have to rewrite a DataLoader.

from spectre.

jibanes avatar jibanes commented on June 4, 2024

Thank you, very useful, I have reformatted the data accordingly.

from spectre.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.