アルゴリズムと機械の外国為替戦略 | OneStepRemoved

  • Articles
  • Sophisticated Web Sites
  • Automated Trading
  • お客様の声
  • お問い合わせ

あなた自身の外国為替の戦略を作成するための青写真, Part 2

2 月 18, 2014 によって アンドリュー ・ セルビー Leave a Comment

Earlier this month, we looked at an article from Forex Crunch that covered the first three steps for building a new quantitative Forex strategy. Those first three steps covered brainstorming strategy ideas, defining the rules, and optimizing the parameters.

At that point we had a strategy that we had reason to believe would perform well in a trading situation. The next steps would involve properly testing our strategy in order to prove its value.

外国為替戦略

After brainstorming, defining rules, and optimizing a new Forex strategy, the next steps involve rigorous testing.

Forex Crunch has since published the second three steps for creating a robust Forex system. This post focuses on testing the system that was created with the first three steps. It suggests starting with in-sample testing, then moving to out-of-sample testing, and then suggests some even deeper methods of testing.

The Most Important Point Regarding Testing

While there is plenty of great information in the article about the different types of testing that should be performed on a new Forex strategy, the most significant point that the article makes is actually stated in the introduction:

Relying on the CAR (compound annual return) figure is not always a good idea because this metric does not take into account the risk that was involved in producing those gains.

This point is extremely basic, which makes it easy to overlook. While a strong compound annual return is the end goal of every trader, we all know that there are many ways to arrive at a strong compound annual return, and some of them aren’t worth the effort.

In addition to compound annual return, we also need to be concerned with how the strategy performs from a risk perspective. Looking at statistics like maximum drawdown, プロフィットファクター, Sharpe ratio, and winning percentage gives us a better idea of how the strategy arrives at its compound annual return.

This bigger picture view will give us a more qualified overview of what trading the strategy will feel like. We can use that to determine if the amount of risk the strategy exposes our capital to is in our tolerable range.

Testing Forex Strategies

Testing on in-sample data is where we can fine tune our strategies in order to get the return and risk statistics into the desired range. From there, we move to out-of-sample testing where we attempt to replicate those statistics on a fresh data set.

There are also testing methods like Walk-Forward Optimization and Monte Carlo Simulations that can shed even more light onto how our new system can be expected to perform in live trading. The important thing to watch for during this testing phase is consistency. The strategy should perform similarly across all of these different types of testing.

If the strategy produces solid returns through a wide range of testing, it can be expected to produce similar results in live trading.

以下の下でファイルさ: あなたの概念を歴史的にテストします。 タグが付いて: バックテスト, in-sample, monte carlo, out-of-sample, 前方を歩く

転送最適化を歩く

1 月 13, 2014 によって ショーンオバートン 6 コメント

歩いていたし、ランダムに雨が降り始めた場合, 明日は傘を持って考慮します。? もちろん、.

人々が行動を観察したとき、私はそのような修辞的な質問をする理由は、, それらはそれに応じて応答します. 彼らは何かが再び起こる可能性があることが予想される場合, 彼らは結果の変化に対応するために彼らの行動を変えます.

あなたは外国為替のロボットを考えるとき, 誰もが永遠に動作する戦略を開発するという夢を持っています. これは、変更する必要はありません. 初期設定は、常に動作. それをオンにし、ビーチに移動.

現実, もちろんです, それよりも複雑です.

walk forward optimization

ウォークフォワード最適化は継続時間の代わりに、静的な設定のいずれかのセットを探して全体最適化

あなたの戦略は、必然的にゆがんで行くときそれはあなたが何をする必要があるかの期待につながります. それはあなたが現在の市場にも驚くほど動作しない戦略を考え出すことは非常に可能性があります. しかし, 過去の天才は、将来の天才を意味するものではありません. あなたの戦略は、もはや将来的に動作しません可能性が常にあります.

何故ですか? それが今日雨が降れば、それはあなたが明日傘を運ぶかもしれないのと同じ理由です. 人々は一貫した方法で行う市場を観察. より多くの人々は、観測を行うと, 人々はそれに取引を開始します. 市場では、これらの変化に対応, あまりにも多くの人々がそれについて耳いるとして、最終的に機会が完全に洗います.

