Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
"Waiting for logs...." forever in Live Trading - same problem for Quantopian live and IB paper trading

Is it a bug?
I can't get any logs if I click 'Logs' tab in any live trading algorithm.
Is there any other way to debug issues?

I have found that my strategy don't open any trades in live trading and I can't figure out why.
My strategy has time constrains to make a trade around market open (several minutes only allowed while market has lots of liquidity) and maybe this is the problem. Any ideas would be helpful. I also use my own slippage model but in live it should not matter - may be cause some errors? Do I have to delete it?

I also created simple strategy which just opens a trade and I have noticed that it had orders with status Open (not yet Filled) and have shown time 7.20 instead of 7.35 (it was current time). I am doubtful that there were no trades for 15 minutes at morning hours for AAPL... Is there some time delay in live trading? Should I fix it somehow?

Also status 'Open' for buying AAPL were in the UI for a while before it changes to Filled. If I place the same order in IB paper trading via there TWS UI - it is filled immediately. I guess that Quantopian Live engine uses the same 1 minute delay (execution at next minute's bar) as in backtesting but would be nice to confirm that.

Sorry for so many 'issues' in one post - I thought it is better then creating several posts.

3 responses

Hi Ilya,

Could you give me permission to look at the algo and your logs setup? If so, could you email the name of the algo to [email protected]? Then we can take a look and debug. The algos I have running (with IB and Quantopian paper trading) are receiving logs, so I'm wondering if the issue lies in the setup logic. We'll get to the bottom of it!

To answer your other questions:

I have found that my strategy don't open any trades in live trading and I can't figure out why.

It sounds like the signal wasn't reached, or the code wasn't triggered. We can help debug the algo code!

I also use my own slippage model but in live it should not matter - may be cause some errors? Do I have to delete it?

In IB trading, the slippage model is ignored and the current market conditions take over. In Quantopian paper trading, your slippage model is active. In both scenarios, you don't have to delete it, the code is handled gracefully. The same is also true for the algo commission settings.

I am doubtful that there were no trades for 15 minutes at morning hours for AAPL... Is there some time delay in live trading?

It sounds like you're running this algo using Quantopian paper trading? If so, that data is free because it's 15 minutes delayed. So the algo will run from 9:45AM -4:15PM.

status 'Open' for buying AAPL were in the UI for a while before it changes to Filled

In live trading if an order is submitted at 9:31AM, it's sent immediately to IB. The broker fills it within seconds, depending on the security's liquidity. The filled status (in the UI) is updated in your dashboard in the next minute, at 9:32AM. So the fill happens immediately, and the data is refreshed in the next minute in the dashboard.

Hope this helps and let me know if you have other questions. If you need help debugging the algo code, shoot us an email.

Cheers,
Alisa

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.

Thanks Alisa for clarifications!
I think the problem with 'Waiting for logs' can be because of data delay.
So my strategy just doesn't generate any logs because of data delay maybe and this is why it shows this 'Waiting for logs' message forever.
I have found that my IB paper account has data delayed as well as Quantopian live (as you explained). I am going to turn on IB data and test again.

I am wondering - Quantopian Context has the same 15 minutes data delay? How are the results fair then?

To clarify, IB data isn't delayed - all IB accounts (paper and real money) get data from 9:30AM-4PM.

If people don't have access to an IB account (financial hurdles, use other brokers, international restrictions etc), we still want to provide a way for them to simulate their strategy in the current market. Because of this, we created Quantopian paper trading. To give everyone access to the current market, and move beyond the historical world of the backtester.

Data is free from the exchanges after 15 minutes, so the algos trade at 9:45AM-4:15PM. This means the algo "wakes up" at 9:45AM and thinks it is 9:30AM, receives the first bar of data, and starts trading. So the data is the same, it's simply a simulated environment.

The contest is the gateway to be considered for the hedge fund. When we announced the fund last Fall, we were going to select algos from those live trading with real money on the platform. We saw millions of dollars live traded through the platform and we reasoned people who were live trading have done the risk analysis for their algo. As we developed the idea, we realized not everyone has access to capital, and not everyone can trade with IB. So we created the contest, to give everyone a fair chance to be selected for the fund. If you can write a top algorithm based on the criteria, you should be able to profit from your idea. Regardless of your location, background, and experience. Our goal is to make algorithmic trading (the data, tools, and capital) available to everyone.

Any algorithm entered in the contest will be considered for the hedge fund. Your algo can be ranked #1, 5, or 35. A winning algo (#1) doesn't guarantee you will be selected for the fund. If your algo is selected, we will reach out to you and begin to work with you 1-1. The longer it's live trading the better; it should have at least 6 months of out of sample (paper trading) data.