Australian (ASX) Stock Market Forum

Dump it Here

Let's now talk about consistent, effective trading
The above short video explains how wealth can be created with a little discipline.

My current project
I have a high conviction that "The Platinum Strategy" is the correct strategy to trade at the moment under these "trying conditions". The Platinum Strategy has been systematically coded to be responsive to the "current" market conditions. Trading the strategy as a "weekly" has its advantages by allowing for the natural ebb & flow of the markets, but in saying this the strategy is ultra-conservative in its approach. The buy condition is strict in selecting positions but also exits at the first sign of a confirmed change of conditions. Trading this way is the safe as I can possibly make it.

Skate.
 
Why is "The Platinum Strategy" a $100k, 10 position portfolio?
The premise behind the idea was simple. $100k rounds nicely with scalability that's easy to understand & implement. I also have those who are following along on the journey. The "offer price" of the Exploration Analysis is constant allowing others to scale the number of shares to buy in relation to the investment they wish to make. I also have to admit I'm not restricting my bets to $10k nor limiting my portfolio to 10 positions. That's another unique feature of trading this strategy, its scalability.

What's the point of the exercise?
Others have made it clear that they wanted to trade a system that I'm prepared to trade myself. The exercise is to post the signals in advance of trading whilst recording the ongoing results on a weekly basis - that of a $100k, 10 position portfolio. Doing this allows others to contrast & compare their own trading results, making sure they are on the right track.

As a weekly strategy
The "Exploration Analysis" displays all raw signals allowing flexibility to trade along. The signals being constant & the "offer price" being constant as well makes it easy to make the "adjustment" in relation to their investment. In essence, the signals are displayed before the market open on Monday. Displaying the signals leaves it in the hands of others to make their own decision when it comes to following along.

With $50k
My son has decided to trade along with $50k & in doing so will simply buy half the number of shares listed in the "Exploration Analysis" capture. When it's time to sell, he sells all his shares when indicated to do so. For him, there will be nothing easier than trading this way.

Skate.
 
Follow-up explanation
The ongoing issue that I have with trading the "Backtest Signals" is that positions have been taken when in fact they were passed over because of the trading halt.

