Already comfortable in notebooks? That's impressive.
I'd go this route ...
Click to clone someone's algorithm.
Click a line number in the margin next to a line with code in it, such as inside before_trading_start().
By the way the 'Build Algorithm' button does an automatic save before running the code.
In this mode it will take a little longer to begin.
When it breaks in, a console window will appear.
You can click the down arrow to step through the code a line at a time for example.
Type (or copy/paste) variables at that prompt to see their contents.
One little refined point to know: If a particular variable contains too much content, it will currently just crash.
For example, the results here in context.out could be large:
def before_trading_start(context, data):
context.out = pipeline_output('pipe')
Since context.out
is a pandas dataframe (part of the magic around these parts), you can view just a bit of it with, for instance:
context.out.head() ...or
context.out.head(10)
Next point:
Set the date range to just a few days, then start making some changes and run to see what happens.
Rather than being worried about breaking something, a great part of learning is in observing where boundaries are, so feel free to even make deliberate errors to find out what it will do. If smoke starts coming out of your machine there's an award for that but no one has been able to collect. :)
Naturally this forum is a great resource (and stackoverflow sometimes), it's just a matter of being able to find what you need.
There's a built-in search but the method I use most often is a search like the following. Suppose one wants to read up on the use of fundamentals in pipeline. Notice the use of 'site' here. That way all of the results are on quantopian.com.
https://www.google.com/search?q=pipeline+fundamentals+site:quantopian.com
Would love to know if any particular part of that turns out to be especially useful.