Australian (ASX) Stock Market Forum

Dump it Here

I feel like a dump this morning ...about takeovers.
Note my goal as a system trader is to simulate as close to actual trading as possible. Also, I’m not a short term trader.

There are two situations for takeovers, firstly holding a stock for a period then taken over (can’t avoid). Secondly, a buysignal is triggered by a takeover bid (can avoid).

This Amibroker code is relevant for both situations in backtesting delisted stocks. Trades that have been entered yet have no sell signal and these will "probably" have an exit value at or near takeover price.

Code:
NonTradedPeriod = 30;
SymbolDT = DateTimeAdd(DateTime(), NonTradedPeriod, inDaily);
Delisted = BarIndex() == (LastValue(BarIndex()) -1) AND DateTimeDiff(Now(5), SymbolDT) >= 0;
Sell = Sell or Delisted;

Better still, if you use Norgate data: https://norgatedata.com/amibroker-faq.php#exitpriortodelisting

If you don't use this for backtesting, you could be left with a bunch of stocks blocking buysignals. These stocks will withhold your capital and effect backtest results.

In real time trading, would you have exited on the announcement of a takeover, waited until the takeover is completed or accept a new ASX code?

I sell before a takeover is completed but should you choose to accept your mission of a new ASX code, what happens to exits? There would be no exitsignal for your new ASX code when running an Amibroker exploration as there would be no buysignal. Perhaps it's possible to manually add a trade but you could save the ASX code to favourites in Amibroker and check stops. Depending how complex exits are, this could be tricky. i.e. if your exit uses the buyprice or has some timed stop from the entry signal.

For the second situation where a takeover triggers a buysignal you could use one of the above choices (except “exited on the announcement”) but using the Amibroker code above simulates not buying, except if in real time the stock doesn’t end up being taken over!

Mr Monte Carlo is helpful guy

Unless I'm missing something I believe that the stale exit code used by @Skate addresses this problem.
 
Damn!
Scan this week and top of the list is EPM with a big spike and a takeover announcement.

Fridays close $2.45.

"ERM's founder and top shareholder, Trevor St Baker, who speaks for 27 per cent of the company's shares, said in a statement he would accept the offer of $2.465 a share if no higher bid emerges".
SirB, I think you must have mis-spelt the stock code, you must be talking about "EPW".
 
My cash account sits at $50k but I am being cautious and using only $10k of it. I started trading with $30k but due to my stupidity removing a stop loss on an APT trade I lost $3k and am now treading lightly. Hence why I'm asking if this is how you all trade or if I should bump up my risk or trade with more money and half my stop loss amount. I know, catch - 22

Since it's on the way up I want to buy into gold, but not sure which ETF or Stock I should consider.

I've hijacked a question from @Frankieplus in the - "which-gold-etf-stock" thread, that I'll answer here..

Hi @Frankieplus

I've read most of your posts & you have had some great responses from members to your questions so far. It's unsettling reading your latest post asking for trading advice in this manner.

Dangers of trading from advice of others
Before you invest or trade again I'm suggesting you read a few threads to bring yourself up to speed on the dangers of trading without a plan - or - at least grab a copy & read my eBook about the dangers of trading when your money is on the line.

Trading Fundamentals - Skate's Beginners Version eBook
https://www.aussiestockforums.com/posts/1014728/

Risks involved in trading
Traders without an education are notoriously optimistic & many lack a clear understanding of the risks involved in trading & are not always sufficiently educated in proper investment or trading strategies.

