Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Why have a daily model if it cannot go Live

Why do we have a Daily Backtesting Model if it cannot go live.

I understand why the Daily backtesting model as implemented now cannot go live.

But I do understand there is some canned ways to make a Minute Model work in a Daily Model.

If so, why not change the default Daily Model to follow one of these canned ways of making Minute model work as a daily model.

As of now, I can develop and test on a daily model all I want, but I cant go live. And Once I modify it to act like a daily model with minute data, the back test numbers are different while running into other issues as well during the transition.

Can we have as default a Daily model, that uses minute data in some consistent daily way as the default.

Sarvi

3 responses

Daily mode gives you a quick rough estimate of whether or not your trading idea is adequate to research further. In the real world you have to chose what time of day to do a trade. Minute mode provides a reasonable time resolution to execute trades on fresh data. I suppose Quantopian could chose what time of day for you but why would want them to? The code below converts minute mode to daily.

if get_datetime().hour != 14 and get_datetime().minute != 31:  
        # Run only @ 9:31 AM to execute order (time zone UTC)  

Why can't we have a Live tradeable quick rough estimate of your idea? :-)

I am just wondering what we would lose by having the daily model, that uses minute data at a specific well defined time like you have above.
It doesnt have to be slow, can be of the same speed as the current daily model if done right behind the scenes.

Sarvi

This code snippet:

if get_datetime().hour != 14 and get_datetime().minute != 31:  
    # Run only @ 9:31 AM to execute order (time zone UTC)

gets the basic idea, but just to be entirely clear, it's not perfect. In particular, it doesn't account for Daylight Saving Time, and it doesn't account for the fact that depending on how liquid your stocks are, you may not get an event at exactly 9:31am every day.

You could do something like this instead:

def initialize(context):  
    context.today = None

def handle_data(context, data):  
    if get_datetime().date() == context.today:  
        return  
    context.today = get_datetime().date()  
    # Do your algo logic here.  
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.