Wondering if someone could point me to an example of importing transactions into the Quantopian backtester? I have my own portfolio construction code that is running outside of Quantopian that can produce a CSV file with a list of buy/sell transactions. I would like to run my model portfolio through the backtester to see how it compares to my own performance measurements and take advantage of some of the other features.
I've tried importing the transactions as security data using fetch_csv but that seems to replicate the buy and sell transactions. For example the CSV file that I import looks like:
date, symbol, shares, action
1/6/2009, AAPL,100, buy
1/20/2009, AAPL, 100, sell
1/21/2009, C, 200, buy
...
When I import this into Quantopian, the buy in AAPL that occurs on 1/6/2009, is replicated on every trading day between 1/6/2009 and 1/19/2009. The sell is also replicated on every day between 1/20/2009 and the next day I trade AAPL again. I know this is happening because Quantopian is replicating the security data, but I'm wondering if there is some way of turning off this replication or perhaps a different framework for importing transactions.
Thanks