Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Introductions

Hello,

I'm new to Quantopian as of today and I'm excited to be working with this platform. I have a few basic questions for you veterans that will hopefully get me pointed in the right direction:

1) What does the benchmark (SPY) represent?

2) When running a backtest is there any way to add graph data to the backtest's algorithm graph? eg. a stock's performance (price) from a single stock

3) I was trying to answer these questions on my own but my research was fruitless for the first couple hours of searching. Is there a recommended spot to go to find this information on my own?

4) Any other helpful hints to help overcome the information curve of Quantopian is much appreciated.

Thanks

3 responses

Hi Jackson, welcome,

1) SPY is the ETF of the S&P500 index, basically tracking the US stock market. The aim is to outperform it.

2) the record() function can do this:

def initialize(context):  
    pass

def handle_data(context, data):  
    # record MSFT price and the 20-day moving average of AAPL.  
    record(msft_price=data[symbol('MSFT')].price, aapl_mavg=data[symbol('AAPL')].mavg(20))  

I adjusted the example above from the help docs

3) The help docs, post questions here, also youtube: Q stat arb and a whole tutorial series on youtube

4) Be friendly. Study maths. Question everything. Read SSRN for finance papers. Try a podcast for ideas. Try epchan's blog. Read some books and anything else you can get your hands on. Learn pandas.

I'm sure others will augment that list ;)

Happy hacking

Excellent start. Thanks James!

James shared a great list and I thought I'd add a few more. Here are other resources to learn about Python, Finance, and the Quantopian API. Ask questions and take a stab at the sample algos. If you get stuck, try searching the community for answers and inspiration!

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.