Skip to content

Instantly share code, notes, and snippets.

@techwithshadab
Created November 3, 2021 20:49
Show Gist options
  • Save techwithshadab/1bc6e8507358d688c637f27b723eec0c to your computer and use it in GitHub Desktop.
Save techwithshadab/1bc6e8507358d688c637f27b723eec0c to your computer and use it in GitHub Desktop.
# List of stocks
stock_list = ['FB.O', 'AAPL.O', 'AMZN.O', 'NFLX.O', 'GOOGL.O']
# Start Date
start_date = datetime.datetime(2019,6,10)
# End Date
end_date = datetime.datetime(2021,10,20)
# Set number of equities to the number of stocks
num_assets = len(stock_list)
# Set the risk factor
risk_factor = 0.7
# Set budget
budget = 2
# Scaling of budget penalty term will be dependant on the number of assets
penalty = num_assets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment