Back to Posts
Listen to Thread

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
78
Loading...
Backtest from to with initial capital ( data)
Cumulative performance:
Algorithm Benchmark
Custom data:
Week
Month
All
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Information Ratio
--
Benchmark Returns
--
Volatility
--
Max Drawdown
--
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
Information Ratio 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
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.

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.

Log in to reply to this thread.
Not a member? Sign up!