Reaching out
I've read most of the contributions @Lone Wolf has made relating to Amibroker but have yet to find any previous posts on the subject matter of how to adjust backtest trade signals. If I was chasing information on "Covid-19" or "Music" I'm sure @cynic would be the man. @Linus van Pelt has already made a few great suggestions but I'm sure if the other two members have a hint or a reference to read, I'm sure they will post them. (or anyone else who can help, I'm still all ears)

This is the irritation
Amibroker's Trade Portfolio records a trade without a way to "delete" or "alter" the buy position that has not been exercised at all.

BACKTEST Signals.png

Skate.
 
I'm not familiar with AmiBroker, but can you put in a trade entry condition volume > 0, then run the script again ?
KH

My buy condition
@KevinBB my buy condition requires volume at a level determined by my "Volume Filter". Amibroker native padding uses the previous bar to fill. Using @Linus van Pelt suggestion of Norgate's padding fills the bar with the "Closing price" of the previous bar & no-buy will be executed on Mondays. By using the Norgate pad feature "all this does" is to delay the purchase until the bar is populated with the most current data, that being the new (data) with the opening price being (Wednesday) for ASX:IPD. Using either padding method or your suggestion (Re: Volume) unfortunately doesn't rectify the issue I have.

Trading rules
I follow trading rules (my trading plan) when trading any of my strategies. There are advantages of which I'll list. Rule #3 is an important one as the "buy" is only good for a day. Coding rule #3 has eluded me so far & this is why I need to amend the buy position in Amibroker backtest analysis.

Rules
1. There will be no thinking involved when trading one of my strategies
2. Signals are taken in the order they are listed
3. Buy orders placed in the pre-auction will be "good for the day" only
4. Never alter the (a) Buy Offer or (b) the QTY of shares to buy
5. On a sell signal, sell the whole position at the "Offer Price" in the pre-auction
6. If the position has not sold by 10:30 am – “sell at the market”

Skate.
 
Amibrokers' padding
Just to be clear, Amibroker uses the previous bar "data" to fill the missing data of Monday's trading halt. (ASX:IPD) as indicated below.

Amibroker Backtest Padding.png

Norgate's padding
Norgate adds only the "closing price" to populate the bar thus fooling Amibroker in delaying the re-calculations until Wednesday being the first trading day since the trading halt. Amibroker requires an "opening price" in the data for its re-calculation. It would be preferable to miss the buy altogether or allow the user to delete that position. With (ASX:IPD) still in the portfolio (using either method) another position can't be substituted until a sell signal for that position is generated.

Norgate Backtest Padding.png

Skate.
 
It would be preferable to miss the buy altogether
Yes, there's a few reasons missing some trades.
Backtesting, I add to the Buy signal randomly missing X% of trades. (Probability of Ignoring any Entry Signal)


position can't be substituted until a sell signal for that position is generated.
Running backtests long term I also found trades open for a long time blocking new buys. These trades did not exit for whatever reason. Ended up adding code to close trades after X periods. (Non Trading Stock Exit)
 
Norgate's padding
Norgate adds only the "closing price" to populate the bar thus fooling Amibroker in delaying the re-calculations until Wednesday being the first trading day since the trading halt. Amibroker requires an "opening price" in the data for its re-calculation. It would be preferable to miss the buy altogether or allow the user to delete that position. With (ASX:IPD) still in the portfolio (using either method) another position can't be substituted until a sell signal for that position is generated.

In my previous message I wasn't connecting the dots since I had a bias for how I code my rotational strategies.

I use daily periodicity, whether my rotational strategy is weekly or monthly, then some fiddling with the PositionScore to get it to work.

Some code excerpts:

// https://forum.amibroker.com/t/simple-buy-certain-day-and-sell-few-days-later/16621/3 and
// https://forum.amibroker.com/t/how-to-identify-and-define-trading-days/23630/3?u=linusvanpelt

// "Your condition is True only on bars where the current bar's Month is not equal to the most recent previous bar's Month,
// i.e. in daily data this will be the FIRST trading day of the month. And it will ONLY be true on that bar.

IsEOW=Nz(TimeFrameExpand(1,inWeekly,expandPoint));
IsFOW=DayOfWeek() < Ref(DayOfWeek(),-1);

IsEOM=Nz(TimeFrameExpand(1,inMonthly,expandPoint));
IsFOM=Month() != Ref(Month(),-1);

...

score = IIf(IndexExit==1,scoreExitAll,
IIf(IsEOW==0,scoreNoRotate,
IIf(OnSecondLastBarOfDelistedSecurity
,0,myrank*LiquidityFilter)));

PositionScore = score;

So, something to try...

* Change to daily periodicity in Analysis settings
* Use time compression for your system rules. Once you wrap your head around this (it took me a while) and you have some boilerplate code it's not hard.
* Use IsEOW as a condition for buy (i.e. a positive PositionScore)
* Trap for the padded bar on the buy day itself, something like Iif(V==0 OR NorgatePaddedTimeSeries != 0,0, IIf(OnSecondLastBar,...)
* Perhaps SetTradeDelays=0 and build the trade delay via your AFL? I've seen you code this before.
* Would Ref(1) be a future leak here? Usually it would be, but the fact is that, if the bar was padded (not traded) the code would match the actual trading - you could not have bought the symbol that day. Perhaps your backtest is in fact detecting something you wouldn't know - that it didn't trade on Monday - but the end result in live trading is the trade would have been rejected by the exchange. You would of course really want to test this thoroughly so that it didn't cause a future leak or other issues - the effect of Ref(1) would need to be limited to this very specific issue only.

I'm just lobbing this out there - I haven't tested this, nor do I have time to mock up something to test this scenario.

The gist of this is, if you're using Weekly periodicity, your IPD.au bar will collapse to a weekly bar, and you'll lose the granularity of data needed to detect that the symbol did not trade on Monday or Tuesday. This was what I missed in my first post (and perhaps other things).

You need code that will:

Generate a weekly signal;
But override that signal on the buy day if the bar was padded. You may just need to check the buy day only, i.e. Monday. I wouldn't buy on Weds, but rather check if the symbol met the system rules the following week. So any days other than EOW and FOW would be scoreNoRotate days as far as the backtest is concerned.

I'm sure you know this already, but for those who don't (and I have to continually reference this page myself), this is a good page to bookmark:


Read the various scenarios under Rotational Trading. Scenario 3 might be helpful.

Then there's always the CBT, although TBH I don't know how it works with Rotational systems. You probably have to do all the work in the CBT that you get for free with backtestRotational. I think it should be possible with StaticVarGenerateRanks, where you pre-derive each symbol's weekly rank in a Status("stocknum")==0 block, then pass that to the CBT to do the Phase 2 processing and execute the equivalent of your rotational strategy.

Hope some of this was useful :)

P.S.: I have a monthly rotational strategy that is not coded with backtestRotational, but is actually a "roll your own" rotational strategy with both buy and sell on EOM. I tried both backtestRotational and this approach, and this approach got better returns. My analysis is it gives the strategy a chance to rebalance each month, taking larger (or smaller) position sizes each month depending on current equity. I doubt this would be the case with a weekly strategy, with lower expectancy and higher commission costs. But I believe it would be easier to code this scenario, since you have separate Buy and Sell variables instead of it all wrapped up in PositionScore.

I'm sure Tomasz could have coded Rotational strategies in many ways - he chose the most obtuse ;)
 
The Platinum Strategy.jpg

Update
I previously remarked that there were a few (three) following along with this strategy & with the confusion of last week two of them couldn't follow the plan (the trading rules). Because of this, all open positions will be sold "at the open" sucking up the first week's losses. In fairness, all are first-time traders & it's not the start we anticipated.

For this strategy to succeed
The trading plan needs to be followed religiously if we are to have the same relative results. It's a hard lesson but so important. There is nothing we can do other than accept the starting hiccup & move on.

Trading results & signals
These will be posted as usual on Friday after 6 pm. Doing it this way at least gives the group a fresh start by actioning the trading plan correctly.

Skate.
 
The confidence to actually trade a system comes from understanding the system. The backtested results are only relevant if you actually follow the systems rules. Some people can be more successful by applying a bit of discretion to their system, while others manage to ruin it completely.

https://www.aussiestockforums.com/threads/how-to-trade-the-unholy-grails-system.26473/post-761345

Some old posts are great to read
@Lone Wolf made a great post back in March 2013 that is still relevant today as it was back then. For those just starting out on their journey, this post sets the road map of what is required to start trading. (successfully I hope)

Let’s talk about expectations of system trading
Most fail to realise that you are trading against people who devote their entire life to this endeavour. Those who have better skills & tools than most of us put together. Some new traders become quickly disillusioned & downright disappointed when their account takes a setback "early on". New traders have trouble accepting that it takes time to circulate bad positions seeking better ones. As with most trend trading, the average win rate is low around 35-45%. The truth of the matter is that the win rate of a strategy is largely irrelevant as the strategy is driven more by trade expectancy.

Skate.
 
Common traits (loss aversion)
There are those who can’t stomach losing & go on to making a habit of quickly selling (overriding their strategy) or as @Lone Wolf says they "ruin it completely". By selling quickly they believe it will avoid further losses instead of allowing the position extra time to establish & settle.

Crystalising losses
There are just those who want to book a quick loss rather than give the position ample time to turn things around. Pullbacks are simply the natural ebb & flow of the markets. @peter2 enjoys buying pullbacks as he knows there is a high probability for some positions to punch higher that can go on to make "all-time highs". Buying pullbacks is simply buying low & selling higher whereas trend trading is buying high & selling higher. Both methods rely on a certain amount of luck.

Skate.
 
Further to @Skate 's comments on buying pull-backs. I started my trading career by restricting my buy options to break-outs only. I bought new highs and only new highs. An underlying bull market at the time helped me accumulate profit and confidence. There were still plenty of losers but when the profits are accumulating it's so very easy to sell the losers when they're small.

The discipline that I executed by selling those small losses helped me more when the market turned down. Suddenly the profits weren't accumulating as quickly and keeping the losses small allowed me to stay in front. Down markets don't provide many break-out opportunities and the few that trigger, well it's 50:50 whether they failed. I learned that buying BOs in down markets gets very frustrating. I felt that I needed to learn another strategy that works in trickier markets.

Price pull-backs are very seductive. We see them bouncing off prior BO levels, longer term moving averages and of course the "magic" fibonacci 50-62% pull-back buy zone. They look so easy to trade when we see them in a chart. In reality they're tough because we're buying when prices are falling. We're never sure that the pull-back is complete. It's taken me many years, probably 5 - 10, to grow the confidence to trade pull-backs consistently. I tend to trade pull-backs when the BOs start failing more often and the underlying market is not going up.

Trend traders have to learn how to tolerate pull-backs. Shorter term swing traders have to learn how to trade them.
 
Hi Skate,

Thank you for taking the time to start posting again I have always appreciated your thoughts and trading tips. I know once before I asked you about your portfolio software, Norgate data and Amibroker.
Because I have a brain like a sieve, could I just ask again which version of Norgate you might recommend I thought Gold may be adequate perhaps. . Amibroker not sure standard or professional and are you still happy with your XLAutomation portfolio software?
Just making sure one Norgate licence would run both Amibroker and XLAutomation.

I am not looking for for running systems testing at this stage maybe in the future :thumbsdown: but just a good charting package.

Thanks for your time

bux
 
Hi Skate,

Thank you for taking the time to start posting again I have always appreciated your thoughts and trading tips. I know once before I asked you about your portfolio software, Norgate data and Amibroker.
Because I have a brain like a sieve, could I just ask again which version of Norgate you might recommend I thought Gold may be adequate perhaps. . Amibroker not sure standard or professional and are you still happy with your XLAutomation portfolio software?
Just making sure one Norgate licence would run both Amibroker and XLAutomation.

I am not looking for for running systems testing at this stage maybe in the future :thumbsdown: but just a good charting package.

Thanks for your time

bux

Hi @bux2000

To be a serious trader you will need three pieces of software & if I may add a word of advice "don't skimp" as your financial future is at stake.

Needed
1. Amibroker 64bit Professional
2. Norgate Platinum Subscription
3. Share Trade Tracker (XLAutomation)

Yes, Norgate Data integrates into Amibroker using their propriety data plug-in whilst Share Trade Tracker has the Norgate API to take advantage of Pricing & Dividend updates.

Hope this helps you make the correct decision. (on needs not cost)


Skate.
 
Trading isn't easy but it doesn't have to be complicated
Simplicity works just fine & it can be effective. At times simple trading techniques can encourage curiosity without being heavy on detail. Complex trading ideas have a habit of putting off the casual reader. I'm just saying successful trading requires a degree of understanding of how the markets move. Look at any bar chart & the first thing you'll notice is how the price bars are jumping all over the place.

The ebb & flow of the price bars are simply a consensus of the traders at a point in time
With any group of people getting a consensus or an agreement is near impossible but with trading, the consensus on the price of a security is always 100% accurate. (but changing from one minute to the next)

Skate.
 
It doesn't matter how long you have been trading, there are always new ideas to evaluate
To start off on your "trading or investing" journey requires nothing more than copying a process that has already proven to be profitable. There are members on this forum "trading their way" displaying a variety of methods that can be replicated. It's just applying a method of trading that resonates with you. Successful traders do follow proven methods but normally think more independently about how to cultivate a slight edge.

What you might be unsure of is how to incorporate those methods into a repeatable process
It's for this very reason education plus experience is required. Even when you make your first trade you need to realise that it's now in the hands of the market & the market will decide what your return will be. Trading at times comes down to pure luck & mathematical probabilities.

Skate.
 
It doesn't matter how long you have been trading, there are always new ideas to evaluate
To start off on your "trading or investing" journey requires nothing more than copying a process that has already proven to be profitable. There are members on this forum "trading their way" displaying a variety of methods that can be replicated. It's just applying a method of trading that resonates with you. Successful traders do follow proven methods but normally think more independently about how to cultivate a slight edge.

What you might be unsure of is how to incorporate those methods into a repeatable process
It's for this very reason education plus experience is required. Even when you make your first trade you need to realise that it's now in the hands of the market & the market will decide what your return will be. Trading at times comes down to pure luck & mathematical probabilities.

Skate.
Repeatability is everything (at least it is to me). With repeatability comes system predictability and with predictability comes confidence in your system's behavior and that allows me to sleep at night--which is important to me.
 
With repeatability comes system predictability and with predictability comes confidence
Confidence is the key
Without confidence, you will not keep pulling the trigger when you trading funds suffer from a string of consecutive losses. @tech/a believes "being wrong isn't a choice, but staying wrong is" or something similar (I'm paraphrasing from memory) & to be fair, tech is all about managing the downside risk & beyond that, it's all comes down to money management.

Putting it bluntly to trade successfully you have to develop a level of skill
Unfortunately, it takes effort & time to develop these skills but if you are an excellent risk manager you have a high probability of trading successfully. Forget about the upside as it will take care of its self.

Skate.
 
Top