Algoritma dan Strategi Forex Mekanikal | OneStepRemoved

  • Articles
  • Sophisticated Web Sites
  • Dagangan automatik
  • Testimonial
  • Hubungi

One line of code makes all the difference

Februari 9, 2017 oleh Shaun Overton 4 Komen

I was really excited about my Pilum strategy two months ago. The research looked great and everything was ready to rock and roll. Demo testing began and then… not much happened.

The Quantilator is (mostly) finished, which finally gave me time to circle back and review what happened with Pilum.

Live demo trading of Pilum

Live demo trading of Pilum. Disember 9, 2016 to Feb 7, 2017

The expected outcome was that I would win 75% masa. Trades were infrequent, so I thought maybe I’m just having bad luck. But then my win rate remained stuck around 50%. Simple statistical tests told me this was unlikely to be bad luck.

I used the research time to pour over my research code and to compare it with live trades. What I found was that a single line of code (AHHHHHHHHHHHHHHH!) was incorrectly calculating my entry price, dramatically overstating the profits.

Yang flawed code produced this equity curve from a single combination of settings:
Flawed Pilum backtest

When the actual, correct result looks like this with those same settings:

The accurate backtest of Pilum

The accurate backtest of Pilum

I’ll be honest… I like the flawed backtest a lot more!

The new, single-setting backtest isn’t as good, but it’s still trade-worthy. There are some characteristics that I dislike and features that I love. Let’s dig into those.

What I dislike

The frequency of trades is very low. Out of 19 months there were a total of 43 dagangan. 43 trades to comprise a backtest on 40+ instruments is a very small number.

If it weren’t for the statistical pattern backing up the frequency, I would not consider the test. Walau bagaimanapun, there are 20,000 bars each on the 44 instruments. Ada 880,000 total bars used to analyze whether my Pilum pattern offers any predictive value.

The most valuable predictions, Walau bagaimanapun, are also exceptionally rare. That’s why I’m not able to get the trading frequency higher, which would potentially smooth the returns.

What I love

My previous systems like QB Pro and Dominari traded actively for relatively small wins. Trading costs exercised a massive impact on the overall performance.

The accurate backtest of Pilum

The accurate backtest of Pilum

Now look again at the correct equity curve (the image to the right). Do you see the final profit of roughly 0.14? That’s a 14% unleveraged return over a 19 tempoh bulan.

Allocating 2:1 atau 3:1 leverage on this strategy could average annual returns of 15-25%.

Detecting hidden risk

A key measure of risk is skewness. You may not use that term yourself, but it’s something most of you already understand. The biggest complaint about people trading Dominari was that the average winner relative to the average loser was heavily skewed towards the losers.

Dominari wins on most months, but when it lost in December it was devastating. I implemented what I thought was a portfolio stop after the December 9th aftermath. Then I had a smaller, but still very painful, loss in January. The portfolio level stop loss of 3% should prevent future blowouts now that I know what goes wrong.

I still believe in Dominari. Tetapi, I obviously lost the work of most of the year due to those events.

Knowing that skewness is a good measure of blowout risk (even if you’ve never seen it in a backtest, like happened with Dominari), Pilum looks extremely encouraging.

This is a histogram of profit and loss by days. You should notice a few things.

The tallest bar is to the right of 0. That means that the most frequent outcome is winning.

worst and best days

The biggest winning day is dramatically better than the worst losing day. The worst outcome was a loss of 2%. The best outcome is gains near 10% dalam satu hari (unleveraged!).

This is the statistical profile of an idea that’s much more likely to grab an avalanche of profits than it is to get blown out.

It gets even better

low correlation

Would you say that the blue and red equity curves are highly or loosely correlated? Look closely.

Writing this blog post made me think carefully about the Pilum strategy. I decided that maybe I should see if all of the profits are coming from different settings at the same time. There’s very little risk of overfitting the data as my strategy only has 1 degree of freedom.

The blue bars are the equity curve of Setting 1.

The red bars are for Setting 2.

Do you think these are tightly or loosely correlated?

If you said loosely correlated, then you are correct. Notice how each equity curve shows large jumps of profit. Did you notice how those profit jumps occur on different days?

The blue setting skyrockets on a single day in November 2016. It leaves the red equity curve choking in its dust.

Tetapi kemudian, look what happens as I advance into December. The red curve dramatically catches up to the blue curve and even overtakes it.

The correlation between the 2 strategies is only 57%.

Combine multiple settings into 1 portfolio

Combined settings Pilum equity curve

This is a much nicer equity curve!

Loose correlations are a GIFT. Combining two bumpy equity curves into a single strategy makes the performance much, much smoother.

The percentages of days that are profitable also increases. Setting 1 is profitable on 58.0% of days. Setting 2 is profitable on 53.5% of days.

Tetapi… combining them makes Pilum profitable on 68.2% of days. Menggerunkan!

