Broker opsyen digital · Sejak 2016

Strategi

Backtesting a trading strategy: from a pretty chart to a demo test

Bacaan 9 minitDikemas kini Artikel 21 daripada 34

Backtesting a trading strategy: from a pretty chart to a demo test

On a finished chart, almost any strategy can look brilliant: here was a perfect reversal, there an obvious breakout. Backtesting a trading strategy is about checking whether you could have made those decisions in time and what the result would have been under the product’s real rules. Let’s look at how to build a test for digital options, where curve-fitting most often hides and how to move a hypothesis from a historical calculation to the intrade.bar demo.

First, state a rule that can be repeated

“Enter after a strong candle” is still an observation, not a testable strategy. Strong compared to what: the previous candle, the average body or the whole session? Is the decision made before the close or after? What expiry is chosen? If a new signal appears before the first trade ends, is a second one allowed? As long as the answers change from picture to picture, the result will depend on the researcher’s taste.

Take a practice hypothesis: on the five-minute chart, price closed above a zone marked in advance; the decision is considered after the close; the direction is Call; the duration is 10 minutes. This is not a ready-made profitable strategy, but an example of a description that can be tested. The way the zone is drawn, the amount, the acceptable payout and the reasons to skip are defined separately.

Save this version before you look at the result. If you use a manual assessment of context, explain it in words and examples. Subjectivity can be studied, but you can’t pass off a selection of good-looking pictures as a strict automated test. A good start is a situation that another person could find using the same rules without a hint about where the price went next.

Match the data to the precision of the trade

A daily candle won’t tell you where the price was ten minutes after your entry. Even a one-minute candle contains only the open, high, low and close. The order of movement between them is unknown. If a condition depends on the first touch within a minute, ordinary OHLC data may not be enough.

For a digital option, the actual moment of entry and the price at expiry are especially important. A 10:00 timestamp may mean the start of a candle, not its end. One service’s quote may be the last trade, another’s may be Bid, Ask or the mid price. A mistake in these details changes the outcome of a borderline trade, even when the lines on screen look the same.

When choosing data for intrade.bar, take into account the source of the relevant asset: FXCM is used for currency quotes and Binance for BTC/USDT. A similar BTC/USD from another source does not automatically replace that series. The historical data set must be comparable with the contract terms; if comparability is limited, say so in your conclusion rather than hiding the differences in rounding.

Before testing, check for gaps, duplicates, time zone, non-trading intervals and price precision. A missing quote must not be replaced with the nearest convenient price. Decide in advance how such cases will be handled and show how many there are. If the gaps fall mostly on sharp moves, the remaining sample already describes a different market.

Separate searching for an idea from independent testing

On the first stretch of history you develop the rule and fix inaccuracies. It inevitably becomes familiar. A second, later stretch is needed to test the frozen version. If you fit parameters over the whole chart and then present the profit on that same chart as proof, you get an exam with the answers on the desk.

Keep the time order. Randomly shuffling financial observations can carry information about future conditions into a past assessment. There is no universal split ratio or magic number of trades: what matters is signal frequency, dependence between results and the variety of market regimes. A hundred identical episodes from one morning are not necessarily more useful than a smaller but more varied sample.

Rules are tested on data they haven’t seen yet Sequential testing scheme · no universal percentage split Develop and freeze the rules Separate test sample New data and demo testing Changing the rules starts a new test.
Development and testing use different stages of the data. Once you have seen the results, the test stretch is no longer unknown.

After seeing the test stretch, you are free to change the hypothesis. It’s just that this stretch can no longer be treated as unknown. Freeze the new version and find a new test for it. If you honestly keep the failed versions, you will see how many attempts it took to get a nice result. This protects you from the impression that a winning set of parameters was obvious from the start.

Make sure the signal existed at the moment of entry

