Back to Community
Currency Hedged ETF strategy

A simple currency hedged ETF strategy.

Clone Algorithm
5
Loading...
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
import quantopian.algorithm as algo
import numpy as np

def initialize(context):
    context.JP = sid(14520)
    context.US = sid(46300)
    context.JPY = sid(33334)
    
    set_benchmark(context.JPY)
    
    algo.schedule_function(
        rebalance,
        algo.date_rules.every_day(),
        algo.time_rules.market_open())

    algo.schedule_function(
        record_vars,
        algo.date_rules.every_day(),
        algo.time_rules.market_close())

def rebalance(context, data):
    order_target_percent(context.JP, -2)
    order_target_percent(context.US, 2)
    order_target_percent(context.JPY, 2)

def record_vars(context, data):
    record(l=context.account.leverage)
There was a runtime error.