Hi,
I want to short SDD but got this message in log. Does this mean at this day the SDD can not be short?
Hi,
I want to short SDD but got this message in log. Does this mean at this day the SDD can not be short?
I am not sure if your database has problem with the paper 'SDD'. I wrote a simple code which just buy and sell 'SDD' everyday and I got everyday erros.
Hi Thomas,
The error you are experiencing likely has to do with the fact that SDD is a very thinly traded security (i.e. low average daily volume). In fact, it looks like some days the security did not even trade. By default in the IDE, you cannot trade more than 10% of the volume on any given bar. You can change the volume limit using the set_slippage
method. For example, to change the limit to 40%:
set_slippage(slippage.FixedBasisPointsSlippage(basis_points=5, volume_limit=0.4))
See the "Slippage Models" section of the Quantopian API documentation for more information.
Hi Thomas, Michael is correct. By default, our backtesting tools only buy or sell 2.5% (not 10%) of the shares that were traded during a given time period.
For example, let's say you want to buy 1,000 shares of company X, but the trading volume for company X is only 400 shares per day. 2.5% of 400 is 10, which means the backtester will only buy 10 shares per day, until it reaches 1,000. In this example, it would take 100 days for your original order to fill!
In this case, it looks like SDD is a relatively illiquid asset, and even had some days where it didn't trade at all. That is why the algorithm is behaving that way.
This is exactly why our built in trading universe, QTradableStocksUS, filters out stocks that are illiquid (don't trade frequently). As such, this particular asset has never passed the QTradableStocksUS() filter, and wouldn't affect contest algorithms.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.