For those who might be interested, I wrote support for the NYMEX Future of CL (Light Sweet Crude). The NYMEX security expires 3 business days prior to the 25th, and if the 25th falls on a weekend, add more days. So it follows these rules.
It has one setting that is important, the VOLUME_CROSSOVER_BEFORE_EXP. This controls when the system will switch to the next months contract. Currently, for my test, this is set to 8 business days. I think this might be slightly too early to switch over, I'll need to collect some data before I'll know for sure. I have included the patch, as well as unit test in hg diff format. hg import <patchname> I am sending this out for review, and I'm collecting CL. I forget, was there a list of other securities people wanted? Let me know what the priorities are. NOTE: While writing this, I noticed something about contract switchover (in general) in jbooktrader. It only appears to happen when the strategy is created in the constructor. So, if my theory is correct, we may have a bug if someone kept their jbooktrader open for a long long time, across the futures crossover date. I have not confirmed this, but to be safe I'd recommend restarting jbook every day on securities that have expiration close in. I have opened issue #28 in our bug system to track this. Marcus -- You received this message because you are subscribed to the Google Groups "JBookTrader" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jbooktrader?hl=en.
CLsupport.patch
Description: Binary data