That also provides more data, which puts me in a stronger position to analyze the strategy’s skewness. Look at the frequency histograms below. They’re the same type of histograms that I showed you in the first section of this blog post. As you’ll notice, they look a lot different.

Pilum most probable daily profit and loss

The most probable outcome for any given day is a small winner

The tall green bar is the most probable trading outcome for any given day with filled orders. The average day is a positive return of 0-1%.

The small red bar is the worst trading day of the combined strategy.

The small green bars are the best trading days of the combined strategy.

Look how far to the right the green bars go. The largest winner is more than 3x the biggest loss. Dan, there are so many more large winners compared to losers.

Giant winners are far more likely than comparable losses.

The Plan

I immediately pushed Pilum into live trading this combination of two strategies. I expect that adding a second degree of freedom and running about 30 different versions of the strategy – all with different settings – will add to the performance and smooth the returns even further.

Dominari hasn’t been working on my FXCM account, which is very difficult to accept because the lacking performance seems to be a buried execution issue. Pilum, Walau bagaimanapun, trades very infrequently. It’s unlikely that execution quality will make a dramatic difference in the long term outcomes.

Jadi, I’m going to convert the FXCM account to trading Pilum exclusively. That will be offered as a strategy on Collective2 within the next few weeks, a company with whom I’ve been working closely. Their users are more investor rather than trading oriented – they’re far more likely to view low trading frequency as a good thing. I suspect that most people here have a different opinion and want to see a lot of market action.

I’ll write an update on Dominari shortly.

Filed Under: Pilum, Idea strategi perdagangan Tagged With: korelasi, lengkung sesuai, darjah kebebasan, Peraturan, lengkung ekuiti, kekerapan, FXCM, histogram, leverage, QB Pro, risiko, skew, Statistik

Mengukur Ekuiti Curve kelurusan

Oktober 15, 2013 oleh Andrew Selby Tinggalkan komen

Antara jawatan yang paling menarik yang telah diterbitkan di Muntah membandingkan dan membezakan beberapa kaedah yang berbeza untuk mengukur keadaan tertentu. Jawatan yang paling baru-baru ini dalam gaya ini dicari untuk membandingkan kaedah yang berbeza mengukur kelurusan keluk ekuiti.

Berikut adalah beberapa metrik artikel memandang:

Tentu saja ada beberapa "standard" metrik kelurusan. R-kuasa dua adalah yang paling popular, dan ia berfungsi dengan baik. Saya suka naikkan semula kuasa ke-4 atau lebih untuk membesarkan perbezaan kecil dan membuat ia sedikit lebih "dibaca". Satu lagi metrik popular ialah K-Nisbah, di mana terdapat sekurang-kurangnya 3 versi yang berbeza terapung sekitar. K-Nisbah pulangan juga mengambil kira, jadi ia bukan semata-mata langkah kelurusan. I prefer the Zephyr versionwhich is calculated as the slope of the equity curve divided by its standard error.

Penulis terus dengan mencadangkan beberapa pembolehubah lain yang akan menjadi menarik untuk mempertimbangkan:

Beberapa nombor lain saya fikir mungkin menarik: nisbah antara bidang perbezaan di atas dan di bawah yang ideal, turun naik perbezaan, turun naik perbezaan di bawah ideal, purata sisihan mutlak, dan sisihan mutlak purata di bawah ideal (kedua-dua standard untuk magnitud lengkung).

Pada ketika ini, penulis melemparkan CurveBall dan memperkenalkan metrik jenama baru yang dipanggil Qusma Ekuiti Curve kelurusan, Sisihan ke bawah, Kestabilan dan Sukat (QECSDDSM). Ini metrik baru direka secara eksklusif untuk mengukur kelurusan lengkung ekuiti.

lengkung ekuiti

Mengukur kelurusan keluk ekuiti adalah cara yang menarik untuk menilai turun naik.

 

Selebihnya artikel menggunakan metrik yang baru dan membandingkan keputusan itu mengira kepada orang-orang lain yang mungkin metrik di seluruh empat set data yang berbeza. Keputusan akhirnya menunjukkan bahawa tidak terdapat banyak perbezaan antara kaedah yang berbeza:

Secara umum sebahagian besar nombor secara kasar bersetuju antara satu sama lain dari segi memerintahkan lengkuk terbaik untuk terburuk, supaya penggubalan sebenar QECSDDSM itu tidak terlalu penting semua yang banyak.

Artikel ini akan menyala untuk menguji metrik pada kutipan yang berbeza dari set data. Sekali lagi metrik baru gagal ketara mengatasi metrik yang telah sedia ada. Walau bagaimanapun, tawaran percaya bahawa metrik baru ini mampu menjadi yang berguna berikutan perkembangan lanjut.

Filed Under: Menguji konsep anda sejarah Tagged With: lengkung ekuiti, Kelurusan metrik

