Australian (ASX) Stock Market Forum

Dump it Here

Thanks for the correction and the Nick Radge books @rnr. :xyxthumbs

Hi Mr Skate, firstly, thanks for the Bollinger bands code.

Question; following on from Saqeeb,

What do you recommend on how to take into account dividends paid/ pending?

EG;
AST went ex ~5 cent dividend later in May, payment pending (if the memory is correct. :oops:)
Thanks in anticipation.

F.Rock
 
Hi Skate, thanks for your post of the BBS - from a quick look it gives verrrry impressive backrests :xyxthumbs. I look forward to looking at your code and structure - possibly next week. This thread is a wealth of information. So thanks for everyone who is posting.

@CNHTractor thanks for taking an interest in the "Bollinger Band Weekly Strategy". I've traded this strategy with good success back in early 2016.

I would appreciate an honest assessment for others to read, the code & structure is at beginner level but at times "SIMPLE" just works.

Also, thank you for supporting the "Dump it here" thread, without members taking an active interest the thread will die.

Skate.
 
What do you recommend on how to take into account dividends paid/ pending? F.Rock

@frugal.rock that's a good question. We are not trading for dividends, that's just icing on the cake. We have a trading account balance of $389.75 left in our trading account from our initial stake of our $20k. Taking this balance into account "less a loss with selling [AST]" plus a "small win selling [IGL]" the rebalance will buy another positiion when our trading account exceeds $1,000.
What is annoying - no rebalancing
Commission drag won't allow rebalancing of positions that's why we need to keep position size to $1k bets. Trading such a low-value portfolio with "NO" re-balancing restricts the performance potential of the strategy. Commission drag has already been calculated so it's not possible to increase position sizing (bet sizes) under any circumstances.

I have a procedure to take advantage of profits & it's normally done in two ways.
Option (1) adding extra positions when funds become available. As I've said from the initial $20k there should be $389.75 left in our trading account, once that balance exceeds $1,000 we will buy another position. We won't let idle funds sit around being lazy, every dollar needs to earn it keep. Because of the commission drag, the commission needs to be less than $10 per trade.

The options to pyramid
1. Increase portfolio position size (this is our only option)
2. Increase the bet size (not applicable, due to commission drag)

Increasing the portfolio size
This method of pyramiding really needs no explanation as you add extra positions when funds become available.

"Pyramiding Explanation" (positionSize)
Pyramiding "PositionSize" is a re-balancing technique to reinvestment profits. "Pyramiding (re-balancing) my PositionSizes" every soldier is put into the battle to fight the good fight.

Skate.
 
I would appreciate an honest assessment for others to read, the code & structure is at beginner level but at times "SIMPLE" just works.

I am having an initial look at the "BBS" code. I am struggling with understanding the trailing stop and thought I would try to plot it - thinking a visualization would assist.

The trailing stop is
Code:
ApplyStop( stopTypeTrailing , stopModePercent , ts , exitatstop = 2 ); 
// Apply Stop = [ts] Trailing Stop [exitatstop = 2] means check High-Low prices but exit NEXT BAR on regular trade price.

I am not sure how to interpret "check High-Low Prices". I have checked to Amibroker manual but my "brain" is not understanding the text.

You code applies either a 20% or 10% stop loss, depending on index filter. What is this applied against, ie what value, and for what period.

I am presuming this is obvious but I am not understanding.
 
I am having an initial look at the "BBS" code. I am struggling with understanding the trailing stop and thought I would try to plot it - thinking a visualization would assist.

I have written the following code:
Code:
highsinceBuy = HighestSince( Buy, High);
stoplevel = highsinceBuy  * (100-ts)/100;
Plot( stoplevel, "stop", colorRed, styleDashed );
Plot( highsinceBuy, "highsinceBuy", colorBlue, styleDashed );

I think my issue is that the visualisation of Sell on the chart doesn't actually show a sale from TrailingStop. I will post some images to illustrate
 
Last edited:
I am struggling with understanding the trailing stop and thought I would try to plot it

@CNHTractor, you will not be able to plot an ApplyStop, so don't even try.

I am not sure how to interpret "check High-Low Prices".
That's a fancy way of checking the complete bar. The moving average of the IndexBuyFilter uses the "closing" price. I could have used the "high" as I have in the Buy condition. The ApplyStop check the "high, low, open or close" or a shorter way of saying it is "check High-Low Prices"

In English
When the close is higher than a (100 Week) simple moving average the Index Filter is on. (ts1 = 20%) means the trailing Stop is set to 20%. The "IndexSellFilter" is the exact opposite of the "IndexBuyFilter". When the IndexBuyFilter is "False" (ts2 = 10%) is the option selected as per the ApplyStop code. The Index filter is binary (either on or off). If you read my comments & look at the codes (being placed together) it might make more sense to you.