ウォークフォワードテストは、あなたの戦略が洗い流さしたかどうかを決定するプロセスです. データの1セットでテストすることにより, そして、ブラインドセットにそれをテスト, あなた自身にあなたの戦略が悪いかどうかの指標を与えることができます. ウォークフォワードの目標は、あなたの戦略が良好であることを証明することではありません. それはあなたの戦略が悪いことが知られていないことを証明することです.

ウォークフォワードテストのプロセスは非常に簡単です. あなたは、あなたのテストに使用する情報のセットを識別し、 最適化. 実際の例を使用して, 今ではの始まりに 2014. だから、多分あなたはからデータを見て、テストしたいです 2011 を通じて 2012. それはあなたの中のサンプルデータになります, し、サンプルデータのうち、あなたはすべての可能性があります 2013.

歩行フォワードテストを行うために, あなたはあなたの戦略をテストし、分析することになります 2011-2012. その後、, それはだかどうかを判断します “悪いことが知られていません”, あなたは、その後に先に歩きます 2103 見るために性能を確認.

あなたがやったことはブラインドテストであります. あなたはどのように戦略がで実行することになりかわかりませんでした 2013 あなたはそれをテストしたとき 2011-2012. ブラインドサンプルの上に置くことによって、, あなたはそれを失敗する機会を与えます.

それはあなたの最適化の弱点を識別するための絶対的な最高のツールだから非常に多くのトレーダーは徒歩フォワードテストで自分たちの信仰を置く理由は、. あなたは戦略をテストしているとき, それはあなたが過去の機会にオーバーフィットをした可能性が非常に高いです.

自己フィードバックは、現在の市場でループ

私はあなたに例を挙げましょう. 現在の市場では, トレーダーの多くはされています 叩い金 市場にどこの市場で毎日が開いて開きます。, 彼らはおそらくできる限り金を売却. 場合によっては、数分のスパンでの年間生産量の数倍です. あなたは何を参照してください5または10分間の絶対的自由落下であります. その状態は、一度日間持続します. しかし、それは永遠に続きません. 十分なトレーダーは、人々がオープンに金を強打することを見て起動すると、, 彼らは同じことをやって起動します.

効果的, 誰が彼らのためにその取引を行うために他のトレーダーを教えていた金は、市場のオープンにフォールオフしたいです. 人々は金が開いて最初の5分で落ちることを期待したよう, 彼らはその後、彼らの行動を変えます. いくつかは、オープンを叩いにジャンプし、短い移動しよう.

他の人は自分の動作を変更する開始します. 彼らは、5分間その金無料の落下に注意してください. その後、, 突然止まります, そのようなよりは平均値に戻ります. 非常に多くの分が開いてから経過した彼らは、タックと買いを変え始めましょう. 彼らは販売に先行重いボリュームが最終的に正常に戻ることを期待. 人々は彼らの行動を変更すると, 他の人が親切に対応します.

十分な人々がオープンに販売を開始し、その後、オープン5分で購入する場合, あなたは一人が別​​のアクションに応答する場合はパターンが形成されていることがわかります. それは日の最初のカップルのために働いていた状態がもはや将来的に機能する自己フィードバックループです.

あなたはこれらの条件に耐えることがある戦略を識別することができた場合, あなたが任意のテストと最適化をしなかった条件に耐えることがあります, あなた自身の将来に成功したのより良いオッズを与えます. それは非常に多くはないトレーダーは、あなたが発見したこの取引チャンスに物事をよく分かっていることを意味し.

フォワードテストを歩くためのアプローチは、として知られている問題に対する解毒剤であります カーブフィッティング. カーブフィッティングはcould haveの縮約形should haveの縮約形戦略究極のwould haveの縮約形であります. 昨日から、チャートを開いて、私はここで買っただろうと私はここに販売したと言っに似です, すでに蒸散何を知ります.

もちろん、あなたがしようとしています “稼ぐ” 其れでは. あなたは、市場が何をしたか、完璧な情報を知っています. 将来は, あなたは完璧な情報がわかりません. 戦略の目標は、そのあいまいさに対処することです.

新しい状況が必然的に発生していることをあなたが過去の市場の状況にまで完璧にフィットのすべてをしたカーブフィッティング手段, フレーズに似て一種の, “歴史は繰り返さありません, それは韻を踏みます,” あなたの戦略は、同じことを行い.

