Feel free to comment.
Feel free to comment.
Some questions
1) What universe is it using? (curious if it's using thinly-traded stocks)
2) What slippage and commissions is it using? (curious if it would hold up with 5bps transaction costs)
3) I'm going to guess, based on the risk exposures, that it's a mean reversion algo of some type. Roughly right?
4) Did you just write this, or is there some out-of-sample performance?
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.
Expanding on my question #4:
For an algo like this, I would only run my backtest up until 2015, and I'd hold the last two years as out-of-sample. Only when I'm sure that I'm "done" would I verify the algo against 2016 data, and I'd try to hold 2017 data back in case I want one more try at making it work.
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.
Hi Dan,
1) It is using QTradableStocksUS with min price > 10
2) It uses default slippage and commissions. Is that now 5 bps?
3) Yes. mean reversion using copula models.
4) Just wrote this for contest. I will follow your approach of backtesting until 2015 going forward.
https://www.quantopian.com/posts/changes-coming-to-the-default-slippage-model
I’ve been using the new slippage model explicitly; last I checked the default had not been changed.
Thanks for the answers.
The short-term reversal exposure is an interesting question, and it doesn't have a straightforward answer. If it is possible for you to revise your investment thesis, and then revise your code, in such a way that removes the reversion exposure, that would be best. But it's not always possible - your algorithm's good qualities may be bound up inside the reversion style factor. If so, then it becomes a question of your (and our) risk budget. We don't want a large exposure to short-term reversion style factor. That's not something we can diversify away - if we add other algorithms with short-term reversion exposure, that is additive. So we have to be very judicious about which/how many/how much short-term reversion exposure we take on, overall.
Stating the obvious, we love algorithms that have no exposures because they don't cost anything from our risk budget. In the real world, things are messier, and everything has some exposure or another. It's a challenge of making improvements where we can.
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.
Following Karl's, Grant's and Dan's comments here is a revised backtest that applies 5% fixed slippage and is developed until 2015 and tested on 2016 and 2017. This is my contest entry. Unfortunately the exposure to short term reversal is still high.
Hey,
Thanks for sharing. When you say Copula based do you mean something like https://community.wolfram.com/groups/-/m/t/1111149 ? Do you find pairs that you can fit a joint distribution and trade based on low and high probability price events for each pair?
Just for yucks you should be able to completely nullify the
short_term_reversal
by subtracting out the 14-day RSI from your alpha factor (or, as Karl suggests, lowing the limit used by the Optimize API). In any case, it might not be the best approach for the contest, since the judging is done solely on the basis of volatility-normalized total return (I think); there is no penalty for high risk-factor concentrations, so long as they don't exceed the contest limits. As Dan points out, the situation is different for a fund allocation, where isolating specific returns will be key.
One question in my mind is if the Optimize API will crash if it can't meet the risk-factor constraints, or if it is simply doing the best it can (e.g. doing a regression and subtracting what it can and then proceeding with the optimization with hard constraints)?
@Pravin, your returns seem to have jumped from 3.8% per year from your initial post to 10.1% per year after your applying fixed basis point slippage. I would recommend checking if you applied it correctly. The fixed basis point slippage is supposedly more expensive than the earlier default volume share slippage model, so if anything you should expect to see atleast some degradation in alpha (if not a lot) from it. set_slippage(slippage.FixedBasisPointsSlippage()) is what I believe the change required for fixed basis point slippage.