Code Monkey home page Code Monkey logo

Comments (15)

MichaelWS avatar MichaelWS commented on May 28, 2024

It would probably save a lot of space if it could use some standard format hdf5 file

from zipline.

ehebert avatar ehebert commented on May 28, 2024

Agreed, hdf5 would provide better performance with regards to space (and I'm assuming I/O as well).

I'll open a separate issue, since CSV is important to support, since it's a sort of a lingua franca of data export/import.

from zipline.

MichaelWS avatar MichaelWS commented on May 28, 2024

Something like this will work. https://gist.github.com/MichaelWS/5886984

from zipline.

ehebert avatar ehebert commented on May 28, 2024

Looks like a good start @MichaelWS, is it ok, when time permits, if I base a CSV source off of your linked gist, with attribution to you?

from zipline.

ehebert avatar ehebert commented on May 28, 2024

Started a branch here, https://github.com/quantopian/zipline/tree/csv-data-source

Waiting on having a unit test with a small example CSV file before merging that in.
(In the zone of "I'll try to get this done, soon", but accepting patches.)

from zipline.

MichaelWS avatar MichaelWS commented on May 28, 2024

try this script to create a csv and a hdf5 data source : https://gist.github.com/MichaelWS/dbb8dcf15b0ec3d479e8

from zipline.

MichaelWS avatar MichaelWS commented on May 28, 2024

I issued a pull request to fix this issue.
#244

from zipline.

michaeljohnbennett avatar michaeljohnbennett commented on May 28, 2024

I think I can rework this code to handle CSI data as well. does the SID always have to be an int? CSI use an UID for their symbols that are strings "S000XXXX" is the rough format.

from zipline.

MichaelWS avatar MichaelWS commented on May 28, 2024

michael,
I made SID a string because I was using strings as well. Let me know if you need any help with it. What do the csi files look like?

If they are in a directory of csv's, you can use data_source_tables_gen.py to generate a pytables file that will be pretty quick.

from zipline.

ehebert avatar ehebert commented on May 28, 2024

A sid can be a string, e.g. when used with the Yahoo! data source
the ticker symbol string is used as the identifier.

from zipline.

michaeljohnbennett avatar michaeljohnbennett commented on May 28, 2024

CSI files can be whatever format you want, thats good and bad of it, I can make them per symbol or daily or whatever, its quite flexible the output, shame the app is windows only however, hence my need to handle this all via windoze....

the pytables/HDF5 sounds my favourite option, I think I'll set it up to use a config file of sorts you can place in the loader folder to signify the columns and they also output a rather handy info file that links the CSI GUID to each symbol and has all the stuff like exchange, currency, text name, ticker symbol etc.

So using a String for the SID will help, I might just make it use the ticker symbol as that would be more user friendly but I'm trying to base things off of CSI portfolios of stocks (these can be predefined like russel 3000 or nasdaq 1500 etc) as I want to momentum trade a universe not single stock pairs etc so from what I can understand I have a bit of work to do or wait for some features to be released downstream from quantopian.

Thanks for all your help, you guys are ultra helpful with stuff!

from zipline.

ehebert avatar ehebert commented on May 28, 2024

I'm curious, since some applications work better than others with it,
but is it be possible to run CSI under WINE, http://www.winehq.org/ ?

  • Eddie

Michael [email protected] writes:

CSI files can be whatever format you want, thats good and bad of it, I can make
them per symbol or daily or whatever, its quite flexible the output, shame the
app is windows only however, hence my need to handle this all via windoze....

the pytables/HDF5 sounds my favourite option, I think I'll set it up to use a
config file of sorts you can place in the loader folder to signify the columns
and they also output a rather handy info file that links the CSI GUID to each
symbol and has all the stuff like exchange, currency, text name, ticker symbol
etc.

So using a String for the SID will help, I might just make it use the ticker
symbol as that would be more user friendly but I'm trying to base things off of
CSI portfolios of stocks (these can be predefined like russel 3000 or nasdaq
1500 etc) as I want to momentum trade a universe not single stock pairs etc so
from what I can understand I have a bit of work to do or wait for some features
to be released downstream from quantopian.

Thanks for all your help, you guys are ultra helpful with stuff!

β€”
Reply to this email directly or view it on GitHub.

from zipline.

michaeljohnbennett avatar michaeljohnbennett commented on May 28, 2024

I haven't made the push to try it, will put it on the list of todo's once I
get the rest of the stuff working on windows, one step at a time!

regards

Michael Bennett

On 27 March 2014 13:53, Eddie Hebert [email protected] wrote:

I'm curious, since some applications work better than others with it,
but is it be possible to run CSI under WINE, http://www.winehq.org/ ?

  • Eddie

Michael [email protected] writes:

CSI files can be whatever format you want, thats good and bad of it, I
can make
them per symbol or daily or whatever, its quite flexible the output,
shame the
app is windows only however, hence my need to handle this all via
windoze....

the pytables/HDF5 sounds my favourite option, I think I'll set it up to
use a
config file of sorts you can place in the loader folder to signify the
columns
and they also output a rather handy info file that links the CSI GUID to
each
symbol and has all the stuff like exchange, currency, text name, ticker
symbol
etc.

So using a String for the SID will help, I might just make it use the
ticker
symbol as that would be more user friendly but I'm trying to base things
off of
CSI portfolios of stocks (these can be predefined like russel 3000 or
nasdaq
1500 etc) as I want to momentum trade a universe not single stock pairs
etc so
from what I can understand I have a bit of work to do or wait for some
features
to be released downstream from quantopian.

Thanks for all your help, you guys are ultra helpful with stuff!

β€”
Reply to this email directly or view it on GitHub.

β€”
Reply to this email directly or view it on GitHubhttps://github.com//issues/108#issuecomment-38804635
.

from zipline.

MichaelWS avatar MichaelWS commented on May 28, 2024

Michael, you should be able to do this as you intend. I wrote a little script that is in the utils for this called data_source_tables_gen.py. if you match the headers everything will work cleanly. Otherwise, we can put in an option to pass new headers.

@ehebert how would you want people to pass in columns for this?

Also, I use a lot of this type of stuff in virtual boxes and copy back to linux. It makes development much easier for me.

from zipline.

ehebert avatar ehebert commented on May 28, 2024

@MichaelWS one solution might be a parameter which is a dictionary that maps the headers to the expected headers, e.g. custom_header_mapper={'my-foo-price': 'price'}

Also, since the PR has pulled in going to close this ticket, and let's keep track of enhancements to the source in new tickets.

from zipline.

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.