Imagine an indicator that marks the high of candle 8 only after two subsequent lower peaks have appeared. On a finished chart the mark sits above candle 8, but you can only learn of the confirmation after candle 10. Entering on candle 8 based on that mark uses the future. This kind of mistake can make a mediocre idea look impressive.

A similar trap occurs with a higher timeframe. The final close of an hourly candle is known at the end of the hour. It could not have been a final reference for a decision at minute ten of that same hour. In real time the value would still have been changing, so the historical calculation must reproduce the information available at the time.

An extreme’s confirmation can’t be moved back in time Sample · the high of candle 8 is confirmed only after 9 and 10 100 101 102 103 104 105 106 107 1 2 3 4 5 6 7 8 9 10 11 8: the high not yet confirmed 10: candles 9 and 10 now available Sample price Candle number
An extreme marker can sit in the past even though the basis for confirming it appeared later.

For a manual test, revealing the chart step by step helps: first you see only the past, write down your decision, then reveal the next stretch. Don’t draw in a level after you have seen the bounce. The chart won’t object to such improvements, but real trading doesn’t offer an “I would have entered here” button.

Calculate the result of a digital option, not a regular position

In a regular position, the money result depends on the size of the price move and the volume. With a digital option, what matters is the condition at expiry and the payout percentage known before opening. A successful move of one point and of a hundred points can give the same profit. That is why a Forex tester’s report can’t be carried over to binary options by simply renaming the columns.

Let the notional amount be 10, the profit on a win 85%, with no refunds or costs. A hundred trades with 55 wins and 45 losses give 55 × 8.50 − 45 × 10 = 17.50. With 54 wins and 46 losses, the result is −1. Getting most directions right does not yet mean a positive money result.

With a constant amount and a payout rate r, the break-even point of this model is 1 / (1 + r). For 0.85 that is about 54.05%. If the percentages varied, calculate each trade separately. Count refunds separately too: on intrade.bar, equal quotes mean the amount is refunded, not a win or a full loss.

An exact archive of historical payouts may not exist. Then the honest option is several explicitly notional scenarios, for example calculations at different fixed percentages. You get a sensitivity estimate, not an exact copy of a past account. The closer the result is to zero, the more even small differences in conditions matter.

Assess the path to profit and how fragile the parameters are

The same final plus 100 can hide a drawdown of 20 in one test and 400 in another. So you need the number of trades, the sequence of losses, the maximum drawdown and the distribution of results over time. Also state the maximum risk open at the same time: several related signals don’t become independent just because they are written on separate lines.

Check neighboring parameters, limiting the number of variants in advance. If an indicator period of 17 looks great while 16 and 18 are sharply unprofitable, find out why. It is also useful to look at the effect of an entry delay, a change in payout and a small shift of the zone boundary. The goal is to understand how precisely the conditions must be reproduced, not to find yet another accidentally pretty setting.

Breaking results down by asset or hour may reveal a useful difference, but it shrinks the groups. Picking the best pair out of twenty and the best hour out of twenty-four is already a lot of tests. Keep the other results as well. Otherwise the report will feature a champion of random selection who won’t repeat the performance on new data.

The intrade.bar demo: a concrete testing protocol

Let’s move the practice hypothesis about a close above a zone into the terminal. Choose an available currency pair, open the TradingView chart and fix the zone on the five-minute scale in advance. The practice trade amount stays the same. Before the signal, write down the rule: a decision only after a completed candle, one open trade, a duration of 10 minutes in Sprint, if it is available in the trade form.

After the candle closes, check three things: the condition really is met, the percentage shown matches the test’s assumption, and the actual price hasn’t moved beyond the acceptable entry zone defined in advance. If even one point isn’t met, record the skip and the reason. Don’t replace the ten-minute expiry with the nearest convenient one: that is already a different version of the test.