Index Filter & TS.jpg

Stop type
0 = stopTypeLoss - maximum loss stop,
1 = stopTypeProfit - profit target stop,
2 = stopTypeTrailing - trailing stop,
3 = stopTypeNBar - N-bar stop

Stop mode
0 - disable stop (stopModeDisable),
1 - amount in percent (stopModePercent), or number of bars for N-bar stop (stopModeBars),
2 - amount in points (stopModePoint);
3 - amount in percent of profit (risk)

ts
References the Indexbuyfilter TRUE, (ts1 = 20%) = Index Filter (ON)
References the Indexbuyfilter FALSE, (ts2 = 10%) = Index Filter (OFF)

ExitAtStop
ExitAtStop = 0 - means check stops using only trade price and exit at regular trade price(1) (if you are "trading on close" it means that only "close price will be checked for exits" and exit will be done at close price)
ExitAtStop = 1 - check High-Low prices and exit intraday on a price equal to stop level on the same bar when a stop was triggered
ExitAtStop = 2 - check High-Low prices but exit NEXT BAR on regular trade price.

Skate.
 
Capturesk.PNG skatesys.PNG skatesys.PNG skatesys.PNG Capturesk.PNG Thanks Skate for uploading this system plus the clear explanation above of the trailing stop, which even though i have read the manual i still found confusing.
I ran a back test back to 2009 (XAO) with the returns per attached, can someone verify if possible so i know im doing the backtest correctly please. Seems like excellent returns and max. system drawdown of only 9.08% for the period which is excellent.
 
The options to pyramid
1. Increase portfolio position size (this is our only option)
2. Increase the bet size (not applicable, due to commission drag)

Thanks for the detailed response Skate.
Q.1
Drawing from your knowledge bank,
If a cheaper broker was used would you still go with option 1 ?
(consider all trade position sizes having a $10 fee)

Q.2
Where would you cap the number of positions using option 1 before considering moving to option 2 ?

The above situation would be a nice problem to have one day!

Q.3
What method would you use to determine starting bet size for
option 2 ?

Cheers,
F.Rock

PS; money can't buy the information format you present. Your patience and benevolence is to be applauded, and to my detriment, has largely been previously obscured by the ego.
Sometimes in life the truth hurts, but you have highlighted to me that my psychological variables need to be "fixed", otherwise, they will forever remain variables. :oops::xyxthumbs
Sometimes the seed of thought doesn't sprout until washed into a fertile furrow...
 
Q.1 Drawing from your knowledge bank, If a cheaper broker was used would you still go with option 1 ? (consider all trade position sizes having a $10 fee)

Answer
(a) There is no "cheaper broker" I can use. eSuperfund only allows two broker options. (previously discussed only a few posts back)
(b) If the commission rate was fixed at $10.00 (no matter the bet size) I would prefer & use "pyramid my position sizing", which means I would increase the bet size over adding additional positions.
Q.2 Where would you cap the number of positions using option 1 before considering moving to option 2 ?

Answer
40 positions
Q.3 What method would you use to determine starting bet size for option 2 ?

Answer
When 40 positions are full.

Moreover

I'll have this problem to sort out "about a year from now" when I double our money from $20k to $40k. (going from 20 positions to 40 positions trading with $1k bets)

FYI
One of my strategies trades a (40) position portfolio & has been as high as (63) positions. Members scoffed at the idea of trading such a large number of positions in a strategy. I've been shown "graphical proof" that trading such a larger number of position wouldn't achieve any better than an Index Fund. What? - my trading results don't align with that summarisation, nor doesn't the results @peter2 achieved trading a (40) position portfolio.

-----------------------------------------------------------------------------------
READ THIS IN FULL: https://www.aussiestockforums.com/posts/1039741/
------------------------------------------------------------------------------------

START


#1 This is a quote of @peter2 about trading a larger position portfolio
@Skate Very interesting that your testing shows 53 is optimal number of positions whereas most trend following systems indicate 15 - 17 with most people happy to use 20. Why is there such a difference if all systems are trend following systems? So overall I accept that the Hybrid strategy will do a slightly better job than most mainstream trend following systems but I fail to understand why there's a huge difference in the optimal number of portfolio positions between apparently similar systems. I'm not interested in the actual optimum number. I'm trying to understand the difference between 17 and 53. My knowledge and experience would say that a portfolio with 50 positions would not beat the market index. Clearly this has been challenged by skate's work.

#2 This is a quote of @peter2 about trading a larger position portfolio
re: Skate's hybrid system results for 17-18. Wow. Congrats and damn, you've forced me to re-evaluate my preference to hold 8-12 positions in my portfolios. Did you also research this aspect for your system? Clearly with lots of small positions one big hit isn't going to be noticed and with so many positions you're almost certain to get into most of the best trends of any period. Now I have to research this myself. More work to do.

