Australian (ASX) Stock Market Forum

Dump it Here

In terms of back-test validity and potential future viability, the Hasard Cat Daily Strategy may just be as valid as any of the other back-tested systems in this thread - the truth lies in applying an actual statistically significant period to the back-tests.
no argument on that AND THIS IS NOT A PERSONAL ATTACK:
but I do not believe the system you mentioned with random selection of 50 stocks from xao exiting on average after 10d will give you anything like what you show.
in the time period you mentioned 1/01/2020 to 7/01/2021 (the period you indicated) , the XAO went from 6855 to 7024;
That is obviously an average with a small obviously survival bias so higher than real life experience

As you have a relatively significant sample of mostly fully invested stocks as per your entry selection(1/20th stock are a buy so you will be fully invested statically nearly all along), you should get the average return of 2.4% or so, sure stats can play a bit around but with few stock takeovers and diseappearances I seriously doubt you will get any such example result , especially your MC runs.
Nowhere even in the order of magniture near 76% return unless you have an error in your code or its execution, like still investing 50x$2k during drawdown o similar error
Statistically, it is so unlikely and such an outrageous outlier that I will not even code it ..If someone has enough time to play, please do code it independently and tell us if the result are even above 5% return (average with MC runs)
I' d be surprised
with all respect, I do not believe such post is really helpful for the beginners
 
In terms of back-test validity and potential future viability, the Hasard Cat Daily Strategy may just be as valid as any of the other back-tested systems in this thread - the truth lies in applying an actual statistically significant period to the back-tests.
but it is not.....
 
I believe @Trendnomics is referring to the fact that many many systems are showing fantastic results for this year post crash however if one was to test those same systems against a wider timeframe the results may be vastly different. Hence the use of a cheeky dartboard method in the backrests (random entry and exit signals ?)
Sure, cheeky but not real, so my issue;
better use a real example let's say from mid march to jan 2021 where I am sure a dart throwing monkey would cash enough to drive a ferrari.
 
but it is not.....

Trendnomics is right. I get similar results. This gets you in the ballpark.


Optimize("MC run #", 10, 1, 2000, 1);
PositionScore = Random();

PosQty = 50;
PosSize = 2000;

SetOption("CommissionMode", 1);
SetOption("CommissionAmount", 0.1); // 0.1% some brokers, not Commsec
SetOption("InitialEquity", 100000);
SetOption("MaxOpenPositions", PosQty);
SetPositionSize( PosSize, spsValue);

SetTradeDelays (0,0,0,0);

Buy = 1;
BuyPrice = O;

Sell = 0;
SellPrice = C;

ApplyStop(stopTypeNBar, stopModeBars, 20, exitatstop = 0, 0);


I didn't spend any time optimising the only parameter used. Didn't wait for 2000 MC runs either.
Would be a waste of time, a system that can pick any ASX microcap in this type of market.
 
hum, ok, I bite the bullet: here is random monkey test
that is the code:

TimeFrameSet( inDaily );
//settradedelays( 1, 1, 1, 1 );
// Trading system
initialEquity = 100000;
Optimize("MC run #", 10, 1, 2000, 1);
PositionScore = Random();

PosQty = 50;
PosSize = 2000;

SetOption("CommissionMode", 2);
SetOption("CommissionAmount", 10);
SetOption("InitialEquity", 100000);
SetOption("MaxOpenPositions", PosQty);
SetPositionSize( PosSize, spsValue);



RoundLotSize = 1; // No fractional shares
SetOption( "AllowSameBarExit", False );
SetOption( "AllowPositionShrinking", False );
SetOption( "MCEnable", 1 );
SetPositionSize( 100 / PosQty, spsPercentOfEquity ); // Fixed Fractional Sizing

//Rank the stocks when multiple signals occur
PositionScore = Random()*1000;

SetTradeDelays (0,0,0,0);

Buy = Random()< 0.05;
BuyPrice = O;

Sell = Random() >= 0.9;
SellPrice = C;

and that is the result, even worse than I thought but with 1330 trades we get $26000 brokerage? so wo brokerage a 5% loss which is as expected, much more after brokerage
1610185311811.png
So our monkey on the 01/01/2020 to 07/01/2021 wold have had a 31% loss
MC :1610185457076.png
So in short, reality still exists and beginners: your back tests are actually still significant and meaningful;
CQFD in French: what had to be demonstrated...
So Mr Skate and usual followers of this thread, please carry on providing and analysing your backtests.
These are helpful and not complete BS
Have a good night
 

Attachments

  • test.afl
    1 KB · Views: 6
Hey QldFrog,

