Re: Please take a look at my ipynb...

154 views
Skip to first unread message
Message has been deleted

Thomas Wiecki

unread,
Aug 20, 2015, 8:56:51 AM8/20/15
to Joël Hubert, Zipline Python Opensource Backtester
Hi Joel,

This looks like a really cool algorithm. I took a look but couldn't quite resolve the issue. I did circumvent the problem you were hitting by changing:
            if not np.isnan(wts[i]):
                order_target_percent(sec, wts[i], None, None)

So I'd investigate why sometimes your optimization returns nan for a weight and whether you can ignore that. After that, however, I hit another problem:
UnsupportedOrderParameters: Passing non-Asset argument to 'order()' is not supported. Use 'sid()' or 'symbol()' methods to look up an Asset.

Not sure where this is triggered from. I'll try to investigate some more when I can.

Best,

Thomas

On Thu, Aug 20, 2015 at 10:11 AM, Joël Hubert <huber...@gmail.com> wrote:
See file. Whenever I run this with just one symbol the algo doesn't crash, but it doesn't say anything about successful simulations either, which is already suspicious.

If I run it with two or more symbols I get "ValueError: cannot convert float NaN to integer".

I'm having a hard time figuring out what's wrong. If anyone could take a look and help out I'd be immensely thankful. I'll pay you in bitcoin, no joke.

The algo uses optimization to calculate an efficient frontier. The algo runs normally in Quantopian's IDE, so I suspect it has something to do with data handling.

Cheers,

J.

--
You received this message because you are subscribed to the Google Groups "Zipline Python Opensource Backtester" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zipline+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joël Hubert

unread,
Aug 21, 2015, 12:06:48 AM8/21/15
to Zipline Python Opensource Backtester, huber...@gmail.com
Awesome Thomas, thanks for taking a look. I'll wrestle with it on my side.

Joël Hubert

unread,
Aug 21, 2015, 7:29:53 AM8/21/15
to Zipline Python Opensource Backtester, huber...@gmail.com
So with the nan exception it actually works properly on my side as far as I can see...  A little confused about your error...

Joël Hubert

unread,
Aug 23, 2015, 8:29:34 AM8/23/15
to Thomas Wiecki, zipline
Funny thing is, the error looks familiar, I've seen it before while coding. I'm running 0.7.0 - are you saying I shouldn't update if I want the thing to work? :) 

On Sun, Aug 23, 2015 at 7:04 pm, Thomas Wiecki <thomas...@gmail.com> wrote:

I bet this a bug that was introduced recently. Are you are up to date on master?

Thomas Wiecki

unread,
Aug 23, 2015, 8:34:44 AM8/23/15
to Joël Hubert, zipline, James Kirk
On Sun, Aug 23, 2015 at 2:29 PM, Joël Hubert <huber...@gmail.com> wrote:
Funny thing is, the error looks familiar, I've seen it before while coding. I'm running 0.7.0 - are you saying I shouldn't update if I want the thing to work? :)

Yes ;).

I wonder if the futures work has introduced a bug there, any ideas James K?
Reply all
Reply to author
Forward
0 new messages