I've successfully loaded external data using fetcher. I can plot the custom securities data. But, I can't place an order (in the backtest) using the custom security.
I've read a few other posts on the subject, and read the API docs, but to no avail. Has anyone found a way to load data for a custom security and trade the custom security in a backtest?
Here's the error I'm getting from Quantopian. It seems like the Quantopian API is looking for a field that's not there. I'm wondering if I could just add a field with the correct name??
The error:
Cannot order UWT on 2016-12-12 20:30:00+00:00 as there is no last price for the security. Try using data.can_trade to check whether an asset is delisted.
There was a runtime error on line 23.
Here's an except of the custom securities data:
date,symbol,price,close,high,low,open,volume
12-08-2016,UWT,25.98,25.98,25.98,25.98,25.98,0
12-09-2016,UWT,25.98,25.98,26.12,25.56,26.02,265900
12-12-2016,UWT,27.22,27.22,29.49,26.96,29.27,1957200
12-13-2016,UWT,27.96,27.96,28.573,27.2,28.5,1281200
As you can see, I'm trying to back test trades of UWT. UWT is a US based security, but the trade data isn't yet available in Quantopian. I'm trying to work around the issue by loading the data up myself.