あなたは過去の実績でもない戦略をしたいです, しかし、あなたは歴史的な市場でお金を稼ぐための戦略を考え出すていません. 戦略を開発する目的は、将来の市場でお金を稼ぐことです. あなたはバックテストしているとき, あなたは、固体の歴史的性能とのバランスをしようとしています, 最も重要なこと, その歴史的知識が将来の業績に外挿することを確認すること. あなたの目標は、お金を稼ぐことです.

ローリングウォークフォワード最適化

ローリングウォークフォワード最適化は徒歩前方にアイデアを取り、継続的に新しいデータにそれを暴露することによって、戦略を改善. それでは、あなたが24ヶ月のサンプル期間を持っているとしましょう. それについて移動するための一つの方法は、二ヶ月の期間、あなたの戦略を最適化することであろう, その後、3ヶ月目に前方に歩いて. あなたは行動を観察し、あなたは、第2、第3の月の再最適化, その後、4番目の月を楽しみにして歩きます.

連続的にそうすることによって, あなたは戦略の減衰時間を排除し、それを継続的な市場の状況に適応する機会を与えます. これは、機械学習に赤毛の継子の一種であります. 経験と損失は戦略に徒歩フォワード最適化により改善し、市場の変化に適応する機会を与えます.

…あなたは戦略の減衰時間を排除し、それを継続的な市場の状況に適応する機会を与えます

散歩フォワード分析のためのもう一つの重要な考慮事項であります 自由度 系内で. たとえば, 例えば、あなたが、移動averaageクロスを分析しているとしましょう. あなたは、2つの移動平均を使用して、固定stoplossを使用して、利益を取るしています. それはあなたに4度の自由度を与えるだろう. 高速移動平均は、最初の学位であります. ゆっくりと移動平均は、二度あります. 第三はstoplossで、4番目はテイク利益であります.

あなたはシステムで許可するより多くの自由度が大幅に過去のデータにあなたのシステムをフィッティングチャンス0F曲線を増加させ. 絶対的な最高のシステムは、12自由度以下に保ちます. あなたは、大規模な取引の数、あなたが満足すること申し出性能を有する取引の機会を見つけたいです.

あなたの最適化の際に考慮すべきもう一つの要素は、あなたがのために最適化されたものです. ほとんどの人は絶対リターンに焦点を当てます. 戻り値は素晴らしいです, ほとんどのトレーダーは、について多くを気に どうやって 彼らはお金を稼ぐの代わりに、 いくら. 私はあなたに例を挙げましょう. 私が作っシステムを持っていた場合 $25,000 昨年, あなたはそれを望みます? ほとんど誰もがそう言います.

私が作っシステムを使用している場合 $25,000 昨年, しかし、あなたはに負けなければなりませんでした $15,000 あなたはお金を作った前に. ほとんどの人は、そのシステムを望んでいません. これが意味することは、最終的な結果ではなく、日々のパフォーマンスについてより多くを気にしていることです. 最適化、さらには徒歩フォワード最適化の問題点は、必ずしもあなたが現実の世界で気に何に焦点を当てていないということです: あなたがあなたのお金を作っている方法.

ほとんどのチャートパッケージは、ネット結果に焦点を当て、それはあなたのシステム内のいくつかの弱点を引き起こす可能性があります. あなたはレンジ取引している場合, あなたが本当にやったことは桜が少なくとも実質的なニュースの影響を受けている結果を選ぶです. 効果で, あなたはまだ影響を受けていません設定を選択しました 脂肪のしっぽ.

あなたはトレンド取引している場合, あなたは正反対をやりました. あなたが意図的に過去に起こった脂肪tailesを最大化の設定を選びます. トレンド取引戦略で, あなたはおそらく安定したパフォーマンスを見つけることするつもりはありません. 代わりに, 何を見つけることは、最適化を頻繁に長い引き起こすことがあります, 絶え間ないドローダウンの継続的な干ばつ. そして、突然、, ほとんどどこからともなく, それはあなたが経験したドローダウンの数倍を返すメガモンスターの勝者を見つけます. これは、架空のbacktestsの罰金です, しかし、現実の世界で、あなたは近く、日常的に損失を被るている場所, ほとんどのトレーダーは、痛みを取ることができません. 私はほとんどの最適化を見つけるの弱点は、彼らはパフォーマンスの一貫性を見ていないということです. 戦略を最適化するための潜在的な代替が見れることになります 線形回帰 経時株式曲線の. 最高の株式曲線は最強の線形回帰の傾きを有します.

