warren-oneill / powerline

Extension to the zipline library for the German EPEX and EEX energy markets
Other
7 stars 1 forks source link

Cannot make the first trade #60

Closed dhexus closed 8 years ago

dhexus commented 8 years ago

I set the value for 'volume' to some very high value so that every trade gets filled. We cannot assume same behaviour as for stock markets. At EEX, we have market makers for Phelix products that pledged themselves to give quotes. Please keep my fix until some kind of "always_fill" functionality is implemented or we can simulate market makers (is this already the case?).

      event = {
                'dt': pd.Timestamp(dt).tz_localize('UTC'),
                'sid': sid,
                'price': np.round(float(price), 2),
                # TODO switch back to int(volume) and code always_fill
                'volume': int(volume),
                'product': trad_prod}
dhexus commented 8 years ago

Note, setting volume to some high value if and only if the volume is zero is not a good fix, because, there could have been a trade where total trade volume is smaller than quoted volume by market makers. In this case we could have made a bigger trade. So please keep the volume fixed and high until we've implemented a more general approach. Let's discuss..