I don't think the MC results in the single test run are representative due to how MC works in AB. You have the optimize code in the afl which provides the more realistic view of what impact the randomised signals have. e.g
1610187982497.png

I feel like I'm defending @Trendnomics, but its really just that I believe the point they made regarding this years trading is something that's valid and should be kept in mind. Is the randomise entry/exit system the best example? maybe not, were the posted results from a cherry picked run? maybe so. But for a more *real* example, I coded up Skate's Flying Pelican Daily strategy from the other week, this years results were fantastic, longer term not so much (This is obviously not @Skate 's actual code, but my coding based on his description of entry/exit and some other entry/exit conditions added).

1610189705721.png



To your point about beginners and validity of backtest results, I do agree there's value there, be it learning or comparing results during comparative timeframes or live trading versus paper. And I'd add that if someone new takes away from this convo an awareness that testing should be done over a better sample of market conditions and subsequently save's themselves some big losses then great!.

cheers,
 
Hey QldFrog,

I don't think the MC results in the single test run are representative due to how MC works in AB. You have the optimize code in the afl which provides the more realistic view of what impact the randomised signals have. e.g
View attachment 118099

I feel like I'm defending @Trendnomics, but its really just that I believe the point they made regarding this years trading is something that's valid and should be kept in mind. Is the randomise entry/exit system the best example? maybe not, were the posted results from a cherry picked run? maybe so. But for a more *real* example, I coded up Skate's Flying Pelican Daily strategy from the other week, this years results were fantastic, longer term not so much (This is obviously not @Skate 's actual code, but my coding based on his description of entry/exit and some other entry/exit conditions added).

View attachment 118100



To your point about beginners and validity of backtest results, I do agree there's value there, be it learning or comparing results during comparative timeframes or live trading versus paper. And I'd add that if someone new takes away from this convo an awareness that testing should be done over a better sample of market conditions and subsequently save's themselves some big losses then great!.

cheers,
No denying that, thanks for the input you can run thst code as many times as you want, you will not get a winner, even less a 75pc gain...
we discussed here and in other threads how it is worthwhile running backtests on different selected periods: i personally have a script running backtests on around 30 or so intervals: dumb annual, dumb cumulative, and selected market conditions
Every person is then free to select his her preferences or how far in the past they see any relevance.
All issues widely discussed...
 
Speaking of Taleb, and Fooled by Randomness, and the frailty of humans...

dpong's WTT strategy did this from 2014 through 2016. THREE YEARS!!

1. Portfolio Equity.png

Nick's advice is to trade through the drawdowns. How can a mere human trade this?

Meanwhile, the overall market is doing this:

[Buy and hold would have outperformed for these 3 years.]

[Heck, even being in cash would have vastly outperformed.]

X6g1z1ss.png

And yet, 2014 through 2016 was but a small part of the journey to this:

1610206687032.png

In a way, the "right thing to do" would have been to continue trading the system. [Maybe.] But how could a mere human do that? And should he? I'm trading WTT and struggling with this eventuality. I mean right now it's great. But what will I do when the time comes? I'm not sure.

[Suggestions are welcomed.]
 
Last edited:
Speaking of Taleb, and Fooled by Randomness, and the frailty of humans...

dpong's WTT strategy did this from 2014 through 2016. THREE YEARS!!

View attachment 118103

Nick's advice is to trade through the drawdowns. How can a mere human trade this?

Meanwhile, the overall market is doing this:

[Buy and hold would have outperformed for these 3 years.]

[Heck, even being in cash would have vastly outperformed.]

View attachment 118104

And yet, 2014 through 2016 was but a small part of the journey to this:

View attachment 118105

In a way, the "right thing to do" would have been to continue trading the system. [Maybe.] But how could a mere human do that? And should he? I'm trading WTT and struggling with this eventuality. I mean right now it's great. But what will I do when the time comes? I'm not sure.

[Suggestions are welcomed.]
1) are we highjacking this thread?if mr Skate want to move us aside, i would understand but your post is quite worthwhile.
2)the way i see it:
It is a very personal approach so may not fit everyone.
-when designing, i ensure that down times are not catastrophic so my systems are not optimised to be stellar either
- try to have different systems running in parallel which can benefit from all situations

Look at overall system performance and potentially increase or reduce slightly the respective amount..but your losing systems will naturally be smaller and winning systems bigger..the beauty
That way you can still have long underperformance periods and sleep well.
As long as backtests match real trading for most parts, you should be able to stay invested.
As noted in my thread,one volatility US system has benn a heavy looser since inception but in other situations,it could be a stellar winner. i keep it as you would pay an insurance premium.

