- Joined
- 28 December 2013
- Posts
- 6,392
- Reactions
- 24,319
You first goal is to learn as much as you can about the markets you prefer to trade. Your second goal is to formulate a trading plan that will allow you to trade consistently and more importantly to keep your starting capital intact for as long as it takes for you to develop the skills to trade profitably.
Well said Skate.Gut trading
The problem with overriding a trading strategy is that you'll never be sure if it's the rules or the overriding of the rules was the driver of a losing streak. Poor trading can be attributed to poor execution. The more "inexperienced" traders will bend the rules to suit their mood & wonder why live trading fails to replicate their backtest results.
Jumping ship
The last few posts go somewhat in explaining why new traders constantly jump from one strategy to another. Jumping ship is normally an emotional decision rather than simple logic that all strategies take time to develop.
I'll leave the summary up to @peter2
I've made a series of posts when one would have sufficed.
Skate.
I hope you are right. While I don't follow the US market apart from a morning summary of the major indicies (and I don't trade small caps unless I've had too much to drink - and at my age that's something I try to avoid these days!), that parabolic curve suggests to me that price could be rolling over and more falls are ahead. All markets are at all-time highs and while I feel some (like the XAO) may return to their all-time highs in the next few weeks, I can't see sustained new all-time highs - so I am really cautious about potential 'sucker rallies'. However, as traders, while the sun is shining need to see what we can ring out of the currently rising prices (while constantly looking overo ur shoulder).Morning Mr Skate,
Traders in Aus. should probably have been paying attention to US Small Caps. The good news, obviously, is that the chop seems to have resolved to the upside.
View attachment 132419
If you are not already, stocks should be trading higher soon.
jog on
duc
I hope you are right. While I don't follow the US market apart from a morning summary of the major indicies (and I don't trade small caps unless I've had too much to drink - and at my age that's something I try to avoid these days!),
In summary
Amibroker includes the position as a buy (using either padding system) whereas in reality the position was never purchased in the first place. Amibroker doesn't allow adjustments to be made to the Portfolio Manager to accurately display only the physical positions in the portfolio. Using my custom Exploration Analysis solves this dilemma (for me) as those signals can be manipulated.
If you are not already, stocks should be trading higher soon
All markets are at all-time highs and while I feel some (like the XAO) may return to their all-time highs in the next few weeks
For green feets like me:Hi Skate,
I thought about your issue but I don't have much to add. If it's the backtest validity you're concerned about, the only way I can see of fixing it would be to identify weeks where the first day of the week is a padded day and include that as a forward looking condition in your backtest. I'm sure this could be done, but you already have a similar issue where price opens above your buy limit and runs higher. Your backtest still buys on open when in reality you miss the trade. Last I saw you weren't interested in correcting for this as backtests don't mean jack anyway.
I suspect the percentage of trades that are incorrectly shown in the backtester due to the stock being in a trading halt on Monday would be quite few. For a robust system you can check that the performance isn't bing carried by a very small number of outliers. Or, if by design the system is carried by a small number of outliers, at least manually check that those outliers are valid entries.
I am a big fan of having the backtest match reality wherever possible. But it's worth reminding ourselves occasionally that our objective here is to make money, not write code. Sometimes you need to choose your battles and decide how much extra value you get out of writing more code.
If it's the backtest validity you're concerned about
Amibroker handles your strategy - you handle your trading plan, it's up to you to execute your plan, there is a distinction.
For green feets like me:
we had a whole set of exchanges about this issue;
my trader bell Direct limits the % above close that I can set in my orders before Open;
And i miss a lot of ,probably the best, entries
One way I do check my strategy is add the following:
//Random entries
rd = Random();
buySignal=IIf (rd>0.2,True,False);
Buy=Buy AND buySignal AND Optimize("Run",1,1,1000,1);
Note: I do not own the idea:thanks to numerous mentors here,
backtests miss a percentage of entries at random(here 20% are missed); similar to what happens when my buy orders are missed:
@Lone Wolf the validity of the backtest reports is not the concern it's more to do with Amibroker Portfolio Manager using the Backtest feature. "Detail Log" in the Analysis Setting generates these buy positions. The issue I have is the signals in the "Detailed Log" report can't be adjusted or modified. Meaning if a position is not taken that's displayed in the "Detail Log" (for whatever reason) can't be corrected.
I don't make good use of the portfolio manager.
All true, and i replace these up gaping good trades by some at the end of my rankingI thought I remember you implementing a buy condition that looks froward a day and rejects the signal if the low on entry day is above the previous close plus %3 (or whatever your limit is). Does this not achieve what you want, or do you dislike that Amibroker will forever complain that your code has a future leak?
A couple of things to consider (which you probably already have, but for anyone newer who might be following along) - You are simulating missing some trades by randomly missing 20% of entry signals. Something to be careful of is that in reality you aren't missing random trades, you are missing a very specific type of trade. The trades that gap up on open and don't look back. It's worth checking how many of your winners start this way.
Another slight difference is that when you miss a trade in reality you are a position short and not fully invested. In your simulation that randomly skips signals you will still get allocated the full number of positions, just not the ones you ideally wanted (assuming you have enough remaining signals that is). I've never used the custom backtester, I have no idea if it's possible to leave positions unfilled if a signal is skipped.
As an exploration user, it is true that you can sometimes miss a sell order...@Lone Wolf there are advantages & disadvantages to using either method to generate signals.
The "advantage" of using a backtest "Detail Log" for signals
Only the signals to be actioned are displayed in the portfolio. Guesswork or "additional checks" are not required.
The "disadvantage" of using a backtest "Detail Log" for signals
Amibroker has full control over which signals make it into the portfolio & fudges (re-calculates) the buy price as well as the number of shares purchased after the market has opened. Once a position is in the portfolio (Detailed Log) it "restricts user intervention" to correct the records. Positions may not have been taken for a variety of reasons being the opening price exceeded my buy price limit (gap ups) or because the position didn't trade on Monday because of a "Trading Halt" or the position fell fowl of the Trading Plan. It should be noted that a trading plan overrides a trading strategy.
Backtest Detail Log (today at 1 pm)
This report displays "only the signals" for inclusion into the 10-position portfolio. At this stage, the share price & the number of shares to buy are sourced from the opening of the previous bar (one week old). The price for the calculations is not reflective of the closing price at 2 pm today.
View attachment 132437
The "advantage" of using the Exploration Analysis for signals
The Exploration Analysis can produce any display of your choice as your exploration can be coded making metric more "visual" thus making trading easier. The analysis can be colour coded & sorted into columns making the process a breeze.
The "disadvantage" of using the Exploration Analysis for signals (today at 1 pm)
Unfortunately, it displays all raw signals & "user intervention" is required when it comes to selecting only the required number of buy positions to fill the "PositionSize" of your portfolio. Also, the explorational analysis displays all the raw sell signals that need to be manually evaluated in relation to their inclusion in the portfolio. Using the exploration Analysis for signals is similar to being at a cafeteria - it's up to you to pick & choose the signals that are applicable to the holding in your portfolio.
View attachment 132439
Skate.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?