How To Use The Amibroker Backtest To Generate Your Trading Signals

Adrian Reid walks through using Amibroker's backtest feature to generate trading signals. He covers artificial future bars and how to think about position sizing when you're building a trading system.
Chapters
So what happens when you run the back test to generate the signal is, do you remember the thing where you tick the box in Amy in the analysis settings to add artificial future bar to see tomorrow's trade picks? You remember that? Okay, so what that does because we don't have tomorrow's data when we run our scan today, our back test today. So Amy Broker takes today's price bar and copies it to tomorrow and then back test through to tomorrow with that one fake bar. So what that allows it to do is show you there was a trade executed tomorrow because it's added a fake future bar and you can see the trades that have executed on that future bar. If you didn't do that, there would be no trade, no signal for tomorrow.
Now the trick is that it takes today's bar in total and copies it to tomorrow temporarily. So the open and the close of the fake tomorrow bar is from today with me so far. Right? So let's imagine the stock today it traded at, it opened at $5 and closed at $10. Just imagine that. Open at 5, close at 10. Amy Broker takes that bar, copies it to tomorrow, and when it runs the backtest, it's entering at the open tomorrow.
So what price is it? It does the back test, assume you're going to get 5 price is the stop actually trading at 10. Okay, so when you look at the back test signal for tomorrow, you look at the value of the trade, not, not as much the number of shares. Most of the time the price doesn't move that much from open to close. So the next day you'll get roughly the right number of shares. But sometimes if the stock moves a lot in one day, then on the next day, the number of shares calculated won't look, won't be right. Okay, so we, we do our position size in the backtest using set position size with SPS percent of equity. So if you've got $10,000 and you're doing 5% of equity, it's $500. It's a dollar amount, it's not a number of shares amount. So whatever the share price is on the day we open it, we're trying to get the $500 worth. The backtest gives us an indication of what it thinks the number of shares will be. But it's based on old data.
So this is particularly a problem with the, in the trade success system, not Launchpad. In the trade success system, there's a.
System called Weekly Unicorn Hunter. It trades once a week. And when you add the artificial future bar on a weekly system. You can. The weekly open is a Monday, the weekly close is a Friday.
The price can move a long way in a week. Right? So it's particularly. It's a bigger problem in that system, even because the open to close distance is further because it's a weekly system. And so when you're entering, you're buying, you need to think about, okay, what dollar value should this trade be? And therefore adjust back to the number of shares that you want to buy because of that. That's why in interactive brokers, the dollar value order type is useful to get.











