Back to Community
"Papertrading" for Coursera Computational Finance Homework

The first homework for https://class.coursera.org/compinvesting1-2012-001/ involves using hindsight to pick 4 equities from that performed well and calculate performance metrics, e.g. the Sharpe ratio, if the student had allocated a percent of their portfolio to each of those stocks.

The next step is to use something that can be a proxy for actual paper trading, like Yahoo or Google Finance.

This is an example of how to use Quantopian to do the paper trading exercise.

I calculate how many shares to order based on the initial price and what percentage we want to allocate to the equity.

After the initial buys, the algorithm does nothing but waits to see the returns!

Clone Algorithm
96
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 509710cbea53f226d207009d
This backtest was created using an older version of the backtester. Please re-run this backtest to see results using the latest backtester. Learn more about the recent changes.
There was a runtime error.
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.

3 responses

it was interesting, Eddie. Knowing the right SID is the key :)

Just realized that I have a misspelling in the title... it should read "Coursera Computational Finance Homework".
I was rushing to share, and didn't notice the transposition.

Tim, yes that is one hurdle. Though, have you checked out the UI's autocomplete when entering the current stock symbol inside of sid()?
That helped me figure them out pretty quickly.

However, that isn't perfect, yet.
For example, with my algorithm there CMG (Chipotle) appeared as multiple sids, and it took some test runs to figure out which was the right one.