Record the actual opening time and price, the expiry, the amount and the percentage. The historical calculation may have used a notional entry exactly at the candle boundary, while you entered later by hand. Recording the difference is more useful than trying to reproduce a price that wasn’t available. intrade.bar has no early closing, so the expiry is chosen before the trade and not changed after the first unpleasant move.

After settlement, compare the result with the original scenario. intrade.bar statistics separate demo and real trades and show assets and expiries; closed trades can be exported to CSV. Keep entry reasons, the hypothesis version and skips in a separate table: built-in notes or an automated backtester are not provided for this.

What conclusion can you draw after the test

A useful report puts the rules, the data and the limitations side by side. State the period, the source, the number of eligible cases, the exclusions, the money result and the drawdown. Show the independent stretch and the demo observations separately. If the actual process kept deviating from the model, first find out why: an entry window that’s too narrow, an ill-defined signal or an unavailable expiry.

A negative result is still a result. You may have found that the real payout destroys the idea or that there isn’t enough data for the chosen expiry. That is a good reason to simplify the rule, gather precise data or drop the hypothesis. Discipline in execution doesn’t fix negative math.

You can start a practical test on intrade.bar on a demo account: study the contract parameters, reproduce one frozen version and collect observations without risking real money. The goal of the first stage is to see whether you can actually do what was calculated. A positive test remains a reason for further research, not a promise of the next profitable trade.

Questions and answers

How many trades do I need for a backtest?

There is no single sufficient number. What matters is the size of the assumed edge, the dependence between observations and the variety of conditions. A small sample can reveal an obvious mistake, but it doesn’t confirm that a strategy is robust.

Does intrade.bar have a built-in backtester?

The historical calculation described here is done separately. On intrade.bar you test the hypothesis on new data in the demo, record the trade conditions and use the statistics with CSV export for a later review.

Can a regular Forex report count as a result for binary options?

Only after changing the model: you need to account for the actual entry, the expiry, the equal-price condition and the payout percentage of each trade. Profit from the price difference of a regular position is not the same as the result of a digital contract.

Lakukan dagangan latihan pertama anda

Akaun demo dibuka sejurus selepas pendaftaran

Cipta akaun

#strategi#demo

Buka akaun

Data sebenar sahaja. Tidak boleh diubah selepas pendaftaran!

Menyemak bahawa anda bukan robot…

atau

Dengan mendaftar, anda menerima Perjanjian Pelanggan. Data anda tidak akan sampai ke tangan pihak ketiga

Sudah ada akaun? Log masuk

Log masuk

Pulihkan kata laluan

Menyemak bahawa anda bukan robot…

atau

Log masuk dengan kod e-mel

Tiada akaun? Daftar

Pemulihan kata laluan

Masukkan e-mel akaun — kami akan menghantar pautan untuk kata laluan baharu.

Menyemak bahawa anda bukan robot…

Kembali ke log masuk

Log masuk dengan Telegram

Telegram ini belum dipautkan ke akaun intrade.bar.

Satu sentuhan, tanpa e-mel. Anda boleh menambah e-mel kemudian dalam akaun.

Daftar dengan e-mel

Pilih bahasa

РусскийBahasa RusiaEnglishBahasa InggerisEspañolBahasa SepanyolPortuguêsBahasa PortugisFrançaisBahasa PerancisTürkçeBahasa TurkiBahasa IndonesiaBahasa IndonesiaBahasa MelayuBahasa MelayuTiếng ViệtBahasa VietnamไทยBahasa ThaiFilipinoBahasa Filipinaहिन्दीBahasa HindiবাংলাBahasa BengaliاردوBahasa UrduالعربيةBahasa ArabفارسیBahasa ParsiKiswahiliBahasa SwahiliУкраїнськаBahasa UkraineҚазақшаBahasa KazakhOʻzbekchaBahasa UzbekКыргызчаBahasa KirghizТоҷикӣBahasa TajikAzərbaycancaBahasa AzerbaijanქართულიBahasa GeorgiaՀայերենBahasa Armenia