Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Custom Optimization Target Weights

Hi,

I am new to python and would appreciate your help.

I have the following for a subset of assets:

  1. data.history(context.assets,'price',hist_window, '1d')

  2. {'asset': initial_target_weight}

I would like to do a custom optimization for target weights such that

objective = maximize ∑ log |optimized_target_weight|

constraints = stdev (portfolio) < target_stdev & dollar neutral

Any suggestions on how best to implement this?

Thanks!