|
Mark,
Thanks for taking the time to answer my questions. All straightened out now J
Sounds like it was a useful exercise for you and should be for anyone else wanting to delve into lower level code.
Regards, -- Terry -----Original Message-----
Terry: First let me point out that this is just an execise. The goal was to duplicate the results Seykota has posted. The system itself expecially the position sizing part is not tradable without heavy modification. (I have posted an cleaner version to the online library which is easier to follow.)
Note: "Quotes from your reference web page"
1.
"Signals
issue right after the close. The system enters orders before the next open, to
trade on stop, the following day."
So, it is a daily system. I further assume the supplied GC data is DATE,O,H,L,C, You are right. 1. "The system computes equity at the close and then figures orders, after the close, for entry the following morning." You have trade delays set to 0,0,0,0 which imply same day trading, but maybe you have done something else in the loop code. In the CBT loop, the equity value is acquired at the beginning, meaning it is from yesterday. The trade delay (0,0,0,0) is necessary to simulate stop orders in backtesting, which by their nature are executed immediately when the prices are met. But it doesn't mean it is same-day-trading. You can certainly enter a stop order for tomorrow as long as you know the stop price. (If you find a better way to simulate stop orders, let me know. This is the first time I have to use stop orders in AmiBroker). 1. You have set the price arrays = stopPrice which is calculated AFTER we know the high and low for the day so we can't actually trade at the stop price unless you are, in fact, using this to enter the NEXT DAY at the Stop price. However, without intraday data, how do you know when or even if you can enter? The stopPrice calculation is used to simulate Seykato's Skid (slippage) which is half way between the real stop price and high/low (+/- 0.5*ff). In real trading, you would probably enter an stop order for tomorrow 1 tick below fast support and 1 tick above fast resistance of today, without knowing if your order would be filled or not. So the stopPrice calculation in the code only make sense in backtesting. 1.
It trades futures
contracts. Why not actually use FUTURES mode? Here are the CBOT specs as NYMEX
(GC) is not available from IB: Again, this is just an execise to demonstrate trend following concept. It doesn't consider all this factors which are required in real trading. It doesn't consider such factors as limit up, limit down, position size as volume percentage etc either. 1. Position Sizing. I am not following this exactly, but the backtester is taking HUGE position sizes, nearly 100% of available equity in many cases. This is not prudent with leverage at 100:1. In fact, a backtest using the provided GC data loses all my money in short order. I re-optimized from 2000 - 2005 using futures mode and the best results are 100/200, different from the web site results. These results also fail out-of-sample except in the 70's where you get filthy rich using these numbers (and the in sample period of course works). The position sizing is based on 5% heat. Meaning not to risk 5% of total equity for every order. So if the protection stop is very close, the position size can be huge. In reality, even 1% heat is too much for many systems. 1. There are several options not set in code. What are your AA->Settings? Only "positions: long and short" is applicable. Everything else is unchecked or 0. No stops are set. Again, I haven't studied your code in detail, especially the CBT portion, so maybe you have all these items covered already. PS: The price plot was missing from your display so I added it here because I like to see it and the example shows the price as well: (You don't need to if you just apply the formula as an indicator to an existing price chart)
Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- [amibroker] Ed Seykota's TSP: Support and Resistance Mark H
- [amibroker] Re: Ed Seykota's TSP: Support and Resistance osgem_2006
- [amibroker] Re: Ed Seykota's TSP: Support and Resistance scourt2000
- Re: [amibroker] Ed Seykota's TSP: Support and Resistance Mark H
- RE: [amibroker] Ed Seykota's TSP: Support and Resistan... Terry