#3 This is a quote of @peter2 about trading a larger position portfolio
Thank you @Skate. I like to highlight the unpalatable moments such as the recent losers in the ASX40P portfolio. It's all to easy to post when things are going well and stroke our own egos. Had I started the research portfolio (ASX40P) a few weeks earlier it would have contained FMG and a few gold stocks. It may have been fully invested and most likely wouldn't have had BLD and BIN. The timing was unlucky. Timing plays a huge part in the performance of a portfolio.

#4 This is a quote of @peter2 about trading a larger position portfolio
Well, @Skate that's a substantial request. I will write an opinion piece on the optimum number of positions in an ASX share portfolio. It has exceeded my expectations. I was/am pleasantly surprised by the results. One benefit and advantage of the 40 position size is that it forced me to include positions outside my normal stock universe.

#5 This is a quote of @peter2 about trading a larger position portfolio
Comments from a stunned mullet: There's no doubt that a 30+ portfolio, that is actively managed will thump any index, provided the positions are diversified throughout the whole market. You are unlikely to get this out-performance sticking to the top 300. A couple of benefits from a 30+ position portfolio. I may have mentioned them before but by repeating myself I may get it into my thick head. It's easier being patient with a lot of trades when the portfolio is going well. The second benefit of a large number of positions is that I'm more willing to start a trade in a perceived "riskier" stock. This seems too easy, doesn't it. I'll admit I'm finding it tough to start so many positions in my own accounts. The evidence is here in this thread, but I tend to hit resistance at 16 positions even though there's plenty of cash available.
@peter2 when I first posted about my Hybrid 40 position portfolio in the 'Dump it here' thread most was sceptical that running such a high number of positions "goes against normal conventions" reinforcing that the strategy wouldn't beat a index but to your credit you stated "Clearly this has been challenged by skate's work" deciding to give the idea a go with your "ASX40 POS Portfolio"

@peter2 - shift his opinion after trading a 40 position portfolio
(a) "My knowledge and experience would say that a portfolio with 50 positions would not beat the market index"
to
(b) "It has exceeded my expectations. I was/am pleasantly surprised by the results. There's no doubt that a 30+ portfolio, that is actively managed will thump any index"

END

----------------------------------------

# Let me explain further
Pyramiding of positions (increasing bet sizes with closed profit is beneficial to the profitability of any strategy. If you are in any doubt, look back at my equity curve over the last couple of years (The equity curve has been posted only a few posts back)

"Pyramiding Explanation"
(positionSize)
Pyramiding my positionSize is a re-balancing technique to vary my position sizes (my next series of bets) with the reinvestment of profits. I'm a TRUE believer in "pyramiding" my Position-sizing (I've discussed many times in the "Dump it here" thread) "Position-sizing Pyramiding" is to re-balancing my weekly position-sizes (bet sizes). By "Pyramiding (re-balancing) my PositionSizes" every dollar (I call them soldier) is put into the battle to fight the good fight.

How?
Position-sizing uses my trading Bank balance - the Bank feed is sent to a parameter setting within the AFL strategy code. It's simply a way of putting every dollar to work.

What is the Re-Balancing Formula?
Trading Bank Balance/outstanding positions = new "PositionSize"
This will now be the new bet for each & every pending trade (the new PositionSize also calculates the number of shares to buy in the pre-auction)

Skate.
 
There has been an absolute semi trailer load of information (gold) dumped in the last dozen or so threads. Thanks skate for your generosity and willingness to share, and thanks to the other posters asking the right questions to unearth more gems.
As soon as I get a reprieve from work I'll buckle down into more indepth study and Amibroker testing.
 
Star.jpg @Skate the results are simply incredible.

After try to break it by changing the moving average period significantly on HI and LW ref and BB periods, as well as switching from weekly to daily on all variations, I haven't found a single negative year or unspectacular result on any backtest. It indicates extreme robustness.

In fact it seems too good to be true.

The results confirm your strong view that exits are so important to minimise open profit loss and drawdown. You've really nailed that area. Wow, super impressed.
 
Hi Skate, I have just been back testing your Bollinger Breakout System and have noticed that the buy price is the open of the signal bar?
The indication on the chart is correct just not in Analysis window.
 
Last edited:
Just noticed when I do an explore with dates the buy offer is correct with the close of the signal bar . Just that on the back test in the results the open of signal bar is used.
I changed the buy price in the back test to the close of the entry signal as the buy offer is 3% of that.
 
Last edited:
Hmmmm, including trade delays. That makes a big difference. Well spotted @willoneau
Should have spotted that with trades such as
TLM Open Long 19/06/2020 0.115 19/06/20200.135 17.39%
CDV Open Long 19/06/2020 0.44 19/06/20200.595 35.23%
SPT Open Long 19/06/2020 0.7 19/06/2020 1.47 110.00%
 
Top