Australian (ASX) Stock Market Forum

Dump it Here

On position sizing Skate, totally agree you have to be extremely careful with any optimising, aiming for generic but hopefully significant results across many market regimes and time periods.
One other important factor you've hinted before is position size itself. For a large portfolio, it may not be wise to trade the theoretical optimum for fear of moving the market, as you've mentioned here before.

It sounds like you spent many years working up your systems. If you're willing to share, how did you adjust parameters? (e.g. manual tweaking of parameters page, or careful optimising, or both?)

Process
It was an extensive process that involved 1,000's of hours. I did most of my testing while cruising around the world, the serenity was to die for & my wife just loved it. (2014 & 2016 World cruise, 2015 Cherry Blossom Cruise, Pacific Rim & all of Asia, I kept doing back to back cruises so I could work without interruption)

Challenge
To get the parameter just right was a challenge, optimising to get a base, than more coding, tweaking constantly. Most would realise one simple parameter just out of kilter & it will bring you undone in a big way. Choosing parameter values can be tricky.

Complexity of code
It depends on system & the complexity of code being used. Amibroker optimization methods work best in continuous parameter & Amibroker Backtesting needs static figures to find optimum values. My strategy is adapting in real time whereas optimisation & Backtesting is only useful on know past data.

Pre-auction
Amibroker backtesting has no ability to operate in the pre-auction, where this is the heart of the strategy. I've explained & shown pictures of the simplicity of my strategy, push one [Explore] button & it reports (a) what to buy (b) Qty of shares to buy & (c) what to offer in the pre-auction. There is nothing flashy in the way I trade. Also I don't use a static position sizing model, that's another issue Amibroker has in backtesting & system development.

Skate.
 
My development days are over, I have 3 Norgate licences (Silver package only). When I was in the Strategy development phase I had the advantage of the Platinum package with 25 years of historical Data that included access to delisted securities and historical index constituents.

F.Y.I (Silver Package)
Norgate Data - Stock Market Silver Packages: Has access to currently-listed equities (and all other listed security types), indices & current index constituents with 10 years of historical data. (from June 1992 on)

If you unsubscribe to Norgate data, do you lose the data you've already downloaded?
 
If you unsubscribe to Norgate data, do you lose the data you've already downloaded?

Yes, I had purchased the Historical package originally. Transfering to NDU its a completely different Data subscription packages.

You start fresh with NDU. They credit any unused Data that has he prepaid & turn it into a discount when the new subscription is purchased.

Skate.
 
Yes, I had purchased the Historical package originally. Transfering to NDU its a completely different Data subscription packages.

OK. I noticed under AmiBroker data options, there are several and many require running an import tool. Presumably that data then lives inside ABs database somewhere. I assumed Norgate Data was the same, in which case, once your Norgate subscription had finished, its downloaded data would still be available somewhere within AB. Based on what you're saying, this isn't the case?
 
OK. I noticed under AmiBroker data options, there are several and many require running an import tool. Presumably that data then lives inside ABs database somewhere. I assumed Norgate Data was the same, in which case, once your Norgate subscription had finished, its downloaded data would still be available somewhere within AB. Based on what you're saying, this isn't the case?

"I assumed Norgate Data was the same, in which case, once your Norgate subscription had finished, its downloaded data would still be available somewhere within AB. (Wrong) Based on what you're saying, this isn't the case (Correct)"

Norgate uses a new data "format". The old data is incompatible with the new plugin & downloader. (NDU)

Skate.
 
About the number of positions:
The way i see it:
If you have a perfect scoring methodology and a binary buy: we are sure of a win, why indeed limit ourselves, the more the better and the safer should a black swan happens on one of our selection.
But we do not lvie in such a nice binary world.
our buy signal is an indication and the score is an order of purchasing priority.
By limiting our buy numbers overall we reduce the lower score entries.it becomes basically another parameter in the buy trigger...
with a more stringent buy, the number of positions could be illimited.it should also improve the overall results
So yes you can get 50 positions..with a well rehearsed system
 
@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?

Three entry strategies would get you into trends earlier than most and you mentioned that you're not doubling or tripling up when multiple systems select the same stock. I would accept that your exit strategies would exit slightly earlier than most trend following exits. 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.
 
"I assumed Norgate Data was the same, in which case, once your Norgate subscription had finished, its downloaded data would still be available somewhere within AB. (Wrong) Based on what you're saying, this isn't the case (Correct)"

Norgate uses a new data "format". The old data is incompatible with the new plugin & downloader. (NDU)

OK. Thanks for that.
 
