Adding Regime Switching using Volatility Forecast to LDL2 strategy
Author: shardis89
Creation Date: 1/28/2012 10:37 PM
profile picture

shardis89

#1
I added some revamped LDL2 code to the regime switching for volatility code, but the second LDL2 strategy under the "Trend Following Mood" will not close out the position. All the trades under the "Market Reversion Mood" work fine and close appropriately; however as described the other will not. My attempt is to increase my overall performance utilizing this switching process by allowing the Limit Price and Hold days to be optimized for each "Market Mood". Could someone please point out what my code is missing to get the Trend Following Mood code to close out the trades. No matter what parameters are entered the position remains open.

CODE:
Please log in to see this code.
profile picture

Eugene

#2
Just in case someone wonders what the topic starter is talking about, here's the original idea:

Regime Switching System Using Volatility Forecast
profile picture

shardis89

#3
Someone take a pass at this please. Then afterwards download a list of zacks #1 ranked stocks with a price to sales ratio below the industry median or below 2 and run this on a 30 minute bar basis. I have had good results with this method. If you don't have a subscription to zacks then pull up the fidelity stock screener and set the parameters to pull those stocks trading within 80% of their high, are the lowest 20% in their industry for price to sales, and have a equity summary score greater than7.0. Oh forgot to mention that you should re-run the screens weekly and create a new dataset. Very good results on this as well with LDL2. If I can figure out this regime switch I bet that it gets even better.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).