Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Schedule biweekly not working.- Start and every 15 days

I am using the following schedule code however it is not rebalancing on the 1st day and 15. It is rebalancing the second when the dates are 2014-01-01 to 2014-12-31

2014-01-02  
2014-01-15  
2014-02-03  
2014-02-14  
2014-03-03

  schedule_function(rebalance,  
                      date_rule=date_rules.month_start(),  
                      time_rule=time_rules.market_open())

  schedule_function(rebalance,  
                      date_rule=date_rules.month_start(days_offset=10),  
                      time_rule=time_rules.market_open())
4 responses

For 2014, January, the 1st was not a trading day. the 2nd was the first trading day of the month. The 15th was the 10th trading day of January.

For February, 1st and 2nd was saturday/sunday, so the 3rd was first trading day. From this point, the 10th trading day was the 14th.

For March, same thing happened: 1st and 2nd was weekend, so 3rd was first trading day.

Looks okay to me?

Still it is doing something weird in other time frames like January 2011 look. Also I have noticed that sometimes it does the rebalancing on second or third date instead of the first day. It is driving me nuts! I think that Quantopian schedule function is not working properly

Our local time shown in transactions? For some, Sunday while US/Eastern Monday?

That's right, the transactions are shown in your local time zone (as determined by your computer settings)

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.