other people would close all but best performing and run like that...
Gambling spirit or not?
hope it helps
 
Speaking of Taleb, and Fooled by Randomness, and the frailty of humans...

dpong's WTT strategy did this from 2014 through 2016. THREE YEARS!!

View attachment 118103

Nick's advice is to trade through the drawdowns. How can a mere human trade this?

Meanwhile, the overall market is doing this:

[Buy and hold would have outperformed for these 3 years.]

[Heck, even being in cash would have vastly outperformed.]

View attachment 118104

And yet, 2014 through 2016 was but a small part of the journey to this:

View attachment 118105

In a way, the "right thing to do" would have been to continue trading the system. [Maybe.] But how could a mere human do that? And should he? I'm trading WTT and struggling with this eventuality. I mean right now it's great. But what will I do when the time comes? I'm not sure.

[Suggestions are welcomed.]
Just want to add: it is VERY healthy to think about thos eventuality now, before the heat and angst of the action.
Document your thoughts and have a plan.easier to apply ecisting plan than designing one when **** happens.
Have the plan coded in your systems if you can to reduce emotions during execution
 
are we highjacking this thread?
On the contrary, the interaction, banter & graphics is how we learn. Every poster brings a new perspective to trading as we see everything through our eyes & lived experiences.
In a way, the "right thing to do" would have been to continue trading the system
Have the plan coded in your systems if you can to reduce emotions during execution

Trading is full of uncertainties. Nick once said (paraphrased) - Your strategy needs to have a mathematical advantage by "winning more when you win" than you "lose when you lose". Trading a system professionally developed & tested should give you the confidence to push through the bad times. Confidence, allows you to keep pulling the trigger, stepping up to the plate. "Confidence is the key to trading successfully"

Skate.
 
No denying that, thanks for the input you can run thst code as many times as you want, you will not get a winner, even less a 75pc gain...

Your code, 50 MC runs. Can't fit more on a page.

Average return 40% or $40,000
Highest: $1.8 Mil
Lowest: -$10,000

Qldfrog.jpg
 
Speaking of Taleb, and Fooled by Randomness, and the frailty of humans...

dpong's WTT strategy did this from 2014 through 2016. THREE YEARS!!

View attachment 118103

Nick's advice is to trade through the drawdowns. How can a mere human trade this?

Meanwhile, the overall market is doing this:

[Buy and hold would have outperformed for these 3 years.]

[Heck, even being in cash would have vastly outperformed.]

View attachment 118104

And yet, 2014 through 2016 was but a small part of the journey to this:

View attachment 118105

In a way, the "right thing to do" would have been to continue trading the system. [Maybe.] But how could a mere human do that? And should he? I'm trading WTT and struggling with this eventuality. I mean right now it's great. But what will I do when the time comes? I'm not sure.

[Suggestions are welcomed.]

I don't think people would trade through a 3 year draining of your equity. You can weather a system drawdown if you have confidence that it will recover. Looking at that chart I would say there is something fundamentally wrong with the system. Was that Radge's WTT code modified or someone's own coding of the WTT? Either way, I would've thought that a filter (which Radge usually employs) would stop the bleed from the account. The code I have bought from Radge had a filter and was on the conservative side, mostly because the majority of clients can't handle a 20% drawdown. I think even Radge would have rethought the system reliablity with that kind of drawdown as he is about the numbers. When you start having multiple deviations way from what is expected and shown in backtests, there is a fundamental error somewhere. I like to develope my systems over rather benign period, try not to optimize anything if I can. Then run it against an event or bad years (2008, 2014, 2018, 2020). It's easy to get a system that worked great in, say 2009, its a lot harder to have an un-optimized system that runs goood most years and avoid ruin in big negative market events.
 
Your code, 50 MC runs. Can't fit more on a page.

Average return 40% or $40,000
Highest: $1.8 Mil
Lowest: -$10,000

View attachment 118106
Nope my code my run negative as much as you try...
And if you just think about it make sense as xao is the average so obviously if you randomly pick the average you get it back..
Step back out of your focus and think about it.just that back step view.
i might have a clue at what you do: you reinvest 2k on 50 positions all the way down and up the chart and yeap as you put extra money all the way you should get around 40pc...from your low....
Can not help further.
 
