Back to Posts
Listen to Thread

For UC Berkeley's Quant Decal

Clone Algorithm
17
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.

The Implementation is not done the way it works in the Excel spreadsheet.

Transactions List1 - 15 of 15 PreviousNext
DATE SECURITY TRANSACTION # SHARES PRICE $ AMOUNT
2008-10-19 17:00:00 AAPL BUY 100 $98.43 $9,843.00
2008-10-20 17:00:00 AAPL BUY 100 $91.40 $9,140.00
2008-10-22 17:00:00 AAPL BUY 100 $98.25 $9,825.00
2008-12-08 16:00:00 AAPL BUY 100 $100.08 $10,008.00
2008-12-11 16:00:00 AAPL BUY 100 $98.40 $9,840.00
2009-11-22 16:00:00 AAPL BUY 100 $205.90 $20,590.00
2009-12-02 16:00:00 AAPL BUY 100 $196.53 $19,653.00
2010-02-03 16:00:00 AAPL BUY 100 $192.03 $19,203.00
2011-11-09 16:00:00 AAPL BUY 100 $385.24 $38,524.00
2012-03-15 17:00:00 AAPL BUY 100 $585.60 $58,560.00
2012-03-22 17:00:00 AAPL BUY 100 $596.23 $59,623.00
2012-09-20 17:00:00 AAPL BUY 100 $700.73 $70,073.00
2012-10-31 17:00:00 AAPL BUY 100 $596.55 $59,655.00
2012-11-01 17:00:00 AAPL BUY 100 $576.97 $57,697.00
2013-01-21 16:00:00 AAPL BUY 100 $504.74 $50,474.00

There are only buy orders, when there should be both buy and sell orders.

Idea is to buy at close price, and sell at open next day - if going long.

Or vice versa, sell at close price and buy back again at open next day - if going short.

So no position should be more than one day.

I cloned the code, to try it on Google - but it seems like it still buys Apple
www.quantopian.com/posts/round-numbers-strategy-google-or-is-still-apple
... Weird.

Clone Algorithm
14
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.

Lars, to change the stock, you have to change the sid, not just the variable name.

context.goog=sid(24) should be

 context.goog=sid(26578)  

When you retype that you'll see the autocomplete that appears. We don't ask you to memorize all the sids ;)

I think there's an error with the algorithm, it only ever meets the conditions to sell.

Clone Algorithm
29
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.

Strategy seems to work better on Google - even though it only buys and never sells :)

Clone Algorithm
14
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.

According to google finance, if you were to buy google long across the same span from 2008 to 2013, the returns would only be 11%, therefore this alg def seems to atleast make for a better long!,

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