You said: "What Gold Stock I should consider or what stock you would recommend instead?"
If you want a tip to buy a gold stock at the open tomorrow - buy (ASX: GOR) & sell at the end of the week - I can guarantee you that your trading account balance will be different at the end of the week. (Make sure you hold your nerve for the entire week, don't be tempted to cash out early)

Skate.
 
Last edited:
I've been testing & coding @peter2 1st Blue Bar (SuperTrend Strategy) that has been discussed in his thread. I'm now a believer - his strategy performs well. Peter is onto something here & his posts on the topic are pure gold

CAM Minor update.png
With permission
Matt Radtke from “Quantforhire” recently wrote an article on how to “Beat the Market with a Simple SuperTrend Strategy” & with his kind permission Matt has allowed me to reference his work & hyperlink to his webinar presentation where he describes the process of creating and validating a simple trading strategy using the SuperTrend indicator.

Respectable results
The performance results of his strategy are quite respectable but the real purpose of his webinar was to introduce traders to the tools and methodologies that can be used to develop effective strategies of their own.

Well worth a watch
I have downloaded & watched Matt’s webinar a few times. The slides for the webinar can also be downloaded separately. Matt, in my opinion is the real deal & has done a great job coding the SuperTrend Indicator & presenting his webinar on the subject & for a better understanding of how his simple indicator can be applied to all time frames & all markets with an explanation on the correct application of the indicator for trading.

The AmiBroker AFL code is also kindly supplied.
https://quantforhire.com/2018/08/19/supertrend-indicator/

Robustness of a strategy
At the 39:50 minute mark - Matt explains how to test a strategy robustness using "Parameter Sensitivity" & then goes on to explain the procedure to refine a strategy using the "In Sample" (IS) & "Out Of Sample" (OOS) testing to avoid curve fitting was priceless. I have posted many times that backtesting alone means Jack. The only true test of a strategy is using the results from the “In Sample” (IS) & “Out Of Sample” (OOS) testing that is explained succinctly in the webinar presentation.

Beat the Market with a Simple SuperTrend Strategy by Matt Radtke

Website reference

https://quantforhire.com/2019/03/16/beat-the-market-with-a-simple-supertrend-strategy/

Webinar download
https://videos.files.wordpress.com/AF3ZeUuc/quantact-1_dvd.mp4

Presentation Slides download
https://quantforhire.files.wordpress.com/2019/03/quantact-amibroker-nifty.pdf

Disclaimer

I have not used Matt’s code in formulating my "SuperTrend Strategy" nor do I use the SuperTrend Indicator as intended or described in the webinar.

Skate.
 
Last edited:
Backtesting with in-sample and out-of-samples data

Skate, do you or have you thought about re-testing your system after trading it for some time.

An example could be: if real trading for a couple of years, backtest say 5 years plus one year actual trading with one year out-of-sample and compare?

I was out of the market a lot of last year and average trade can be 6 months so very few stats.

Any thoughts about this? I've read people like to retest every year but I'd say it depends on your average trade length.
 
Your right, I mixed up the code with their name :D

EPW - ERM Power Limited

Quoting myself here and just a thought about my error. This is exactly the reason I have automated placing trades as there is the risk of making errors when manually entering them.

This is my routine:
  1. Run IB Trader Workstation
  2. Run Amibroker Exploration, saves trades to a spreadsheet,
  3. Open a secondary spreadsheet which automatically retrieves trades from above spreadsheet, it connects to TWS, calculates entry/exit price and number of stocks to buy.
  4. A button press sends the trades to TWS

Little input and avoids silly errors. Only input is to delete trades that are above my capital. Could probably automate that too but haven't bothered (yet).
 
Skate, do you or have you thought about re-testing your system after trading it for some time. An example could be: if real trading for a couple of years, backtest say 5 years plus one year actual trading with one year out-of-sample and compare? I was out of the market a lot of last year and average trade can be 6 months so very few stats. Any thoughts about this? I've read people like to retest every year but I'd say it depends on your average trade length.

Yeah not sure, I'm just dumping it here. Haven't read the whole thread and about the stale exit.

Hi @Sir Burr

Another great question & its a pity you have not read all my posts. This may be one post to read..
https://www.aussiestockforums.com/posts/1014617/

Strategy Development
I've posted about the extensive testing that goes into strategy development & the ongoing re-testing fine tuning selected parameters keeping in tune with the markets. Amibroker is a big scientific calculator & it's hard (for me) to code how my strategy re-balances position sizing from a direct bank feed.

Strategy capabilities
I re-testing my strategy constantly not looking at the basic code but the ongoing parameters used in my system. It should also be noted that running your strategy on different markets around the world could results in SIGNIFICANTLY different results for the same trading period & this is not a cause for concern. Running your strategy over different markets is only a minor indication of what your strategy is capable of achieving in different environments.

Start dates are important to the mix
Depending on the starting date of the test, this can also have a big bearing on the performance outcome of the strategy, this is the very reason why we need to mix the markets, mix the index & mix the dates when backtesting, don't shortcut this vital stage in the development of your strategy.

Crystal ball
Unfortunately, no one has a crystal ball, and any strategy in the real market, for some periods (sometimes long periods), may behave differently from the backtest and it is up to you to decide if you want to continue trading it or to take it off the market definitely (or simply suspend it as you did last year, continuing to monitor it, until it starts again to perform as per your expectancy).

Take the good with the bad
With a weekly strategy you have to hold the position up to week even when the price falling rapidly. With a weekly system you have to stick to the plan even if it means a bigger loss (I never override my strategy) Keep the system as simple as possible, validate it (robust backtesting) and trade it.

Make sure you test it
Stress test your strategy, backtest the strategy, test it with in-sample and out-of-sample data, and test it over different Indexes and over different time frames, even different markets around the world as your strategy needs to work under all conditions.

# The way I trade is not rocket science, it's boring as Bat$hit.

You can listen to too many
Reading various trading threads here at ASF sounds good in theory, but the problem is that getting so many different trading opinions & trading styles becomes confusing & in the end you won't know who to believe thus putting a handbrake on your trading.

Find your comfort level
By reading various trading threads you'll find out what works and what doesn't. The hardest part is finding yourself a setup you like, one that's simple and suits your mindset.

Overseas Strategy Evaluation
This is an (unaltered copy) of "one" email in a series that I'm prepared to share about the overseas testing of my Hybrid Strategy. I'm not prepared to discuss the results any further. The email returned to me is an unaltered summary of the Hybrid Strategy tested overseas on a variety of markets around the world. Conducting & believing your own research is typically fraught with danger & when my money is on the line I try not to leave anything to chance.

-----------------------------------------------------------------------------------------------------------------------------------------
email START
I found that in general, the strategy works well also in other international markets where there are a lot of inexpensive stocks. I tried some alternatives for the PositionScore but found that your criteria to be a very good fit for this system.

Thanks for the very detailed answer. Now I better understand your code and logic.

Your coding skill, in my opinion, is already pretty good since you implemented some features that are for sure far above the basics. While the original code could be refactored to achieve greater readability (something that in any case is opinionable), I did not find any major issues (the gfx part is pure aesthetics so it does not interfere with the actual trading system).
email END
-----------------------------------------------------------------------------------------------------------------------------------------

In Short - I've posted a long reply to say..
Yes I test all my strategy constantly, testing never stops.

Skate.
 
This may be one post to read

Thanks.

Yes I have been one of the yearly re-testers, varying parameters too. I don't change code unless something can be improved like the code vs Norgates solution I posted above about delisted stocks.

There is a reason behind being interested in what you do. Subject of data and I don't like paying for things if unnecessary things. :)

I was a beta tester for Norgate Data and after their discount last year, that ends altogether when it expires in 30 days. I think it's crazy not to backtest including delisted so it's now 12 months = AUD 630. Cost of trading.
https://norgatedata.com/stockmarketpackages.php
 
Especially after today. You know when a company puts an announcement's headline in all caps it's serious business. Looks like things are finally paying off for STX shareholders. Well done to those that hold! STX up another 55.2% to 22.5c today.

Hi @greggles & @barney

I've hijacked your post from the "stx-strike-energy" thread that I can use for an educational post in the 'Dump it here' thread about market knowledge.

Disclaimer
As I'm on the ride of ASX:STX, in at $0.135 & it's a perfect segue to explain "when you know - it's too late"

The market is not a level playing field
The stock market is not a level playing field, but most individuals trade as if it is. They assume they have the same information as everyone else, so they focus on the facts that are readily available to them & ignore how a stock is actually moving.

Someone out there always knows more than you do
We don’t consider that maybe someone out there knows a lot more than they do & perhaps that might account for why a stock is moving the way it is. We have all seen a situation in which a stock suddenly starts making big moves up or down such as [STX] & then a short time later significant news is released that explains why that move took place.

I want to alert others
Someone out there always knows more than you do, and you shouldn’t assume otherwise.

Valuable information
It is just plain foolish to think that trading is a level playing field when it comes to receiving valuable information & rather than complain about that fact, we must use it to our advantage by paying close attention to those who do have inside information. There is absolutely no way a small individual trader like us has superior knowledge about a company but the good news is that small traders don’t need an informational edge. They make up for it by moving fast and being reactive to breakouts the very essence of a trend trader.

Someone knew
Look at my weekly chart, someone knew something well in advance of the news being released, I'm so lucky my strategy snagged the breakout - in @ $0.135.

Standard Chart [STX]
STX - Capture.JPG

Expanded view of the same chart [STX]
STX - 2nd Capture.JPG

Skate.
 
Last edited:
Hi @greggles & @barney

I've hijacked your post from the "stx-strike-energy" thread that I can use for an educational post in the 'Dump it here' thread about market knowledge.

Disclaimer
As I'm on the ride of ASX:STX, in at $0.135 & it's a perfect segue to explain "when you know - it's too late"

The market is not a level playing field
The stock market is not a level playing field, but most individuals trade as if it is. They assume they have the same information as everyone else, so they focus on the facts that are readily available to them & ignore how a stock is actually moving.

Someone out there always knows more than you do
We don’t consider that maybe someone out there knows a lot more than they do & perhaps that might account for why a stock is moving the way it is. We have all seen a situation in which a stock suddenly starts making big moves up or down such as [STX] & then a short time later significant news is released that explains why that move took place.

I want to alert others
Someone out there always knows more than you do, and you shouldn’t assume otherwise.

Valuable information
It is just plain foolish to think that trading is a level playing field when it comes to receiving valuable information & rather than complain about that fact, we must use it to our advantage by paying close attention to those who do have inside information. There is absolutely no way a small individual trader like us has superior knowledge about a company but the good news is that small traders don’t need an informational edge. They make up for it by moving fast and being reactive to breakouts the very essence of a trend trader.

Someone knew
Look at my weekly chart, someone knew something well in advance of the news being released, I'm so lucky my strategy snagged the breakout - in @ $0.135.

Standard Chart [STX]
View attachment 97088

Expanded view of the same chart [STX]
View attachment 97089

Skate.
Skate, how does it prove it when some stocks have a strong bar with no follow through?
 
Skate, how does it prove it when some stocks have a strong bar with no follow through?

@Gringotts Bank you have missed the point of my educational post.

It would be the same if I asked you in return...
"Are you saying nobody knew anything?"

Playing tennis
Comments like these serve no purpose other than playing tennis with each other. If you have an alternative view on the subject feel free to post it for others to consider.

Skate.
 
Worth reposting in this thread as it's exactly correct. New traders and investors generally abandon winning strategies too early.
Reading another thread I was thinking how important the journey is and not wanting to clog up that thread I thought I might dump here if thats O.K. Then I see your post Peter and I think how important staying the course is and so, face one of my unresolved conflicts.

I started as a Muppet, taking risk I didn’t even realise,

Then I passed through a phase of trading on price to control risks tightly and build early funds.

Then I moved to focused stock selection to take on more calculated risk in an effort to accelerate wealth building

Now I’m morphing again, into broader diversification for wealth preservation over a multigenerational outlook.


"Stay the course" is the most important thing!
"Journey" is the most important thing!

How to reconcile?????????

Stay the course of risk management?
Maybe methods can evolve?

how do you know when the time is right for a paradigm shift?

So many questions, so few answers. But forward we move regardless.

I feel better for dumping - thanks.
 
Reading another thread I was thinking how important the journey is and not wanting to clog up that thread I thought I might dump here if thats O.K. Then I see your post Peter and I think how important staying the course is and so, face one of my unresolved conflicts. I feel better for dumping - thanks.

Hi @craft

Thank you for your post in the 'Dump it here' thread, I appreciate when knowledgeable & highly respected members decide to add to the discussion. Better still raising or starting a new topic for discussion always stimulates thinking on a higher level, education is the key in this game.

When you have something to say "Dump it here"
https://www.aussiestockforums.com/posts/1005967/

The perfect place
Sometimes you feel like dumping stuff & this thread might be the perfect place.

Helping Others
You might want to dump stuff here to help others

Unload
You might want to unload & dump something off your chest

Gems
You might even want to dump some gems here

Let it go
Sometimes you can't let somethings go till you dump it on paper

Dump it here
If you want to dump it, dump it here

Skate.
 
Top