Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.
-
Content Count
1399 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Articles
Everything posted by BlueHorseshoe
-
Of course, it's slightly more complicated in that the arbitrage will also be against related ETFs, Options, and any other conceivable derivative of the underlying. Like Feedback Soup . . . BlueHorseshoe
- 44 replies
-
- daytrading
- market wizards
-
(and 3 more)
Tagged with:
-
You're back! Did you get anywhere with the automated strategies in the end, or move on to other stuff? BlueHorseshoe
-
This is impressively smart, and just the sort of thing that I try and do myself. However . . . Just because something is random doesn't mean it's unpredictable. Usually it's quite the opposite. Consider a coin toss - whether you get heads or tails on the next flip is perfectly random or 50/50. Because the outcomes from consecutive coin flips are probabilistically independent, the chances of flipping, say, ten consecutive heads, are very small. You can bet against that occurrence with reasonable confidence. You can plot the relative probability of each occurrence and get a bell curve or 'gaussian distribution', and bet against outliers. In simplistic terms, this could be something like fading any instance where ten consecutive down bars occur - the probability of an eleventh down bar should be very small. Most people think that instances of price behaviour are not independent of one another (ie current price is affected by what has happened before), and are causally linked; however, if you believe that they are not and that price behaviour is truly random then you should look at mean-reversion type strategies that exploit this assumption. It's how many of the quant funds were trading before 2008. In actual fact you can quite easily prove to yourself that price movement isn't random. Perversely, this makes it far less predictable. I personally believe that price behaviour in the short term is inherently more random than price behaviour in the long term. This means that I expect price to continue in the direction that it is going in the long term (more consecutive heads or tails), and to revert to the mean in the short term (if the last tosses were consecutive heads the next should be a tail). This amounts to buying short term pullbacks when the long term trend is up, and selling short term rallies when the long term trend is down. If you can find a way to quantify what constitutes a pullback/rally and can define what constitutes the long term trend, all you need to do is throw in risk management and position sizing and you've got yourself a trading system. BlueHorseshoe ps The convergence of Index futures and the cash market is guaranteed by arbitrage - not a secret algorithm at the LSE! The two can and do diverge, and there are studies that show that even in liquid currency pairs and their respective futures, these divergences can last several minutes even in today's HFT world.
- 44 replies
-
- daytrading
- market wizards
-
(and 3 more)
Tagged with:
-
Hi SIUYA, This seems the obvious way, but unfortunately it doesn't seem to work in EasyLanguage. I am unable to suss out why, but basically it will return the first X greater than the initial MaxX or a MaxNValue equal to B . . . I tried moving the formula out to a seperate function, but it won't run a function with a variable input within a loop . . . All very frustrating, but thanks for your help! BlueHorseshoe
-
Oh, just risk management stuff. Nothing you couldn't read about in Market Wizards or a dozen other books. My swing trading approach left me overly exposed to "black swan" type events and suddenly, having actually made some money, I became more averse to losing it. Perhaps in a year or two's time I shall be able to return to this thread and share with you whatever lessons I eventually learn from trying to overcome this current obstacle. In the same way, of course, it would be interesting if Schwager were to revisit the interviewees of his first book - where are they now, and what new lessons have they learnt? BlueHorseshoe
- 44 replies
-
- daytrading
- market wizards
-
(and 3 more)
Tagged with:
-
Hello, I have a variable, X, the value for which is dependent on an input, N. I want to vary the input, and then return the input value that generates the maximum value for X. I can obviously vary the input as follows: For N=A to B begin . . . X= . . . End; But for this range of N, how do I then return the value N that gives the maximum value for X? Any help would be greatly appreciated. BlueHorseshoe
-
This thread doesn't seem very popular (c'mon - surely you can all set your egos aside for five minutes and admit that you've all screwed up at some stage? ) Here's my rather dull story . . . My biggest failure was probably my naivety when I started out. I had absolutely no prior experience of anything related to the financial markets and assumed, like most other things, being smart I could just apply myself and learn it all from a few good books. A dumb assumption. I read books like 'Mastering the Trade' and was delighted - here was a successful and profitable trader telling me exactly what he did to make living and how he did it. I had none of the problems with discipline, risk, trade management etc, and followed the "rules" to the letter. Needless to say, I lost about half the account. Then the usual problems started to kick in - grabbing the first little bit of profit, fiddling with stop losses, risking way too much on each position. Somewhere in the middle of this I read a Larry Williams book on swing trading. I remember being very impressed by the fact that he showed backtested results for each strategy, and being suprised by how modest the results were. I started to trade a couple of the methods. After about 7 months I realised that my account was at around breakeven, and that all the profits had come from a handful of good swing trades. Apparently it was easier for me to make money swing trading EOD than daytrading. The main lesson to be learnt was this: I needed to learn how to thoroughly test a strategy's viability before risking real money trading it. Taking someone (anyone) else's word for it simply isn't good enough. Ever. As soon as I started to do this I realised that even the Larry Williams methods I had experienced some success with were only suited to certain markets and conditions, and that I had mostly benefitted from good luck. I took a break from trading. I learnt to program, and to backtest, to a reasonable standard. I arrived at a single EOD method that I felt I could trade with confidence in the ES. I traded it successfully for 9 months. At the end of this time I began to review what I was doing, factoring in what I had learnt since the time I began trading this method, and a few alarm bells began to ring. At the time I was buying a property, and it became necessary to liquidate the account to complete the purchase without a mortgage. Since then (July) I haven't traded, partly because I haven't been able to fund an account, but mostly because I haven't found satisfactory solutions to the issues with the trading method I used, or a good enough alternative. In other words, I have remembered my lesson from that first round of failure, and won't risk real money again until I am confident that I know what I am doing. BlueHorseshoe
- 44 replies
-
- daytrading
- market wizards
-
(and 3 more)
Tagged with:
-
If you're just experimenting with ideas with daily data then it will be fine to begin with, but you'd surely want to test using real ES data before going live with a strategy. One option to look at is http://www.prorealtime.com - sign up and they offer end of day futures data and a really great streaming platform (no need to install anything) completely free of charge. The language for backtesting in the platform is simple and they provide plenty of resources including a manual and example code. Another good proxy for the ES is always the "Spider" Exchange Traded Fund. Good luck! BlueHorseshoe
-
Hi Golgo, Nobody else seems to be replying so I thought that I would . . . This isn't possible because the Stochastic Oscillator calculation references three data points when analysing price (the high, low, and close of each period), and your COT calculations only provide one data point, 'Value1'. You could do this using an RSI instead though, which just requires one data point per period. Here's how: In EasyLanguage the formula used to calculate the output of an INDICATOR is typically stored seperately as a FUNCTION. This means that the FUNCTION can be called upon at any time that you need to use it, without having to write the calculation out within each new indicator or strategy. I believe this is called 'object-oriented' programming. So, in your case, the FUNCTION for the Relative Strength Index is already sitting there, and you just need to call upon it in the code you are writing, and then supply the input data. In the case of what you describe the input data used instead of closing prices will be 'Value1' derived from your COT calculations. You'll also need to adjust the lookback to give the data window of 37 weeks that you require - I've just labelled this 'X' in the code below. So the end result would look something like this: Variables: GolgoCOTrsi(0); Value1= LargeSpecLong/TotalOI GolgoCOTrsi=RSI(Value1,X); Plot1(GolgoCOTrsi,"GolgoCOTrsi",Green); TIP: I haven't personally looked at COT data in any detail, but if I was interested in analysing Price data with an RSI I would definitely be using a very short lookback in the calculation - 2-periods is often best. Hope that answers your question. BlueHorseshoe
-
I last heard Raschke make this statement in a TradeStation webinar about four weeks ago. I mention HFTs because that is probably where the bulk of self-learning algorithmic trading is focussed. Nadex is a good website to visit to learn more about what these things do and why the need to use things like Neural Nets to continually adapt and evolve. BlueHorseshoe
-
Counter Trend Trading?
BlueHorseshoe replied to legendkiller420's topic in Swing Trading and Position Trading
Yes, although I have always identified the longer term trend from the shorter term timeframe, as there are more data points to work with there. On a daily chart, for instance, a 150 period MA would be the 'go with' trend, a 5 period MA would be the 'fade-able' trend. This is workable in higher timeframes (if you have the capital), but I have never been able to make it work effectively in lower timeframes - the concept holds and is profitable, but the smaller profits get eaten up by commission and spreads. BlueHorseshoe -
That's really funny because the UK Paperback version of the book has a picture of what is clearly meant to be a Terminator's hand scrolling across a series of prices A lot of this sort of thing happens in sub-second timeframes (all the HFT scalpers), is far more prevalent in stocks than futures (the futures exchanges mostly operate with FIFO orders books, which level the playing field somewhat against the HFTs), and should not be an issue unless you're trying to scalp (in the traditional sense). The book's a very interesting read though. If you wanted to learn more about all this in detail then you could read my posts in the "Daytraders, Do You Know Your Enemy?" thread, which was an abortive online attempt to develop an algorithm for estimating liquidity and position in queue in the CME order books. BlueHorseshoe
-
Counter Trend Trading?
BlueHorseshoe replied to legendkiller420's topic in Swing Trading and Position Trading
I base everything I do or investigate on the concept of fading the shorter term trend in favour of the longer term trend. On a shorter timeframe chart it would look counter-trend, and on a longer timeframe chart it would look like 'buying a pullback' in a trend. It's all pretty relative really. There is someone in one of the Market Wizards books who is fiercely counter-trend - might be some help to you, but I forget which trader (could possibly be Tudor-Jones?). He is fairly 'global-macro' in style though. BlueHorseshoe -
Hi Vince, Like so many questions that are asked on TL, I'm afraid that the answer is probably "yes . . . and no". There are undoubtedly a handful of firms (mostly, though not exclusively) HFT, making a hell of a lot of money using A.I. approaches, but I would guess the number of retail traders who successfully apply anything of this sort are very small in number. I would guess that no off-the-shelf software of this type will give you any consistent and significant profits. That's just my opinion though. So, half a dozen maths and computer science PhDs at a multi-billion dollar hedge fund = bleeding edge A.I. algorithmic trading success. Something called an 'Expert Advisor' that you buy from some clueless internet marketeer's website for $999 = probable drained account. It's interesting that you mention LBR. She has made a point for many years of stating that the human mind is far more adaptive to change, and far better at recognising patterns than algorithms are, and that this gives discretionary traders an edge over automated strategies. While this may be true for anything that you or I may automate, it's probably not true when a trader finds themselves on the other side of some thing put together by, say, RenTech. All the indications are that professional A.I. trading has become very, very sophisticated. As a side note, Neural Nets specifically apparently aren't that popular anymore - A.I. trading moved on to things like genetic algorithms, modelling hidden markov chains, kalman filters, and a whole host of other things that involve the back-propogation of error. Unless you really know what you're doing, Neural Nets are just a complex method of curve-fitting. For an easy and casual read on all this, I recommend Scott Paterson's "Dark Pools". BlueHorseshoe ps The direct answer to your question is that I have never made money trading with Neural Nets
-
How to Quantify Support/Resistance Levels and Pivot Points?
BlueHorseshoe replied to suby's topic in Technical Analysis
This is true, and hopefully my post was clear enough that I was suggesting the kinds of things (rather than giving specific examples of things) that could be substituted in alongside support and resistance to try and build an entry with an edge that is distinct from any edge that the exit might offer. Although you don't have access to whatever calculations Steve46 is using to provide the levels he trades off, he has provided an interesting suggestion that was not included in my list of examples - looking for a probabilistic edge around specific entry times. Combining behaviour around S/R levels associated with specific times would be an interesting line of investigation. BlueHorseshoe -
How to Quantify Support/Resistance Levels and Pivot Points?
BlueHorseshoe replied to suby's topic in Technical Analysis
You might also find this article interesting - about Niederhoffer and Nassim Taleb: gladwell dot com - blowing up -
How to Quantify Support/Resistance Levels and Pivot Points?
BlueHorseshoe replied to suby's topic in Technical Analysis
Hi Suby, If I could give you any kind of a definitive answer to this question then I would be a rich man (and I'm not!). And you probably need to develop your own answer based upon your own beliefs about market behaviour. But my previous post was made with the S/R levels of your opening question in mind. Depending on what instrument you wish to trade, you'll often find a behavioural bias around such levels. Once you find a raw probability you can combine it with other elements in your strategy, such as trading with the longer term trend, or overbought oversold levels on an oscillator (there are some great posts by JSwanson in the forum on using a 2-Period RSI - a technique he has appropriated from Larry Connors), or some sort of tape-reading signal from the DOM, or something using Market Profile, or fundamental information, in order to provide a low risk entry. An example could be something like: - Identify an uptrend (however you choose to do so). - Place a buy limit under the market at an area where you know there is a bias for reversal to the upside, such as horizontal S/R, for example. - If your oscillator is oversold once you get down to that level / there are massive bids under that level / the fundamentals are bullish / or whatever else it is you have chosen to refer to so as to multiply your edge at entry, then leave your limit in place to hopefully get filled. You've still got all the challenges of managing and exiting the trade to face, but as long as the ingredients you have put in above are high probability ones, your entry should have an edge. One way to test the effectiveness of an entry is to run simulations for identically sized stops and targets of varying sizes against the entry. With an identical stop and target and a random entry, then you would expect breakeven results (50/50 on entry, 50/50 on exit). So with an identical stop and target and an entry with an edge you should get better than breakeven results. BlueHorseshoe -
How to Quantify Support/Resistance Levels and Pivot Points?
BlueHorseshoe replied to suby's topic in Technical Analysis
Hi Suby, Here's a thought that may or may not be useful to you, and please remember it should just be treated as an opinion because I'm not providing any evidence to back it up . . . From what you know about Niederhoffer you'll be aware that it is possible, by betting on mean reversion, to have a very high win rate (small wins), but a few very large losses that mean you're not profitable. Because you can be mathematically confident that price will always revert to its mean, then cutting losses can become an issue. Nevertheless, cutting losses is essential - ie having some form of stop loss. The next thing that you will find is that the markets are remarkably efficient at putting these two exits into equilibrium (and your account balance too, ignoring costs). If you take a random entry and you use, let's say, a 1 point target and a 9 point stop, you'll find that over a large data set you'll have something like a 90% win rate. ( 1 x 90 = 90 ) - ( 9 x 10 =90 ) = a breakeven strategy. If you use a 5 point target and a 5 point stop, your win rate over the long haul will be about 50%, and a simple bit of maths tells you that once again, this leads to breakeven. Hopefully I have explained myself well enough for you to see what I mean about the market efficiency in operation there. What does this mean? It means that you need to have an edge in your entry. It's pretty commonly said that amateurs are the ones fussing over entries, but 'exits are where the profits are made'. Though exits mustn't be ignored, entries are a crucial part of finding a profitable edge, especially with a system based on mean reversion, where any exit other than a profitable one is, theoretically, non rational. In summary then, I think you may find that to get a mean reversion type strategy to work, you will need to find low-risk points of entry. I hope that's some help, and remember, it's just my opinion! BlueHorseshoe -
Really excellent post - thanks! BlueHorseshoe
-
Trading Volatility Breakouts in the Emini (ES) Futures Contract
BlueHorseshoe replied to NatStewart's topic in Futures
Hi Wrb, I wasn't claiming to be testing the 'exact' same strategy that the author was. I'm more interested in data mining to support a general principle rather than the easily optimisable results of any specific entry method. I would suggest that the tests I attached would include within their entries any kind of breakout that the author might be discussing - it's hard to see how it could be otherwise. Can you explain to me how you think that what the author is discussing differs in any non-specific way from what I have tested? RE: "Therefore, any veteran trader knows that when "volatility is low"...you fade the volatility breakout..." Now what on earth does that mean? It's a contradiction in terms, surely? What is a 'low volatility volatility breakout' when it's at home? It sounds like you've been reading too much Lewis Caroll . . . RE: shelve the method. Ah yes, the old "it works until it doesn't" clause beloved of vendors the world over. RE: one is using a volatility breakout method I find that doubtful, but I can't state with any certainty that it isn't true. Given the nature of price behaviour in the ES, if this trader is trading breakouts successfully then he is not only a good trader, but has also succeeded in polishing a turd. I'll say it again: the ES is not a breakout type market. BlueHorseshoe ps. My tests covered 2002 to 2012 - the most recent ten years of data. Inside bar 1 min data was used. Spread and typical retail commissions were deducted, but no slippage. A single contract was traded. -
Trading Volatility Breakouts in the Emini (ES) Futures Contract
BlueHorseshoe replied to NatStewart's topic in Futures
This time the exit was on the close of the day after entry. The results are even worse with additional holding because the ES seldom exhibits any kind of follow through with these kinds of moves. Results are attached. BlueHorseshoe TradeStation Strategy Optimization Report - @ES(D) Daily [CME] E-mini S&P 500 Continuous Contrac.pdf -
Trading Volatility Breakouts in the Emini (ES) Futures Contract
BlueHorseshoe replied to NatStewart's topic in Futures
Here we go . . . Fading range expansions based upon a variable fraction (n) of the prior day's range. Exit is on the close. Here is the EL strategy code: Inputs: n(1); Buy next bar at h+(n*range) stop; Sellshort next bar at l-(n*range) stop; Setexitonclose; The table attached shows results when the fraction is varied (first page, first column) - as you can see from the net profit column, no variation on this was profitable. BlueHorseshoe TradeStation Strategy Optimization Report - @ES(D) Daily [CME] E-mini S&P 500 Continuous Contrac.pdf -
Trading Volatility Breakouts in the Emini (ES) Futures Contract
BlueHorseshoe replied to NatStewart's topic in Futures
1) I once traded a volatility breakout in Brent Crude. It was when I first began trading, and I'd just read a Larry Williams book. This is the only time I have ever done this. From September 2011 to July 2012 I faded volatility breakouts in the ES over a total of 23 trades. Though I am no longer doing this, the system I used has continued to be just as profitable as at the time that I employed it. 2) I am doubtful that the author has performed any kind of data analysis because I have, and my results completely contradict the description of market behaviour for this instrument which would need to be true in order for a breakout strategy like this to be effective. The ES simply isn't a breakout market; it's a mean-reverting market. I have, this afternoon, taken the the time (i.e. effectively wasted the time) to reproduce a simple test to demonstrate that what I am describing is correct, and will post these shortly. As far as nomenclature is concerned, I too prefer the term 'range expansion' to 'volatility breakout'. BlueHorseshoe -
You're back. Great! Now you can be curator of this thread again. Cos I'm damn well sick of it . . . BlueHorseshoe
-
Trading Volatility Breakouts in the Emini (ES) Futures Contract
BlueHorseshoe replied to NatStewart's topic in Futures
No aspect of my post made any specific reference to you in combination with a putatively definite description of your actions or abilities. I used the word "probably". I made a series of generalised statements about the inefficiency of trying to trade volatility breakouts in the ES, and made my own recommendation to other traders. Moreover, when you subscribe to a forum like this you implicitly consent to the possibility of having other members disagree with you. Sorry, I know it's not very good for your business, but that's just how it goes . . . BlueHorseshoe