ローリングウォークフォワード最適化を実装する人気チャートパッケージはAmibrokerです, 売買, MultichartsとNinjaTrader.

NinjaTraderでウォークフォワード最適化

コントロールセンターから戦略アナライザを開きます. [ファイル] をクリックします。 / 新機能 / 戦略分析.

NinjaTrader Strategy Analyzer selection

NinjaTrader中戦略・アナライザを開きます。

  1. 楽器や機器のリストの上でマウスの左クリックと右のマウス、マウスの右クリックメニューを表示します. メニュー項目ウォークフォワードを選択. また、上でクリックすることができます “で” 戦略分析ツールバーのアイコン. あなたがホットキーを好む場合, あなたはまた、Ctrlキーを使用することができます + W. 最後に, あなたもプッシュすることができます “W” 戦略分析の左上のアイコン.
  2. 戦略引き出しメニューから戦略を選択します
  3. ウォークフォワードプロパティを設定 (参照してください。 “ウォークフォワードの特性を理解します” プロパティ定義については、以下のセクション) し、[OK]ボタンを押してください.
NinjaTrader Walk Forward Optimization

NinjaTraderに散歩前方最適化を選択するための多くの方法があります

ウォークフォワード進行は、コントロール・センターのステータスバーに表示されます.

以下の下でファイルさ: NinjaTrader ヒント, あなたの概念を歴史的にテストします。 タグが付いて: AmiBroker, バックテスト, カーブフィッティング, 脂肪のしっぽ, ゴールド, MultiCharts, ninjatrader, 範囲の取引, 自己フィードバックループ, 短い, 戦略・アナライザ, 売買, トレンド, 前方を歩く

Have You Prepared For System Failure?

1 月 3, 2014 によって アンドリュー ・ セルビー Leave a Comment

One of the misconceptions that many quantitative traders fall prey to is neglecting to consider that their strategy will eventually stop working. We are led to believe that once we develop and backtest a profitable strategy, we will simply be able to print money indefinitely. しかし, this is almost never the case.

Due to the unpredictable nature of financial markets, all systems and strategies will eventually fail. 少なくとも, they will need to be adjusted. This means that developing a trading strategy is an ongoing process, not a one-time project.

system failure

Eventual system failure is inevitable for all types of strategies. Are you prepared for it to happen to you?

Daniel Fernandez from Mechanical Forex wrote a post on this topic earlier this week. He suggests that the ability to detect system failure with as little pain as possible is a pivotally important aspect of Forex strategy development. He explains why all quantitative strategies are bound to fail eventually:

Eventual system failure – what we can call system death – is an inevitable consequence of an edge developed on a finite amount of information on a market with potentially infinite variations.

Detecting System Failure

Fernandez made some particularly interesting points about the process of detecting potential system failure. In order to detect that a strategy no longer working, a trader will most likely have to go through a difficult losing period.

Through extensive バックテスト, walk-forward testing, and monte carlo simulations, a trader can establish parameters that describe a normal losing period for a given strategy. In order for that trader to determine system failure, they will have to trade through that normal losing period and then some.

The interesting concept that Fernandez brings up is that different strategies will have different conditions for those standard losing periods.

Low Win Ratio Strategies

Trading systems that are based on low winning percentages and high reward to risk ratios are expected to have long losing streaks. したがって, it would take an exceptionally long losing streak to signal that system failure is possible.

Fernandez also adds that these types of strategies often rely on a few very profitable trades to make up for lots of small losses. That means that missing one key trade could result in a false signal that the system has failed.

High Win Ratio Strategies

Strategies based on high winning percentages and low reward to risk ratios pose the exact opposite problem. They experience much shorter losing streaks, so they are able to identify system failure much sooner.

もちろんです, the losses that these types of systems do take are often very large. While it might be a short string of losses that identifies the system failure, those losses are likely going to be incredibly painful.

Best Strategies for Detecting Failure

Fernandez concludes that the systems that provide the least painful means of detecting system failure are strategies with moderate winning percentages and reward to risk ratios.

