Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Short a list of companies with financial difficulties

Hello Quantopian!

I'm trying to run a simple backtest strategy (not so simple for me unfortunately) but I'm facing some problems. I use an algo found in another topic.
So basically I want to short companies with financial difficulties, for my master thesis.
I just need to enter the SID of the companies I want to short. Then say that I open a short position on a certain date and hold the position for the remaining time period. These are companies that were listed on the NASDAQ and delisted to the OTC market, does Quantopian support such a transition ?
For example I want to short all COCO CRMB and KIOR on the 07/01/14 and hold the position as long as possible. Maybe I will try to add a stop loss if the stock goes up to much

def initialize(context):
context.stock = symbol('COCO'), symbol('CRMB'), symbol('KIOR')

def handle_data(context, data):
order_target_value(19773,0)

Sorry I'm very new and don't know anything about Python but I would really love to be able to obtain the simulation for my thesis. Do you know what's wrong in my code ?

Thank you for your help