- Joined
- 28 December 2013
- Posts
- 6,392
- Reactions
- 24,319
Interesting post Captain!Back-testing to me has always been a waste of time as it can only be repeated in the exact same conditions
I did Chemistry in my Matriculation year and as any Chemist will tell you
All testing can only be done in a vacuum
Ie:No Weather and Sea Variations
ie No Climate Change
No Political Changes / Wars
No Covid /Bird Flu and Plagues etc
and then
Most importantly you have the Mental Health of each Captain ,his Crew their Wives and Children ,extended families and close friends
Come to think about it a lot more
"I don't think you could even do a respectable Back-test on trading in a Vacuum"
Crikey!
I hear People in NSW and QLD are experiencing 100 year floods based on statistics and some have had THREE (3) 100 year floods this year
So much for making the same % gains/losses as yesterday/ yester-month yesteryear/ and even decades ago
Has anyone here ever learnt anything from Back-testing?
View attachment 144189
Thanks Skate, apologies for posting in the wrong thread. I’ll get some more info and code then post it there later in the week. Cheers.@wasp your request for help should be directed to the Amibroker FQA thread - found here:
Amibroker FAQ
This thread is for fellow Amibroker users to help each other out. If there is a very specific project you are carrying out which is likely to deviate from a general faq type thread then you are welcome to start a new thread. There was some discussion of how to use Amibroker in one of the...www.aussiestockforums.com
Alternatively
Direct your question to the Amibroker forum - found here:
To get a quick response
When seeking help, from the Amibroker forum please include what you have done so far. They will need to see your work to offer any assistance. Make sure you explain "what you can’t get working", detailing the issue in depth. When you do this there will be someone who will help you out.
On the Amibroker forum make sure you follow the rules, especially these two
NOTE 1: Always use the Code Tags when posting code.
NOTE 2: Use the SEARCH feature (magnifying glass "top right" by your avatar) to see if something similar has already been discussed.
Skate.
Skate, nice post here along with your previous posts, you raise some interesting questions!Why Backtests Fail
It might come as a surprise, but most backtests produce wrong or misleading results on a mass scale. This is why you get a big surprise that your trading systems fail when traded live. Even with out-of-sample data or walk-forward analysis, backtest results are often "over the top" optimistic when reporting their results.
Think about it
If live trading mimicked the backtest results we would all be millionaires.
So what does this all mean?
In a nutshell, the majority of trading systems being backtested that exhibit positive results are in fact unprofitable.
Why so?
For one simple reason, the strategy has no statistical edge. The real dilemma is, how do we fix it?
Skate.
Great post @entropy. ThanksSkate, nice post here along with your previous posts, you raise some interesting questions!
I admire the energy you bring to this forum, long may it continue!
Let's start with the comment of a legend:
“It is remarkable how much long-term advantage people like us have gotten by trying to be
consistently not stupid, instead of trying to be very intelligent.” - Charlie Munger
How can we follow this advice, instead of trying to be too smart just try to be not stupid?
If a farmer is trying to sell off his geese that lay golden eggs are we stupid enough to buy them?
Even if the farmer is a top bloke: will he just sell us the eggs?
Where to start?
Stock prices are data presented to us in a time-series format.
From this data, and maybe combined with some other data, we want to make money.
What is the character of the time series data, this sequence of numbers we pore over?
Some people say the data alone are just random numbers and any attempt to make predictions using such a sequence of random numbers is futile: if you can predict random numbers just a little you would be the scourge of the casinos!
(Note: some people believe stock data is 'fractal', eg Nick Radge. Any discussion of random data could also include fractal data.)
If share prices data are randomly generated or a fractal then any mathematical operations applied to such time-series data such as addition, subtraction differencing etc etc will not be of any help to make the series.
Much of traditional statistics lore cannot be applied since the share prices are autoregressive ie a given value is highly correlated to the value at the previous time period.
Others say if the data are random how do you explain the obvious trends in the data that we see?
This question regarding randomness has been asked and also answered (sort of) here:
Is it possible to prove, if a sequence is random?
Consider following inputs: 1,1,2,3,5,8 - it isn't random 2,4,8,16,32 - this neither 4,1,2,11,5,9- this one looks like random-sequence I would like to ask if is there such algorithm to prove if ...stackoverflow.com
Basically, one can never prove a sequence of numbers is randomly drawn or not but one can get somewhere:
Just when one thinks we are on top of things:
Start of quote:
The seven states of randomness in probability theory, fractals and risk analysis are extensions of the concept of randomness as modeled by the normal distribution.
These seven states were first introduced by Benoît Mandelbrot in his 1997 book Fractals and Scaling in Finance, which applied fractal analysis to the study of risk and randomness.
This classification builds upon the three main states of randomness: mild, slow, and wild.
The importance of seven states of randomness classification for mathematical finance is that methods such as Markowitz mean variance portfolio and Black–Scholes model may be invalidated as the tails of the distribution of returns are fattened: the former relies on finite standard deviation (volatility) and stability of correlation, while the latter is constructed upon Brownian motion.
These seven states build on earlier work of Mandelbrot in 1963: "The variations of certain speculative prices" and "New methods in statistical economics" in which he argued that most statistical models approached only a first stage of dealing with indeterminism in science, and that they ignored many aspects of real world turbulence, in particular, most cases of financial modeling.
Wild randomness has applications outside financial markets, e.g. it has been used in the analysis of turbulent situations such as wild forest fires.
Using elements of this distinction, in March 2006, a year before the Financial crisis of 2007–2010, and four years before the Flash crash of May 2010, during which the Dow Jones Industrial Average had a 1,000 point intraday swing within minutes, Mandelbrot and Nassim Taleb published an article in the Financial Times arguing that the traditional "bell curves" that have been in use for over a century are inadequate for measuring risk in financial markets, given that such curves disregard the possibility of sharp jumps or discontinuities.
Contrasting this approach with the traditional approaches based on random walks, they stated:
We live in a world primarily driven by random jumps, and tools designed for random walks address the wrong problem.
Mandelbrot and Taleb pointed out that although one can assume that the odds of finding a person who is several miles tall are extremely low, similar excessive observations can not be excluded in other areas of application.
They argued that while traditional bell curves may provide a satisfactory representation of height and weight in the population, they do not provide a suitable modeling mechanism for market risks or returns, where just ten trading days represent 63 per cent of the returns of the past 50 years.
The difference ten days make:
By removing the ten biggest one-day moves from the S&P 500 over the past 50 years, we see a huge difference in returns.
And yet conventional finance treats these one-day jumps as mere anomalies.
End of quote.
Skate, your comments re failure of backtesting are valid in light of the last sentence!
I have attached the aforementioned pdf.
You can take it from me, even dud strategies will produce the equivalent of random results.
By removing the ten biggest one-day moves from the S&P 500 over the past 50 years, we see a huge difference in returns.
Nice presentation, Skate!Well, I finally got here
Understanding a backtest report is hard enough. But when it comes to comparing two backtest reports, life becomes a little more difficult.
Jumping to conclusions
Making a "quick judgment call" might have kept us alive back in the good old days from being eaten by a tiger but "jumping to a conclusion" is certainly not helpful when it comes to trading.
When comparing the backtest results
I can tell you with all certainty that "you will form an opinion straight away" without using any effort.
"Random" versus the "Pig"
The backtest reporting period is from the 1st of July 2015 to today (the actual time I've been trading). I'll use those dates for all my examples so there is no cherry-picking. The "LH backtest" is from a random entry, nothing fancy just using the MACD. The "RH Backtest" is my latest creation (Lipstick on a Pig Momentum Strategy) coded up only a few weeks back.
View attachment 144323
View attachment 144324
Skate.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?