1. I trade the All Ordinaries (XAO)
2. A single run backtest from 1 July 17 to 30 June 2018 - sure no problems (it's 1.29pm lunch is due & after lunch I'll post them)

Skate.
@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?

Three entry strategies would get you into trends earlier than most and you mentioned that you're not doubling or tripling up when multiple systems select the same stock. I would accept that your exit strategies would exit slightly earlier than most trend following exits. 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.

From what you describe...our style is very very similar :)

I can sense just how eager you are so sure go ahead if you're willing to share why not ;) , perhaps go with first week of July 17. And perhaps pick another week which shows the entry for your biggest winner.

What universe do you trade.. as in All ords xao, top 300 xko, etc?

And another idea if you are willing to share perhaps a single run backtest from 1 July 17 to 30 June 2018, showing return, drawn down, # of trades, percent winners, ave win %, ave lose %. No probs if not.

(re-post)
I shouldn't have to repeat my posts but for others who may not have read them - I'll reference the post in answering questions.

peter2 said
"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"

(peter2) 1. "most trend following systems indicate 15 - 17"

Admittedly a single trend following system rule of thumb is around 15 to 20 positions & just because the majority share that view doesn't automatically make it the correct position size for my 3 system Hybrid Strategy trading a large account.
Tribal views of the majority (re-post) Jan 4, 2019#625
Wrong does not cease to be wrong because the majority share in it

(peter2) 2. "most people happy to use 20"
That's okay, what suits one may not suit another, whereas I'm happy to use 40
Alternative view (re-post) Jan 30, #1348
When it comes to trading there is no right or wrong way. If you disagree with me, don't tell me so, you'll hurt my feelings, all I ask is for you to explain your alternative view, keeping "on point".

Hybrid Strategy
My hybrid strategy is a combination of 3 systems & all are trend following systems. Classic trend following systems have a common thread that I have listed just below, their parameters settings dictate the entry & exit points & overall trading results.

Classic trend following (re-post) Jan 30, #1365
The setup and exits are classic trend following signals. Enter on a confirmed uptrend, exit when the trend turns down.

I'm a classic trend follower (re-post) Feb 7, #1494
I enter on a confirmed uptrend, exit when the trend turns down. I jump on breakout & ride the trend till it's ends. It's a simple method of trading that I find profitable.

Trend following is popular (re-post) Jan 30, #1349
The only real issue with trend following is that most Trend following Systems are highly correlated and tend to track the broader market movements at the same time.

(peter2) 3. "Why is there such a difference if all systems are trend following systems? - I fail to understand why there's a huge difference in the optimal number of portfolio positions between apparently similar systems"

Explanation

First, all trending following systems are not the same, there are some systems that are better when it comes to accuracy & some pickup the breakouts signals sooner. The same trend following system with different parameters settings will give different trading results. Doing the same as everyone else gives you no edge when it comes to trading. With a large trading account 'Slippage & Liquidity' are a constant source of irritation.
Lousy picks (re-post) Dec 17, 2018#32
All investors will buy their fair share of both good and bad stocks. Even the best investor has plenty of lousy picks along the way, but it is the manner in which you handle those investments after their purchase that ultimately determines your level of success. If you sell your good stocks too early and hold on to your bad stocks too long, it doesn’t much matter how good your stock selection might be.

(peter2) 4. "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"

I have been a trader for a short 3 1/2 years so my trading experience is limited. In my defence I have worked extremely hard to develop my Hybrid Strategy. F.Y.I. my backtesting results mirror my actual trading results. I've previously posted my equity curve to indicate trading has not been a smooth ride, but profitable.