He suggests that systems with reward to risk ratios around 1 宛先 1 と winning percentages just over 50% are able to signal failure in the best manner. These types of strategies can signal failure quickly, without crippling the buying power of an account.

Trading Frequency

The last topic that Fernandez mentions is the trading frequency of a strategy. もう一度, he suggests targeting a middle-of-the-road approach.

The fact that high-frequency trading systems can run through long losing streaks quickly might be seen as an advantage. Fernandez points out that this can be a double edge sword. Short term disruptions in market behavior can lead to false signals of system failure.

 

以下の下でファイルさ: あなたの概念を歴史的にテストします。 タグが付いて: バックテスト, リスク報酬, system failure, 前方を歩く, 勝率

調査計画

1 月 17, 2013 によって ショーンオバートン Leave a Comment

Creating a to-do list sounds boring and bureaucratic. It reminds me of the trading coaches that insist on keeping trade journals. BORING!

反対に, journals are important. They force the trader to reflect on the thinking behind an action.

と… I’m prone to rabbit trails and the like. A known plan with a checklist would keep me organized and thorough. だから, it’s with some regret that I’m forcing myself to build a research plan.

Rabbit standing

I don’t want to end up following this guy’s lead

The step by step plan for analyzing my strategy

I mentioned in the last post that the strategy’s 時間枠 will be the M1 chart. The current data under study uses EURUSD prices for the year 2011. Whenever the strategy is ready to walk forward, I’ll test it on all of 2012.

Now that most of the ideas came in (thanks to everyone for all of your emails and blog comments), I’ve made a list of things to try.

Before I get carried away with a new idea, I have to check off old ideas from the list. Doing so will keep my efforts disciplined and focused.

  1. Visualize the problem. This is what I started to do in the group forex trading strategy post. The next blog post in the series will go a step further and look at individual segments of the SMA/price curve.
  2. Evaluate range bound methods for scaling into a trade.
  3. Consider reversing strategies that lose dependably since I’m not including trading costs in the test. すなわち, I don’t have to worry about overtrading being the cause of the loss
  4. Add filters to the most promising candidates
  5. Walk forward to 2012 データ

Filters

Many of the suggestions that came centered on adding filters. I appreciate everyone’s feedback and for really thinking through the problem.

My personal thoughts are to focus on お金の管理 as a technique for improving a strategy. I’m going to leave filters as the final option as a way to potentially polish a mostly complete strategy.

ステップ 2 is multi layered. The items that I laid out are to scale in:

  • aggressively up to a certain, predefined threshold
  • slowly up to a threshold
  • slowly with a peak in the middle, then taper off the size of new trades. Think of it like a bell curve. The sweet spot should be in the middle of my graphic at the inflection point. (a hat tip to Mark Chapman for sparking that idea).

Writing this information out made me realize that I still feel like I’m guessing which types of strategies may work. だから, I’m going to head back to step 1 to visualize the problem better. I’ll start with taking trades immediately on price crossing the moving average. I will then systematically record how performance and the number of trades varies as I get farther from the MA.

Although it’s not quite a strategy at this stage, the goal will be to identify regions under the curve that present better opportunities than others.

アフターの考え

このシリーズは、最終的に収益性の高い取引戦略につながった. 旅を読むしたい場合, 記事を順番に読んでほしい

初期の戦略アイデア
適切なタイム フレームを選択します。
研究計画
初期 backtests の厄介な驚き
範囲の取引の試み
範囲の取引結果
移動平均エンベロープ ダフ屋

以下の下でファイルさ: 戦略の取引のアイデア タグが付いて: ユーロドル, 外国為替, お金の管理, 取引戦略, 前方を歩く

メールで無料の取引戦略

トレンド分析

申し訳ありませんが. No data so far.

アーカイブ

  • ルール
  • 外国為替市場のしくみ?
  • インジケーター
  • メタト レーダーのヒント
  • MQL (オタクのため)
  • NinjaTrader ヒント
  • Pilum
  • QB プロ
  • お金を失うことを停止します。
  • あなたの概念を歴史的にテストします。
  • 戦略の取引のアイデア
  • 未分類
  • What's happening in the current markets?

翻訳


無料の取引戦略

プライバシー ポリシーRisk Disclosure

著作権 © 2021 OneStepRemoved.com, (株). すべての権利予約.