Hi all,

New user here from Quantipian. I was wnating to load 8 different securities as part of my portfolio.

Over at Quantopian, I am used to doing the following.

def initialize(context):
set_symbol_lookup_date('2015-01-01')
context.equities = symbols(
# Equity
'VV', # US large cap
'VO', # US mid cap
'VB', # US small cap
)
context.fixedincome = symbols(
# Fixed income
'TLT', # Long-term government bond
'IEF', # Mid-term government bond
'LQD', # Corporate bond
)
context.realasset = symbols(
# Commodity and REIT
'GLD', # Gold
'VNQ', # US REIT
)
context.securities = context.equities + context.fixedincome + context.realasset

context.period = 252 # One year to evaluate past performance
context.lever = 2.0 # Leverage
context.allocation_intervals = 10 # Allocation intervals (100% / 10 = 10% increment)
context.weights = dict.fromkeys(context.securities, 0)
context.shares = dict.fromkeys(context.securities, 0)

Is there no one function that lets me load all 8 ETFs? Additionally, I am wanting to set the leverage level for the portfolio at 2x. Is there something in QuantConnect that is similar to the "context.level = 2.0" line from Quantopian?

 

Thank you in advance :)