Back to Community
Tab Complete Now Available In Backtest IDE

Today, we’re releasing a long requested feature that should make the IDE experience more productive. Tab complete is now available in the IDE, and works similarly to tab completion on the research platform. It can help you discover new APIs, or spend less time typing.

How it works

If you’re new to tab completion, it's pretty simple. In the middle of typing out a word, press Tab, and one of two things will happen:

  • If there’s only one possible suggestion, such as imp completing to import, then pressing Tab will complete the word for you.
  • If there are multiple possible suggestions, like Fundamentals.ma which could complete to Fundamentals.market_cap, Fundamentals.marketing_expenses or many more, then pressing Tab will bring up a list of options. When you choose an option from the list, the word will be completed for you

Suggestions will also come up when you press period. For example, quantopian. (note the period at the end) will bring up a list of suggestions.

Here’s an example of it in action:

Tab complete is a powerful way to discover new fields in a dataset, like in the example above, or even new datasets altogether. Try hitting Tab after from quantopian.pipeline.data import to see all the options that come up!

Tab complete also works with non-quantopian modules. Here’s an example of tab-completion with pandas:

For existing IDE users, there’s one change to be aware of. Special-case completions for functions like set_commission and set_slippage have been removed, and those functions now use the same, unified tab complete experience. However, the sid( autocomplete remains, and typing sid( will still allow you to search for sids by ticker, number, or entity name.

How do I use it?

UPDATE: Tab complete is now enabled by default. You can still toggle it back and forth via the settings menu, as described below.

You can enable tab complete by going to the settings menu on the top right of the IDE, and clicking ‘Use Tab Complete’. If you’d like to switch it off, you can go back to the settings menu and uncheck the tab complete option.

Tab complete is still experimental, so all feedback is welcome! I'd also like to add a special thank you to Freddie Vargus for building this feature during his internship at Quantopian.

Happy coding,
Abhi

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.

14 responses

Thank you team Quantopian! This is one of my favourite features in the Notebooks and love that it's in the IDE now too.

Abhijeet, these are very useful enhancements. I have a request. Many a time we fix the time period and run multiple back tests within that period, so if the platform remembers the setting of most recent backtest start_date, end_date (and use that for default setting of new algorithms ) it will help us not reenter it every time. Thanks.

I'd prefer to have support for alternative editors and git integration https://www.quantopian.com/posts/alternative-editor#57b7324576a626d394000a1e

Could we add a feature to see diffs between code versions of multiple backtests of an algorithm. Also ability to save some notes on what changes went into a backtest would be helpful as well (for a quick review in the "all backtests" page). Having to save things elsewhere (outside Q) and maintain cross platform reference is quite tedious.

Leo, the good news is that you can see diffs between code versions. On the "all backtests" page of your algorithm, select two backtests, and the "compare" button will become active.

The request for an ability to record more meta-data about your backtests is a good one.

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.

Very very useful feature!

@Leo: Backtest metadata is definitely on our list to get to. Can you give me a sense of how detailed your backtest notes tend to be? (Are they one or two sentences, multiple paragraphs, etc)

@Abhijeet.

It will be nice to provide a text box in the algorithms page where we can type in a sentence into the text box before clicking the "Rull Full Backtest" button. And then when we are in the "All backtests" page if that metadata/sentence can be shown in a new column in the backtest row that would be great.

There are times when I noticed something interesting after the backtest completes and immeddiate wanted to update the metadata for that backtest, so an editable option that is accessible from the backtest result page will be helpful.

As to the total length of the metadata, 1-3 sentences is what I would update it with personally.

This feature is most helpful when you run multiple backtests after changing some logic in the algorithm. Ability to associate a backtest result with some user metadata provides a quick recall in the mind as to what variation we tried without having to scan the algorithm.

Ability to specify one sentence before kicking off the backtest and to see that in the backest results page and the "All backtests" page will be the most useful imho.

Editability of metadata will be useful but lower priority in my mind, definitely a plus though.

This feature is great. I've been waitting for long time.

I have a few more suggestions for the "All backtests page.

1) Show more information (like sharpe, mdd etc.) about the backtest besides just returns. Maybe all the information if they canfit into the space

6 Nov 14 2017, 6:20 PM Oct 01 2003 - Jul 01 2017 105.49%,1.22,-6% Completed

2) Provide the link to the backtest code in the "all backtests page" as well.

6 Nov 14 2017, 6:20 PM Oct 01 2003 - Jul 01 2017 105.49%,1.22,-6% Completed "Button that is there in the backtest page to view code"

Thanks.

Following some very useful feedback during the experimental phase, we've now made tab complete on by default, instead of opt-in (the toggle functionality still works). We've made some usability improvements to tab complete based on the feedback we've gotten, including:

  • Tab complete doesn't erroneously show up while typing out an integer literal
  • Tab complete doesn't erroneously show up while defining a function

Thanks to everyone for the feedback, and happy tabbing!

Seems this feature is not yet by Notebook?

Awesomeness, thank you!!