REAL equity curve
(re-post) Jan 17, 2019 #890
I have posted my "REAL equity curve" before on this thread but the chart is current as of last Friday - this week is panning out great. The equity curve is from January 2016 (I started trading July 2015 & didn't keep midyear records preferring to start the year off fresh) Have a look at every dip, that cost me an absolute fortune (to me at least)

UPDATED today 13th February 2019 (results reflective as of Friday 9th February 2019)
Equity curve Capture.JPG

Would I share single run backtest
After explaining my Hybrid strategy back on 17th January @willy1111 asked if I was willing to share a single run backtest from 1 July 17 to 30 June 2018, showing return, drawn down, # of trades, percent winners, ave win %, ave lose %.

Response
A single run backtest from 1 July 17 to 30 June 2018 - sure no problems

The challenge Post # 867
https://www.aussiestockforums.com/posts/1010309/

The Backtest Results Post # 871
https://www.aussiestockforums.com/posts/1010315/

The backtest report (The report had fixed parameters for demonstration purposes)
$600,000 Portfolio
40 positions
Fixed $15,000 positions

The FACTS of the way I trade
My trading portfolio (in excess of $1m)
Variable position sizing (38 to 53 positions)
Variable $15k to $50k positions sizes (have taken a few 100k & 200k positions)
I have posted a true & accurate Trading Equity curve (Jan 2016 to current as above)

(peter2) 5. "I'm trying to understand the difference between 17 and 53"

A picture paints a thousand words
Let me display a backtest result for my Hybrid Strategy using 5, 10, 15, 20 & 40 positions & let you be the judge. I'll use the same time period @willy1111 request for comparison in his previous post. (backtest is from 1 July 17 to 30 June 2018) On the far right of the chart is the equivalent of buying & holding the All ordinaries (XAO)

2017-2018 Combined Position Trading Results Capture.jpg

I'm trust this sheds more light on how I trade the Hybrid strategy & how the strategy performs using a variety of position sizes & why 40 positions is my preferred position size.

Skate.
 
1-- Most would realise one simple parameter just out of kilter & it will bring you undone in a big way.

2-- Amibroker optimization methods work best in continuous parameter

1 - My experience is that when one tiny parameter tweak kills a system, the system lacks robustness.
2- What do you mean by continuous parameter please?
 
(re-post)
I shouldn't have to repeat my posts but for others who may not have read them - I'll reference the post in answering questions.

peter2 said
"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"

(peter2) 1. "most trend following systems indicate 15 - 17"

Admittedly a single trend following system rule of thumb is around 15 to 20 positions & just because the majority share that view doesn't automatically make it the correct position size for my 3 system Hybrid Strategy trading a large account.
Tribal views of the majority (re-post) Jan 4, 2019#625
Wrong does not cease to be wrong because the majority share in it

(peter2) 2. "most people happy to use 20"
That's okay, what suits one may not suit another, whereas I'm happy to use 40
Alternative view (re-post) Jan 30, #1348
When it comes to trading there is no right or wrong way. If you disagree with me, don't tell me so, you'll hurt my feelings, all I ask is for you to explain your alternative view, keeping "on point".

Hybrid Strategy
My hybrid strategy is a combination of 3 systems & all are trend following systems. Classic trend following systems have a common thread that I have listed just below, their parameters settings dictate the entry & exit points & overall trading results.

Classic trend following (re-post) Jan 30, #1365
The setup and exits are classic trend following signals. Enter on a confirmed uptrend, exit when the trend turns down.

I'm a classic trend follower (re-post) Feb 7, #1494
I enter on a confirmed uptrend, exit when the trend turns down. I jump on breakout & ride the trend till it's ends. It's a simple method of trading that I find profitable.

Trend following is popular (re-post) Jan 30, #1349
The only real issue with trend following is that most Trend following Systems are highly correlated and tend to track the broader market movements at the same time.

(peter2) 3. "Why is there such a difference if all systems are trend following systems? - I fail to understand why there's a huge difference in the optimal number of portfolio positions between apparently similar systems"

Explanation

First, all trending following systems are not the same, there are some systems that are better when it comes to accuracy & some pickup the breakouts signals sooner. The same trend following system with different parameters settings will give different trading results. Doing the same as everyone else gives you no edge when it comes to trading. With a large trading account 'Slippage & Liquidity' are a constant source of irritation.
Lousy picks (re-post) Dec 17, 2018#32
All investors will buy their fair share of both good and bad stocks. Even the best investor has plenty of lousy picks along the way, but it is the manner in which you handle those investments after their purchase that ultimately determines your level of success. If you sell your good stocks too early and hold on to your bad stocks too long, it doesn’t much matter how good your stock selection might be.

(peter2) 4. "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"

I have been a trader for a short 3 1/2 years so my trading experience is limited. In my defence I have worked extremely hard to develop my Hybrid Strategy. F.Y.I. my backtesting results mirror my actual trading results. I've previously posted my equity curve to indicate trading has not been a smooth ride, but profitable.

REAL equity curve
(re-post) Jan 17, 2019 #890
I have posted my "REAL equity curve" before on this thread but the chart is current as of last Friday - this week is panning out great. The equity curve is from January 2016 (I started trading July 2015 & didn't keep midyear records preferring to start the year off fresh) Have a look at every dip, that cost me an absolute fortune (to me at least)

UPDATED today 13th February 2019 (results reflective as of Friday 9th February 2019)
View attachment 92137

Would I share single run backtest
After explaining my Hybrid strategy back on 17th January @willy1111 asked if I was willing to share a single run backtest from 1 July 17 to 30 June 2018, showing return, drawn down, # of trades, percent winners, ave win %, ave lose %.

Response
A single run backtest from 1 July 17 to 30 June 2018 - sure no problems

The challenge Post # 867
https://www.aussiestockforums.com/posts/1010309/

The Backtest Results Post # 871
https://www.aussiestockforums.com/posts/1010315/

The backtest report (The report had fixed parameters for demonstration purposes)
$600,000 Portfolio
40 positions
Fixed $15,000 positions

The FACTS of the way I trade
My trading portfolio (in excess of $1m)
Variable position sizing (38 to 53 positions)
Variable $15k to $50k positions sizes (have taken a few 100k & 200k positions)
I have posted a true & accurate Trading Equity curve (Jan 2016 to current as above)

(peter2) 5. "I'm trying to understand the difference between 17 and 53"

A picture paints a thousand words
Let me display a backtest result for my Hybrid Strategy using 5, 10, 15, 20 & 40 positions & let you be the judge. I'll use the same time period @willy1111 request for comparison in his previous post. (backtest is from 1 July 17 to 30 June 2018) On the far right of the chart is the equivalent of buying & holding the All ordinaries (XAO)

View attachment 92141

I'm trust this sheds more light on how I trade the Hybrid strategy & how the strategy performs using a variety of position sizes & why 40 positions is my preferred position size.

Skate.

When looking at the results of the 15 Positions and 40 Positions, what I notice is the difference in exposure. 15 Positions has exposure of 37% whilst 40 Positions has exposure of 70%. I imagine it is to do with the fixed $15K position size whilst running the backtest.

I also imagine the results would be more closely aligned if you were to use Position code based on % rather than fixed $ as in SetPositionSize(2.5,spsPercentOfEquity); for 40 positions and SetPositionSize(6.66,spsPercentOfEquity); for 15 positions.

I realise this is not the way you trade, purely an academic/educational exercise for other members :)
 
1. A premise which is clearly probabilistic can be true, eg. most dogs are not called Rex.
1(a). As will all premises of a deductive argument if it is sound.

2. It's a guess to assume from only the conclusion that an argument is of one type rather than the other.

2(a). Put another way, an argument could be constructed such that new evidence presented (ie. not as in the original example) proved that only Ms Brown could have been the robber, as this was deduced (see comments at #3).


Not necessarily. For example, video footage of the robbery shows Ms Brown's face clearly, plus the gun she fired into the air. The stolen money and a gun was found in Ms Brown's red car. It was in fact found by police who had raced to the scene immediately an alarm was set off. Serial numbers on the stolen money proved it had only arrived that morning and was not for release that day. Rifling on the round dug from the ceiling proved the gun belonged to Ms Brown. Gun powder residue found on Ms Brown's gloves as she entered the car matched a subsequent round fired from the same gun by ballistic and forensic experts. Capping all this off was a signed confession which went into copious detail regarding her motives, planning, and execution.
Although some aspects of these events are probabilistic, others defy logical explanation unless Ms Brown was the actual perpetrator.

1. The premise would be contained within an inductive argument.
1(a). The premises of a deductive argument must be true.

2. No it is not a guess. A deductive argument is productive of necessary conclusions. An inductive argument has the capacity to produce probable conclusions only.

2(a). True.

ducati916 said:
3. Correct. And legal proof is based upon an inductive argument. You have the crime, which is the effect or outcome, you are reasoning backwards to elicit the cause [whodunnit].

What I should have stated was that 'in this example'....the legal proof is based upon an inductive argument.

jog on
duc
 
My comments are below
1. The premise would be contained within an inductive argument. Premises are in all arguments
1(a). The premises of a deductive argument must be true. Premises can be true or false
2. No it is not a guess. False - it cannot be known without seeing the premise/s.
A deductive argument is productive of necessary conclusions. An inductive argument has the capacity to produce probable conclusions only. You cannot preordain the type of argument. Without a premise there is no argument.
To conclude that "Ms Brown is the robber" without seeing the evidence would be a guess.
 
1 - My experience is that when one tiny parameter tweak kills a system, the system lacks robustness.
2- What do you mean by continuous parameter please?

1 - "My experience is that when one tiny parameter tweak kills a system, the system lacks robustness"
I'll take that as a comment as it bears no resemblance to what I've posted.

Challenge (re-posted)
To get the parameter just right was a challenge, optimising to get a base, than more coding, tweaking constantly. Most would realise one simple parameter just out of kilter & it will bring you undone in a big way. Choosing parameter values can be tricky.

2- What do you mean by continuous parameter please?
For a better understanding, substitute the word "with fixed parameters" in place of "in continuous parameter"

Complexity of code (re-posted)
It depends on system & the complexity of code being used. Amibroker optimization methods work best in continuous parameter & Amibroker Backtesting needs static figures to find optimum values. My strategy is adapting in real time whereas optimisation & Backtesting is only useful on know past data.

Skate.
 
Skate, can you define what you mean by fixed parameter please? Do you mean a single value of an array? When you choose a parameter, what exactly are you choosing?

When AB optimizes, it's finding the best fit value for an array, using historical data, yes? What do you mean by "adapting in real time"? The only data we ever have access to is historical. If I fit my code to any dataset, I'm fitting it to historical data. If I re-fit my code as each new OHLCV is printed, I will end up with an overfitted code - ie. one which will fail in real trading.
 
When looking at the results of the 15 Positions and 40 Positions, what I notice is the difference in exposure. 15 Positions has exposure of 37% whilst 40 Positions has exposure of 70%. I imagine it is to do with the fixed $15K position size whilst running the backtest.

I also imagine the results would be more closely aligned if you were to use Position code based on % rather than fixed $ as in SetPositionSize(2.5,spsPercentOfEquity); for 40 positions and SetPositionSize(6.66,spsPercentOfEquity); for 15 positions.

I realise this is not the way you trade, purely an academic/educational exercise for other members :)

1. "When looking at the results of the 15 Positions and 40 Positions, what I notice is the difference in exposure. 15 Positions has exposure of 37% whilst 40 Positions has exposure of 70%. I imagine it is to do with the fixed $15K position size whilst running the backtest"

Correct

2. "I also imagine the results would be more closely aligned if you were to use Position code based on % rather than fixed $ as in SetPositionSize(2.5,spsPercentOfEquity); for 40 positions and SetPositionSize(6.66,spsPercentOfEquity); for 15 positions. I realise this is not the way you trade, purely an academic/educational exercise for other members"

(a) I'm dumbfounded why you would want to trade a $600k account with 15 positions ($40k per position) ballooning out to (80k positions) within 12 months. The logic is missing on me. Talk about slippage & liquidity issues. This also creates issues of not being able to trade the backtest code in the pre-auction.
(b) $600k using 2.5% of Equity ($15k per positions) balloons to ($25k positions) within 12 months. Ballooning position sizing in itself can create additional issues with dire consequences.

3. "I realise this is not the way you trade, purely an academic/educational exercise for other members"

Lets do the exercise, so others can understand the difference between: (1) a 15/40 positions portfolio or (2) the difference between trading larger position sizes in dollars $15k/$40k positions or is it to show (3) that limiting a portfolio to 15 positions you're pulling the handbrake on so hard that it restricts the time in the markets, restricting your portfolio's performance

That's the equivalent of having a full time job & the boss cut your hours back so you have a part time job, no I'm not in favour of that, one little bit.


SetPositionSize(2.5,spsPercentOfEquity);
$600K 40 positions @ $15k positions
SetPositionSize(2.5,spsPercentOfEquity); Capture.JPG


SetPositionSize(6.66,spsPercentOfEquity);
$600K - 15 position @ $40k positions
SetPositionSize(6.66,spsPercentOfEquity); Capture.JPG

Summary

1. Net profit
2. Exposure
3. Annual Returns %

All items above (1), (2) & (3) are a direct reflection of bet sizing.

Skate.
 
Summary
1. Net profit
2. Exposure
3. Annual Returns %

All items above (1), (2) & (3) are a direct reflection of bet sizing.

Skate.

Precisely - and from an academic view - looking purely at the results of the backtest - reducing to 15 positions results in a much higher % return. An increase from 66.75% to 94.56% with less than half the amount of trades or work.

(a) I'm dumbfounded why you would want to trade a $600k account with 15 positions ($40k per position) ballooning out to (80k positions) within 12 months. The logic is missing on me. Talk about slippage & liquidity issues. This also creates issues of not being able to trade the backtest code in the pre-auction.
(b) $600k using 2.5% of Equity ($15k per positions) balloons to ($25k positions) within 12 months. Ballooning position sizing in itself can create additional issues with dire consequences.

Perhaps the above is the missing link other members are failing to understand between academic discussion of position size versus real world trading. The liquidity and slippage issues created by having larger positions.
 
Top