I don't think people would trade through a 3 year draining of your equity. You can weather a system drawdown if you have confidence that it will recover. Looking at that chart I would say there is something fundamentally wrong with the system. Was that Radge's WTT code modified or someone's own coding of the WTT? Either way, I would've thought that a filter (which Radge usually employs) would stop the bleed from the account. The code I have bought from Radge had a filter and was on the conservative side, mostly because the majority of clients can't handle a 20% drawdown. I think even Radge would have rethought the system reliablity with that kind of drawdown as he is about the numbers. When you start having multiple deviations way from what is expected and shown in backtests, there is a fundamental error somewhere. I like to develope my systems over rather benign period, try not to optimize anything if I can. Then run it against an event or bad years (2008, 2014, 2018, 2020). It's easy to get a system that worked great in, say 2009, its a lot harder to have an un-optimized system that runs goood most years and avoid ruin in big negative market events.
Thank-you for your thoughtful reply. I coded this WTT strategy attempting to stick exactly to what Nick outlined in his book Weekend Trend Trader. Of course there was some interpretation involved, but I am convinced it is true to what was described in the book. No deviations.

I don't have Nick's code. Could you do me a favor and simply explain on what the filter is based? Equity drawdown or... ? I'm kind of new to this, though I have been live-trading my WTT system (written on a different platform) for just over 1 year. I am eager to learn as this is why I joined ASF.

Thanks,
dpong

[Nick's backtest in the book goes to Nov 2012.]
 
Thank-you for your thoughtful reply. I coded this WTT strategy attempting to stick exactly to what Nick outlined in his book Weekend Trend Trader. Of course there was some interpretation involved, but I am convinced it is true to what was described in the book. No deviations.

I don't have Nick's code. Could you do me a favor and simply explain on what the filter is based? Equity drawdown or... ? I'm kind of new to this, though I have been live-trading my WTT system (written on a different platform) for just over 1 year. I am eager to learn as this is why I joined ASF.

Thanks,
dpong

[Nick's backtest in the book goes to Nov 2012.]

it's been a while since I've read Radge's book (where I believe he describes the WTT and other strategies).

A filter is a broad term. I use a few of them, as I know a number of members here.

Filters I use:
  • Index filter (index must be 'up' in order to trade. need to chose appropriate index that represents the universe of stocks you are trading)
  • Price filter (a min/max of price allowable. I wont buy shares less than 5c per share. They are too illiquid. I also don't buy stocks too expensive, it's a lot harder for a $20 stock to move 20% than a 5c share.)
  • Volume filter (a minimum number of shares traded. Often combined with Price Filter for similar reasons, the liquidity of stocks).
  • Momentum filter (Already has a certain amount of established momentum before you can enter. Using ROC (rate of change) within AB for this one).
Code:
// Variables  //
VolumeTotal = V;
VolumeMA = MA(V, 10);
PriceF = Close > 0.05 AND Close < 10;

// Index Filter //
SetForeign( "$XAO.au" );
Index_Up = C > MA(C, 10);
RestorePriceArrays();

My buy conditions are used in conjunction with the filters.

Code:
Buy= MapBuyCondition AND PriceF AND Index_UP;

In this code above, as long as my MapBuyCondition (which are my buy rules) is true, with the PriceF being true (price range defined further above) and the index (XAO in this case) is up, defined as a close above a 10 period moving average).

My sell condition is simply a close below a MA. You could make the system sell as soon as the Index_UP == False, which is immediately moving to cash as soon as the market is no longer 'Up'. I don't do that, I do this instead:

Code:
//--------------------- Sell --------------------- //
Exit_Percent = IIf( Index_Up, 40, 10 ); //Dynamic index filter
ApplyStop( stopTypeTrailing, stopModePercent, Exit_Percent, ExitAtStop = 2 ); //Trailing stop

This is a dynmaic stop. If the market is 'down' as I have defined it, I adjust my trailing stop to 10% not the usual 40%. Why? Because in a down market stocks are likely to continue moving down so giving it wider range with a 40% trailing stop would just bleed my money (sometimes like a massive hemorrhage) .

Hope that helps ya mate. Add in a few filters and I'm sure things will improve. I see filters as a protection against loss capital. You can go overboard with filters too. Adding rules to a system will often increase the metrics, but you can go too far where it will take few trades. I suggest sticking to an index filter on a weekly system (doesn't work well on a daily system tbh). And establishing a minimum price is also a good idea. Check your positionscore too. That, too, can also make or break a system's edge (having rules is great, but deciding which trades to take over others will impact your mathematical edge).
 
Nope my code my run negative as much as you try...
And if you just think about it make sense as xao is the average so obviously if you randomly pick the average you get it back..
Step back out of your focus and think about it.just that back step view.
i might have a clue at what you do: you reinvest 2k on 50 positions all the way down and up the chart and yeap as you put extra money all the way you should get around 40pc...from your low....
Can not help further.

I didn't ask for your help. I ran YOUR code and posted the 50 MC runs from it.
But I know why you get your results.
 
Top