Australian (ASX) Stock Market Forum

Amibroker FAQ

Hi Chorlton --

Two possibilities come to mind --

1. Save the code in the /include subdirectory and have AmiBroker merge it into your new system with the #include directive. See page 120 of Quantitative Trading Systems.
2. Compile your stop loss as a dll, save it in the /plugins subdirectory, and call it whenever you need it. See Appendix A.

Will either of these work?

Thanks,
Howard


Thanks Howard,

I'll have a play and let you know if they work...... :)


All the best.....
 
This is my attempt at writing code that will calculate the highest value of the last 3 quarters (9 months), at the start of each quarter

Hi1 = Ref( HighestSince(Month()!=Ref(Month(),-9),H,1), -1 );

QuStart = ( Month()== ( 1 OR 4 OR 7 OR 10 ) ) AND ( Day() < Ref(Day(),-1) );

Hi = IIf(QuStart, Hi1, ValueWhen(QuStart,Hi1,1) );

Needless to say it doesn't work. Anyone got any suggestions ? Please :banghead:
 
Hello All,

I have a quick question regarding the AUTOMATIC ANALYSIS feature in AB.

If I click on PROFOLIO BACKTEST (Default), when testing my system I get a list of trades together with the total Results values for the Overall Profit, CAR, MaxDD, #Winners, #Losers, etc., which is what I would expect to see.

However, when I choose the option INDIVIDUAL BACKTEST, even though I get the complete list of all trades, the total Results for Overall Profit, CAR, MaxDD, #Winners, #Losers, etc all show 0.

Is this suppose to happen?

Any help much appreciated....

Chorlton
 
INDIVIDUAL BACKTEST

A quick look in help comes back with...

AA Settings -Report Tab

Generate detailed reports for individual backtests

This causes that in Individual backtest mode full report is generated and stored for every security under test. Note that this will slow down the test and take up quite a bit of hard disk space
 
A quick look in help comes back with...

AA Settings -Report Tab

Generate detailed reports for individual backtests

This causes that in Individual backtest mode full report is generated and stored for every security under test. Note that this will slow down the test and take up quite a bit of hard disk space

Hi SB,

I appreciate your reply and I also took a look at the manual but I couldn't find an answer to my specific question so hence the post.

When choosing [Individual backtest], I receive a detailed report as I expected but I assumed that the collective results for all the trades would also have been displayed at the bottom of the window. ie. #wins, #losses, etc etc.

For those who use AB, I'm just after some clarification as to whether this is correct.





I'd be interesed
 
Hello All,

With reference to Backtesting, AB offers many, many statistics as part of the Results of a BackTest. CAR, RAR, MaxDD, Recovery factor, Sharpe ratio, CAR/MDD, RAR/MDD, Profit Factor, Payoff ratio, etc etc to name but a few !!!! :eek:

As a result, I've after some suggestions from those who are experienced with both AB and System Development, as to which ones I should really focus on.

I appreciate that some of this is down to the individual but any general guidance would be most welcome.

So far, I've only really been concentrating on MaxDD, Sharpe Ratio, % Profit, # of Trades.

All comments welcome :)
 
Hello All,

With reference to Backtesting, AB offers many, many statistics as part of the Results of a BackTest. CAR, RAR, MaxDD, Recovery factor, Sharpe ratio, CAR/MDD, RAR/MDD, Profit Factor, Payoff ratio, etc etc to name but a few !!!! :eek:

As a result, I've after some suggestions from those who are experienced with both AB and System Development, as to which ones I should really focus on.

I appreciate that some of this is down to the individual but any general guidance would be most welcome.

So far, I've only really been concentrating on MaxDD, Sharpe Ratio, % Profit, # of Trades.

All comments welcome :)

Hi Chorlton --

I know you have a copy of Quantitative Trading Systems. Reread the parts that talk about defining your own objective functions.

The purpose of defining your own objective function is so that you will have confidence that the systems that rank best when you go through the walk-forward process are ones you will be comfortable with.

Thanks,
Howard
 
Hi Chorlton --

I know you have a copy of Quantitative Trading Systems. Reread the parts that talk about defining your own objective functions.

The purpose of defining your own objective function is so that you will have confidence that the systems that rank best when you go through the walk-forward process are ones you will be comfortable with.

Thanks,
Howard

Hi Howard,

Many Thanks for your comments...

I did create a basic outline of what I expected from my system but I will re-read those sections again to ensure that I have fully understood everything.

If I sit down and analyse things, I think the main reason for my recent questions is simply as a result of "information overload" !!

In the past when I was reading other posters threads on this subject, the basic outline of the steps involved seemed (dare I say it) relatively straightfoward & easy. However, as one digs below the surface and into the detail, it soon becomes obvious how many different factors "may" need to be considered.

