So I'm working on a simple annual rebalance strategy and have been running into odd issues with fetch_csv, data.can_trade and orders failing to fill.
As it relates to fetch_csv, I've encountered an issue where for a few random names, instead of fetching the correct value, it simply returns nan. I'll include a link to my CSV below, but as you will see, as of 4/30/14, the algorithm should be able to see all the values in the CSV, and for A, should return 0.03303348 when called through data.current(sid(24757),'ROA'). However, instead it simply returns nan. Has anyone encountered an issue like this before, or have any idea what might be causing this?
https://docs.google.com/spreadsheets/d/14OirozvJ33x2ygCvPaJ6KnsGjF7JL3CWJic75fChbxs/edit?usp=sharing
As it relates to data.can_trade, I was under the impression that the method should return True as long as the security is alive and has traded at least once before. However, I've also seen instances where one day it will return True, the next day False, and the following day True again. Any idea what would cause this?
The final issue I have encountered is with orders failing to fill by the end of the day. Maybe I'm missing something obvious here, but if a security passes the can_trade test, and I place a market order in a zero slippage environment, is there any reason why the order would fail to fill?
Apologies for the slew of questions, I've just been running into these random odd issues which are making what I feel like should be a very simple algorithm into a continuing headache. I really appreciate any input and help! Thanks!