Surprise Backtest menjengkelkan

Januari 22, 2013 oleh Shaun Overton 2 Komen

Keputusan backtest pertama adalah dari Kumpul silang harga-SMA forex strategi saya. Mengimbas kembali, Saya benar-benar harus mempunyai pra-kajian idea ini sebelum bergerak secara terbuka di hadapan. Lihat dihadapan sebelum anda melompat!

Saya ditemui semula masalah yang sama menjengkelkan yang sia-sia 2 bulan hidup saya kembali Mac 2012. Saya lebih jengkel tentang mencari keputusan yang sama sekali lagi daripada apa-apa. Jika anda mampu untuk berdagang salib sejak SMA 200 tanpa penyebaran, strategi membuat gobs dan gobs wang.

Idea ini membawa kepada menggunakan SMA 200 harga melintasi kepada perdagangan dengan had pesanan secara percuma menggunakan BBBO (Bidaan terbaik Tawaran terbaik). Yang jatuh rata selepas menerima pesanan 80% kadar di beberapa broker mengisi. Ia diperlukan 95%+ mengisi kadar untuk bekerja.

Equity curve EURUSD

Strategi ini kelihatan nampak menarik. Ia sama sekali tidak berguna.

Dunia sebenar kos dagangan termasuk penyebaran dan gelinciran bekerja keluar untuk sesuatu seperti 2 pip pada EURUSD. Strategi yang diniagakan 29,132 kali pada carta M1 untuk mendapatkan keuntungan sebanyak $118,970. Masalahnya ialah bahawa 2 kos penyebaran pip akan mempunyai kos $582,640. Kos lengkung ekuiti cantik $4 untuk setiap $1 keuntungan. Tidak baik.

Trade report for all sma price crosses

Harga menyeberangi 200 Tempoh purata bergerak mudah lebih daripada 29,000 kali dalam 2011.

SMA analisis keluk jarak tidak berlaku seperti yang saya harapkan. Terdapat peluang perniagaan yang jauh lebih kecil dari purata bergerak daripada apa yang saya meramalkan – SMA adalah stickier daripada yang saya fikir sebelum ini. Tidak kira di mana saya melihat, strategi yang selalu menghabiskan lebih banyak wang pada kos dagangan daripada ia memperoleh. Saya mencatatkan semua imej di sini demi ketelitian.

Saya akan bergerak ini sehingga carta M5 dalam pusingan seterusnya ujian. Semua orang boleh mengatakan yang kuat, “Saya dah kata!”

Perdagangan yang memasuki ± 0.1% dari SMA 200.

Perdagangan yang memasuki ± 0.1% dari SMA 200.

M1 price crosses 0.2% lebih 200 SMA

Perdagangan yang memasuki ± 0.2% dari SMA 200.

M1 price crosses 0.3% lebih 200 SMA

Perdagangan yang memasuki ± 0.3% dari SMA 200.

M1 price crosses 0.4% lebih 200 SMA

Perdagangan yang memasuki ± 0.4% dari SMA 200.

M1 price crosses 0.5% lebih 200 SMA

Perdagangan yang memasuki ± 0.5% dari SMA 200.

M1 price crosses 0.6% lebih 200 SMA

Perdagangan yang memasuki ± 0.6% dari SMA 200.

Langkah seterusnya adalah untuk melihat dengan cepat pada carta M5 untuk melihat jika saya boleh membuat idea asas yang berdaya maju di sana.

Selepas-fikiran

Siri ini akhirnya membawa kepada strategi perdagangan yang menguntungkan. Jika anda lebih suka membaca melalui perjalanan, maka saya cadangkan anda membaca artikel secara berurutan

Idea strategi awal
Memilih jangka masa tertentu
Pelan penyelidikan
Satu kejutan menjengkelkan dalam backtests awal
Percubaan perdagangan pelbagai
Keputusan perdagangan pelbagai
Bergerak-rata tukang catut sampul surat

Filed Under: Menguji konsep anda sejarah, Idea strategi perdagangan Tagged With: Backtest, lengkung ekuiti, SMA

Strategi perdagangan PERCUMA melalui e-mel

Tren

Maaf. Tiada data setakat.

Arkib

  • Peraturan
  • Bagaimana untuk kerja pasaran tukaran mata wang asing?
  • Petunjuk
  • MetaTrader Tips
  • MQL (untuk nerds)
  • NinjaTrader Tips
  • Pilum
  • QB Pro
  • Hentikan kehilangan wang
  • Menguji konsep anda sejarah
  • Idea strategi perdagangan
  • Uncategorized
  • Apa yang sedang berlaku di pasaran semasa?

Terjemahan


Strategi Trading Percuma

Dasar PrivasiRisk Disclosure

Hak cipta © 2023 OneStepRemoved.com, Inc. Hak Cipta Terpelihara.