As a recent example, when I took a look at the vast list of available backtesting statistics within AB, (some of which I've never even heard of before), I became concerned that I wasn't taking everything into account.

As a general note for anyone reading this post, who is just starting out on this journey, take my advice and be careful of this "information overload" otherwise you will very quickly start getting yourself into all kinds of problems which I think I am beginning to now do......
 
Chorton,

"information overload" !!

This is why I wrote above that having a look at the equity curve with your eyes is the most important.

Simply plotting the AB equity curve will display a picture of those statistics which is way better than looking at the numbers. If you see something you like, then have a look at those numbers which you can use further as shown in Howards bible! At this stage, my preference is huge profit with an equity curve as straight as a ruler pointing north :D

# of trades is important depending on how much time you have to trade.

SB
 
Chorton,



This is why I wrote above that having a look at the equity curve with your eyes is the most important.

Simply plotting the AB equity curve will display a picture of those statistics which is way better than looking at the numbers. If you see something you like, then have a look at those numbers which you can use further as shown in Howards bible! At this stage, my preference is huge profit with an equity curve as straight as a ruler pointing north :D

# of trades is important depending on how much time you have to trade.

SB

Hi Sir Burr --

Yes, an equity curve with a high annual return and low drawdown is desirable to almost all of us.

Plotting the equity curve and examining it visually is exactly the technique I recommend for choosing a good objective function -- see page 324 of Quantitative Trading Systems.

Thanks,
Howard
 
Hi Sir Burr --

Yes, an equity curve with a high annual return and low drawdown is desirable to almost all of us.

Plotting the equity curve and examining it visually is exactly the technique I recommend for choosing a good objective function -- see page 324 of Quantitative Trading Systems.

Thanks,
Howard

Hi Howard,

I certainly agree that the shape and the slope of the equity is important, but I don't think that one should be overly consumed by it. At the end of the day, the equity curve is constructed by many transactions executed in a specific sequence. The simple reordering of the sequence in which these exact same transactions execute could potentially result in totally different equity curves with potentially big differences in the end result, which is certainly not a reflection on the quality of the system.

AS an example, lets say that amongst the list of transactions offered up by the system, there is a hugh winner, returning 500% profit and the rest of the transactions (overall) are mildly profitable. If that huge winner is amongst one of the first few transactions to execute, the end result of the equity curve could well be a very big figure simply because the transactions that follow the huge winner would have benefited from a larger position sizing due to the profits accrued from that big winner.

On the other hand, if that huge winner is amongst the last transactions to execute, it is likely that the end result of the equity curve be a much smaller figure, due to the fact that the position sizing of those before it would be smaller.

Our systems cannot control the sequence in which these transactions execute. All that it can do is spit out individual transactions. I therefore prefer to analyse the building blocks of the equity curve, rather than the equity curve itself. I was thinking along the lines of using the statistical z-score as outlined in your book to compare the quality of the individual transactions generated from one system to the transactions generated by another. Using this form of comparison, it is possible for one to select a system with a "inferior" equity curve, but with "superior" building blocks, if you know what I mean.

Bingk6
 
G'day Howard,

Yes, an equity curve with a high annual return and low drawdown is desirable to almost all of us.
Almost? :)
What about the others?

Plotting the equity curve and examining it visually is exactly the technique I recommend for choosing a good objective function -- see page 324 of Quantitative Trading Systems.
oooops yes, good stuff. :xyxthumbs

Really, no more than 3 words are needed: "Read Howards Book", everything required is there. Would save loads of keystroking and we could
all go home. hehe :p:

SB
 
Hi Howard,

AS an example, lets say that amongst the list of transactions offered up by the system, there is a hugh winner, returning 500% profit and the rest of the transactions (overall) are mildly profitable. If that huge winner is amongst one of the first few transactions to execute, the end result of the equity curve could well be a very big figure simply because the transactions that follow the huge winner would have benefited from a larger position sizing due to the profits accrued from that big winner.



Bingk6

Hi Bing --

If a system is characterized by a few large winners, then the equity curve will not be smooth.

If the equity curve is smooth, then the order of the trades makes little difference.

Thanks,
Howard
 
Hi Bing --

If a system is characterized by a few large winners, then the equity curve will not be smooth.

If the equity curve is smooth, then the order of the trades makes little difference.

Thanks,
Howard

Hi Howard,

Yes, what you say certainly makes sense. Much appreciated.
 
I'm having a lot of trouble getting the IB data into Amibroker at the moment. I've tried everything I can find, followed all the tutorials and everything, and I'm not sure why it isn't working. I just keep getting this bubble flashing up in the bottom right hand corner, saying "symbol invalid, consult symbology guide". I've tried dozens of different symbol combinations I though might work as well, but nothing.

It also seems to need to ask to be continually connected as well, which doesn't seem normal. Any helpers? Because I'm pretty stumped. :confused:
 
I'm having a lot of trouble getting the IB data into Amibroker at the moment. I've tried everything I can find, followed all the tutorials and everything, and I'm not sure why it isn't working. I just keep getting this bubble flashing up in the bottom right hand corner, saying "symbol invalid, consult symbology guide". I've tried dozens of different symbol combinations I though might work as well, but nothing.

It also seems to need to ask to be continually connected as well, which doesn't seem normal. Any helpers? Because I'm pretty stumped. :confused:
For Oz stocks?

Are you using the ASX suffix... might be BHP.ASX or something like that
 
Should be something like XYZ-ASX

...and have you ticked "configure/tools/enable activex & socket clients" in TWS?
 
Top