Back

Why do strategies work some days and not others?

I've been working on some strategies that I constantly see perform spectacular some days and horrible other days. Over fitting aside, what would cause a strategy 1) functioning outside of it's optimization construct, and 2) that makes frequent long and short trades to: win 90% of the time 100 trades in a row and then lose 90% of the time the next 100 trades. Is there a name for this phenomenon that I could further research?

Also, this might be related, but I'm fostering a strategy that over a period of 90 days @ Minute resolution that makes on average of 30 trades per day, to flat line (consistency breaking even +/- $1k per day) for the first 45 days, then explode during the last 45 days ending with an ending balance 3x the initial balance.

I've been trying to make correlations with some indicators (RSI, MACD, ATR, MA) with varying configurations and just can't seem to put a finger on it.
Update Backtest








I think it's just that your configurations fit better some days than others. If a stock is moving up and down by 1% intraday for a month it's going to trigger your indicators a lot differently than on a month when it's moving .5% intraday. I suspect the key is volatility, I've been attempting to link VIX data to my indicators but haven't had much luck yet.
0

What are the dates/periods you're talking about?
0

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.


@Levi I feel you frustration. I have had the same experiences. A valued colleague of mine says that you need to know exactly WHY your works or does not work before you put any money into it. There are a couple of things I have done:

* Get some logs. While log space is limited in QC back test, that is not the case when running Lean on your machine. So I added a CustomLogHandler class to my local Lean.

I have attached a project to demonstrate this technique. Read the top of Main.cs for instructions.

An alternative is to add a List to your algorithm and write it to disk in the OnEndOfAlgorithm event handler. Once again you cannot use this technique on the back test or live platform.

This technique will give you a csv file which you can chart to see the action between your

* Get some back test data you can run on your local machine. I wrote a GoogleFinance downloader that gets Resolution.Minute data on about 6000 stocks, ETFs and the like. S&P 500, Russell 2000, NYSE and AMEX lists. There is also one in the QuantConnect.Toolbox project.

* Walk forward. After I made sure that I have a good profitable back test, I walked it forward with a paper trading or demo account. Then I ran a low risk trial live trading and started to work out the kinks in execution.

I found that with my algorithm, which is trend following 1 minute algorithm, it works better on volatile days when there are good 1 minute trends. So my next challenge is to find a way to make it work in a mean reversion environment and what the good signals are there.

If I can help drop me an email. nicholasstein@cox.net

Nick
0


@Levitikon

As said before you need to know the EXACT intuition behind your strategy. Once you know that, you can try to construct a second indicator which will make sure that your first indicator only trades when the conditions are best. Of course, this is much easier said than done.

Example of such a 'second' indicator is the Empirical Mode Decomposition that I shared earlier. But I'm not a big fan of that one as it doesn't work that well. In any case, it gives an idea of how a secondary indicator works.

A more popular secondary indicator is the VIX index. I wrote a comment explaining a little bit about this indicator in this post (wait for the page to load and it will scroll to the comment automatically). VIX is a very popular one because it is based on general risk-aversion in the market. As such, it is often thought to be predictive of next day's volatility and direction (although the directional forecasting power is still up for debate). Good luck! :)
0

Update Backtest





0

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.


Loading...

This discussion is closed