Back to Community
My best buy & hold linear combination portfolio

This is similar to all those structural arbitrage backtests, but it shorts Europe instead of going long treasuries. This has resulted in really good performance in the past 6 months an avoided the bond crash of 2013. No rebalancing required.

Clone Algorithm
97
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
def initialize(context):
    context.stocks = {
                      symbol('spy'): 65,
                      symbol('vgk'): -35,
                                            symbol('pjp'): 5
                      }

def handle_data(context, data):
    if context.portfolio.capital_used == 0:
        for stock, percent in context.stocks.items():
            log.info("ordering %d%% of %s" % (percent, stock.symbol))
            order_target_percent(stock, percent/100.)
There was a runtime error.