USE AT YOUR OWN RISK.
I added leverage and a stoploss, cleaned up the code, and tuned it some more.
QUANTCONNECT COMMUNITY
USE AT YOUR OWN RISK.
I added leverage and a stoploss, cleaned up the code, and tuned it some more.
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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Eli torrence
Warren Harding
Hi Eli. You can email me with the specification at warrencharding@yahoo.com. I'ld be glad to write your algo for you. I only charge $30/hour.
Warren Harding
Here's a trick I came up with that you can use to help verify that your multiple ticker algos are statistically robust. Clearly a backtest with more trades is more statistically robust on a general basis. You can get lucky on a few trades, but if thousands of trades are put through you should be able to verify profit or loss with some accuracy. The backtest above shows only 181 trades, which seems a bit on the low side. The backtest below is the same algo with only the start cash changed to 100 million. The result is that 2357 trades occur. That should be enough to get a more accurate picture of whether the algo is profitable.
Obviously it's pointless to look at most of the profit related statistics with the backtest below given that amount of start cash. Much of the cash will be sitting on the sidelines as the market simply can't absorb it all due to dollar volume related restrictions, leading to much lower profit percentages. The total profit, $9,504,245, is a figure of interest.
Stefan
Have you traded it live yet?
Warren Harding
No, I haven't traded it live yet.
Stefan
It look quite promising. I was running it on IB paper account but unfortunately ran out of memory.
Warren Harding
Yes, running it on paper first is probably a good idea. I've ran the same algo, and variants of it with other ticker lists and it seems to profit with them on a general basis as well, so hopefully there are no significant survivorship bias problems with the S&P 500 list I've provided.
Mark E. Twiz
Conceptually, what is the trade logic?
Warren Harding
The trade logic is basically just mean reversion with short term strength. A plain vanilla mean reversion algo will buy stocks that are falling through the floor, this algo waits until they stop falling before opening a position. So to open a position a stock should not be falling and should be a ways below it's moving average. Selling is much the same, if the stock is a ways above it's moving average and has stopped rising, then sell. Those are the types of trades the algo looks for in concept. There's a real basic stoploss that just sells if the stock falls too far below the buy price. This line:
orderby stockData.AverageMinusCloseRatio * stockData.RSI descending
...is the most interesting IMHO. It ranks the stocks by multiplying the distance below the moving average by the short term strength. So stocks that have fallen the furthest below their moving average and are coming the fastest get prioritized with regards to opening a position.
Warren Harding
That last sentence should read: So stocks that have fallen the furthest below their moving average and are coming back the fastest get prioritized with regards to opening a position.
Please add an edit post feature if you get the time.
Mark E. Twiz
This seems to be an ideal model to replace the function which RSI serves with a "DeMark Sequential Countdown", designed specifically for mean reversion after a cascade sell off/parabolic rally reversal is "triggered and confirmed" to prevent getting destroyed by falling knives.
Warren Harding
I've come up with a Reversion 2.0.0 that has a decreased risk of survivorship bias and an increased Compounding Annual Return. I'm not sure I want to give it away for free though...
Mark E. Twiz
You shouldn't
JayJayD
Sell the signals!
Michael Manus
Hmm sounds interesting. tell me/us more about that. did you implement your strategy there and are people investing in it? any experience? thx
JayJayD
I didn't used yet.
As far as I understand, you connect your broker account (or use their API) to send the signals to the Collective portal, and the subscribed members to your strategy will receive the updates as soon as your strategy sends a new order.
Of course, publishing a strategy isn’t free.
Warren Harding
Hi guys. I've come up with a volatility strategy that seems vastly superior to the free one here, but I'm not giving it away for free. I'll be concentrating on that for a while.
Johan Bjerke
I'm getting an error when building this one.
Has something change in the environment that prevents this from building?
Build Error: File: Main.cs Line:286 Column:38 - 'Algo.CustomFeeModel' does not implement interface member 'IFeeModel.GetOrderFee(OrderFeeParameters)'
Link Liang
Hi Johan,
We have a slightly different IFeeModel from what we had back in 2017. Here is the implementation of the new IFeeModel and it will allow you build and run this old algorithm. Notice that the result might not be the same since we had fixed some issues with Universe Selection.
public class CustomFeeModel : IFeeModel { public OrderFee GetOrderFee(OrderFeeParameters parameters){ return new OrderFee(new CashAmount(1,"USD")); } }
Hope it helps!
TomasG
 Console 13
 C#  Â
1 | 15:08:32:
Welcome to QuantConnect Algorithm Development Terminal.
2 | 15:08:34:
C# autocomplete loaded.
3 | 15:08:34:
Build Error: File: Main.cs Line:289 Column:38 - 'Algo.CustomFeeModel' does not implement interface member 'IFeeModel.GetOrderFee(OrderFeeParameters)'
4 | 15:08:48:
Building Project ID: 2623957 Content Signature: 93aaff7feeaa73e2a14b63396a8b0a9d
5 | 15:08:49:
Build Error: File: Main.cs Line:289 Column:38 - 'Algo.CustomFeeModel' does not implement interface member 'IFeeModel.GetOrderFee(OrderFeeParameters)'
6 | 15:08:51:
Building Project ID: 2623957 Content Signature: 93aaff7feeaa73e2a14b63396a8b0a9d
7 | 15:08:52:
Build Error: File: Main.cs Line:289 Column:38 - 'Algo.CustomFeeModel' does not implement interface member 'IFeeModel.GetOrderFee(OrderFeeParameters)'
8 | 15:08:54:
Building Project ID: 2623957 Content Signature: d41d8cd98f00b204e9800998ecf8427e
9 | 15:09:09:
C# autocomplete loaded.
10 | 15:09:09:
Build Error: File: Main.cs Line:289 Column:38 - 'Algo.CustomFeeModel' does not implement interface member 'IFeeModel.GetOrderFee(OrderFeeParameters)'
11 | 15:09:22:
Building Project ID: 2623957 Content Signature: 93aaff7feeaa73e2a14b63396a8b0a9d
12 | 15:09:23:
Build Error: File: Main.cs Line:289 Column:38 - 'Algo.CustomFeeModel' does not implement interface member 'IFeeModel.GetOrderFee(OrderFeeParameters)'
13 | 15:09:53:
Building Project ID: 2623957 Content Signature: d41d8cd98f00b204e9800998ecf8427e
Warren Harding
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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!