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

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

あなたの取引に機械学習を使用する方法

4 月 5, 2015 によって ショーンオバートン 2 コメント

Machine learning presents many unique and compelling advantages for traders looking for an edge in the market. Just in the last year we have seen a huge amount of resources from the world’s top hedge funds, like Bridgewater Associates, dedicated to exploring these techniques.

While using machine learning or artificial intelligence seems incredibly complex and difficult to implement, there are still ways to leverage their capabilities without needing a PhD in math or science.

この記事で, we’ll go through 3 different ways that you can use techniques from machine learning to improve your own trading.

Indicator Selection

One of the most important decisions is deciding on which indicators to use to trade. Whether you are a technical or fundamental trader, or you just use price action to trade, your success is going to be largely dependent on the indicators that you use and how you interpret them.

幸いにも, there are many different methods for selecting your indicators and this is known as “feature selection” in the machine-learning world.

Using a Decision Tree to Select Your Indicators

indicator decision tree

Decision trees are very versatile algorithms that have the benefit of being easily interpretable. Given a large dataset of indicators and the price movement of the asset, a decision tree will find the indicators, and indicator values, that best split the data between price increases and price decreases. Indicators closer to the top of the tree are seen as better predictors than those closer to the bottom of the tree, and following a particular branch will allow you to easily find interdependencies and relationships between the indicators.

The decision tree will also give you a set of rules that you can use to trade based on those indicators, but you must be sure to properly prune the tree and test for overfitting.

The decision tree is a powerful, visual tool that can help you decide which combinations of indicators to trade and at what values to trade them. You can find a tutorial on how to build a strategy with a decision tree ここで or for a more general guide, in R ここで is a good resource.

最適化

Once you have the basis for your strategy, the next step is optimization, or choosing the correct parameter values to maximize your chance of success. Many strategies have a wide variety of parameters, such as indicator settings, the entry and exit conditions, stop loss and take profit levels, and position sizing, that make “brute force” methods of trying every single combination extremely difficult and time consuming, if at all even possible.

human-brain-gears

Solving these types of problems is another area where machine learning excels.

Optimizing a Strategy Using Genetic Algorithms

Genetic algorithms mimic the process of natural selection by creating a unique set of “child” strategies that contains a mixture of the best “parent’” strategies, with a chance of random mutation.

The process begins by encoding your strategy into an array. For example it could read as something like:

インジケーター 1 期間インジケーター 2 期間Buy ConditionSell Conditionリスク:Reward Ratio

Where a 50 – 200 period moving average cross, ととも​​に 50 pip to 100 pip risk-to-reward ratio would be:

50 – period Moving Average100 – period Moving Averageインジケーター 1 crosses above Indicator 2インジケーター 1 crosses below Indicator 250:100

 

You would then generate a large population of strategies with random variations of these parameters. These strategies all have different combinations of moving average periods, entry and exit conditions, and risk-to-reward ratios.

次, you would test this population by running each strategy over a test set and selecting the top strategies based on a performance metric of your choice.

最後に, you randomly combine the traits of the top strategies, with a small chance of “mutating” some of the parameters, to create a new generation of “child” strategies. You then repeat the evaluation procedure and once again mate the top performing strategies from this new generation. This leads to a survival of fittest scenario where only the top strategies “survive” to pass along their genes to the next generation

Repeat this process a large number of times or until a certain performance criteria is reached and you are left with a very robust strategy built from generations of the best performing strategies!

You do have to make sure that you select an appropriate performance metric (such as risk-adjusted return) and always test the final strategy over data that wasn’t used to build the strategy to ensure that you aren’t overfitting to a particular data set.

This is a very powerful and robust method that has been successful in a wide variety of applications, including the world of trading. You can find a more detailed description ここで and a tutorial on how to implement it in R ここで.

Live Trading

One of the more attractive aspects of machine learning is having an algorithm that is able to learn and adapt to changing market conditions. しかし, this creates a “blackbox” strategy that, if you do not completely understand how the algorithms work and thoroughly tested it yourself, is very difficult to trust on a live account. Not knowing when or why a strategy is entering a trade can be a scary proposition.

しかし, there are ways to get the benefits of an intelligent, algorithmic approach while still maintaining transparency and understanding in your strategy.

Association Rule Learning

Association Rule Learning is the process of deriving a set of clear, understandable rules from the patterns uncovered by a machine-learning algorithm.

Algorithms, like the Apriori algorithm, search a dataset of indicators, indicator values, and the resulting price movement to produce a set of conditions; basically “if-then” statements, that lead to the highest-performing results. しかし, it’s still difficult to know exactly where these rules are coming from, the Apriori algorithm requires a fairly large number of parameters to be tuned and this process does not lend itself well to changing market conditions.

と TRAIDE, we took the process one step further and allow you to see the patterns found by an ensemble of machine-learning algorithms, from which you can create your own trading rules. These rules are then easy to implement and adjusted to changing market conditions, all without requiring any programming or mathematical experience. You are able to get the benefits of using machine-learning algorithms to trade while still maintaining complete transparency, an understanding of your strategy, and including your own domain expertise in your trading.

Using machine learning and artificial intelligence to find an edge in the market does not need to be exclusively owned by only the largest financial institutions. As this technology becomes more accessible and these techniques more common, you too can use machine learning to improve your trading.

Tad Slaff

CEO/Co-founder

Inovance

 

以下の下でファイルさ: あなたの概念を歴史的にテストします。 タグが付いて: artificial intelligence, decision tree, machine learning, 最適化, 最適化

Automated Trading

12 月 28, 2012 によって ショーンオバートン 2 コメント

Nathan Orange contacted me in early 2012 looking for advice about automating a grey box strategy. Through the course of our conversation, it turned out that he was a profitable trader with a multiyear track record. Nathan has gone on to found his own forex signal service at Global Trend Capital.

Nathan conducted this interview with the intention of informing his readers about automated trading. You’ll have to pardon the vanity of publishing his interview of me, but I believe it’s useful for my own readers.

Nathan Orange

 

(Nathan):
ショーン, good to talk to you again and I appreciate you taking the time to discuss what I consider a very important topic. Before we jump into the specific questions, let’s fill everyone in on your background.

 

ショーンオバートン(ショーン):
I led the sales effort for the Sentiment Fund at FXCM, which was a fully automated strategy based on the market positioning of retail clients. I needed to understand how it worked in order to answer client questions. That interaction with the systems desk gave me access to one of the tiny handful of people in the forex industry that really knew anything about systems trading and analysis.

I tried trading manually during work hours, but as a broker, it was really difficult to manage trading accounts and to squeeze in 100+ attempted phone calls per day. I also suffered from the usual sob story that every trader endures. Account #1 blew up in 3 ヶ月. Account #2 blew up in 6 ヶ月. That was the first $5,000 thrown down the pit.

Technical analysis with its trend lines and other tools are hocus pocus pseudo-science. I traded like that for nearly a year, but I never felt confident or comfortable with the idea that subjectively drawing lines on the chart leads to any useful information.

The idea of quantitatively defining a strategy allows for testing and analyzing an idea to determine whether or not it really held any merit. The first non-technical analysis idea I had was to look at unusually big bars with the idea of fading those moves. Access with the FXCM Systems desk helped shape my idea from a subjective idea like “big bar” into a mathematical parameter like “standard deviation”. They also explained trading platforms to consider and recommended a few programmers to help develop the idea.

My experience working with programmers was uniformly terrible. I tend to dive into projects, so rather than depending on the clown-car brigade to half-develop my ideas, I wanted ultimate control over the development process. That eventually led to 20+ hours per week programming and analyzing strategies at home after working all day. The system design bug bit hard and never let go.

Nathan Orange(Nathan):
One of the most common concerns when discussing back-testing is over-optimization. From your perspective, what are some of the common mistakes that most system developers make? I have my own list, but we can discuss those further when we turn the tables.

ショーンオバートン(ショーン):
The basic kernel of the idea either has merit or it does not. There is no secret set of magical inputs that turns a bad strategy into a good one. Bad inputs, しかし, can turn a good strategy into a bad one.

Optimization fails to differentiate between “profitable” and “good”. I flog this dead horse constantly, but the most confusing thing about trading is that you can trade by flipping a coin and setting a 50 ピップを停止, 50 pip take profit and actually come out a winner – sometimes. Most of the winners will show small profits. A tiny handful of them would show gigantic profits purely as the result of luck. What’s worse is that most of the profitable traders will actually believe that they are the reason for their success when it’s really just dumb luck.

Optimization is usually the process of finding the luckiest accidental winner. It’s no wonder that optimized strategies almost universally fail going forward. The real task is to distinguish between ideas that are inherently non-random versus strategies or expert advisors that coincidentally make money from a random process.

Nathan Orange(Nathan)
Based on your experience and knowledge, if someone sends you a system to code can you quickly determine potential issues with their logic, or even over-optimization red flags? たとえば, you might a get a system a trader or hedge fund wants coded that has so many specific variables that you know immediately it won’t be robust. I can usually spot these issues from my own system development experience, but from your perspective as a coder is it fairly easy to recognize?

What do you do in those cases? Are most clients bull headed, avoiding any feedback or are they more open minded to listen?

ショーンオバートン(ショーン):
We see our primary role as that of a construction worker. If you want to build an ugly house, that’s your affair. 反対側に, if you solicit my opinion, I won’t hold back telling you it’s the ugliest house I’ve ever seen.

People frequently ask, “Do you think this will work?” I almost always answer no, and then they hire us to build it anyway.

興味深いことに, strategy development is very similar to trading in that people get emotionally attached to ideas. Even in the face of strong warnings, they charge ahead. A dear friend of mine opined on the subject, saying, “A handful of people don’t try. An even smaller handful listen to good advice. The rest of us learn the hard way.” Most people require the experience of falling flat on their face before they learn the lesson behind the advice.

If you’re motivated enough to ask a programmer to build a strategy for you, it’s because you already know that it is something that you really want to try. I could bluntly say, “This is going to wind up in tears.” 95% of people go ahead with the project, とにかく.

Despite my knowledge of markets and systems, I’m not an oracle, いずれか. I’ve told people that I thought their ideas were bad, only to have them come back a year later and tell me they’re making money.


…….Stay tuned for Part II when we discuss HFT, more back-testing issues (including those unique to Metatrader) and if there are common themes to successful systems.

以下の下でファイルさ: 戦略の取引のアイデア タグが付いて: アルゴリズム取引, automated trading, FXCM, 最適化

曲線の当てはめ

9 月 24, 2012 によって ショーンオバートン Leave a Comment

私は一般的に哲学的な理由のために最適化を回避します. トレーダーは、常に一番下の行を気に. 人々は必然的に尋ねる質問です “EAはどのくらい作るん?” 理解できるが、, 私はそのような黒と白の懸念が現実の生活をモデル化しないと信じています.

現実には, 人々はちょうど彼らが作るどのくらいあまりない気. 彼らはまた、彼らはそれを作る方法について多くのことを気に. 違いは、前者を知っているし、後者を無視する傾向があることです. これは、トレーダーが成功したシステムに固執することはできません主な理由です. 彼らは彼らの個人的な疼痛閾値を超えたときはいつでも離れて歩く傾向にあります.

それは1つの重要な要因を無視するため、バランスを最適化することは非常に危険です: それは、特定の期間のための最適な戦略はランダムな結果であることを完全に可能です. ゼロに鼻ダイビングのショート, それはリターンのみに基づいて戦略のメリットを締結することは非常に困難です.

もっと重要なこと, パラメータ最適化のプロセスは、設定の魔法の組み合わせは、それがちょうど発見し取得する物乞いだ存在していることを意味します. これは、使用していることを信じるように平野誤謬です 50 期間移動平均が本当にに比べて決定的な違いを作ります 51 移動平均期間. しかし、私はすべての時間は、歴史的なスイートスポットを探して、すべての可能な結果を​​排出トレーダーを見ます.

私は数年前に走った一つのテスト, 私はスクリーンショットを保持していたことを望みます, ランダムに純粋に市場に参入し、終了した戦略を書くことでした. 私はの制御を保持する唯一のルールは、周波数でした.

ランダムプロセスは、私の心を吹きました. それは良い方法で最終的でした, が、私は以前に検討し、みなさ戦略と専門委員の多くのことに気づきました “悪くない” 確かに本当に価値がないました. 20 独立した試験では、と巻き上げます 20 異なる結果. 手数料を除きます, 戦略のほとんどはどちらも行わないものお金を失いました. ランダム取引のほとんどは、野生のラウンドトリップを示しました. 利益はアップ実行される可能性があります 10%, に下落 -10%, その後、近くに落ち着きます 0% 戻り値. 収益性の高い戦略が私の心の中で最も際立っていました. そのうちの一つまたは二人は、ほとんどの取引に一貫性のある利益を解約したATM機に似ていました.

ランダムパラメータを使用することのリスクを制限する最も簡単な方法は、意思決定に使用される基礎となる指標を見ることです. 移動平均の上または下価格の交差点, たとえば, 本物を示し、 入口と出口の効率 を NinjaTrader 評価することができます (70% 範囲バインド出口戦略として使用する場合. エントリはランダムであります). 互いに交差移動平均, しかし, 表示 入口と出口の効率 の 50%. そのメトリックを使用して, 私は自信を持って窓の外のルールの種類をチャック.

あなたは入り口と出口効率の分析を行い、より大きな何かを見つけた場合は 55%, その時点で最適化は、少なくとも以下の不良追求です. 私は潜在的なパラメータ設定のホットスポットを探すために、過去にそれを使用することに告白します. あなたはその道を行くことにした場合, 提案は聖杯ではなく、評価するように、それらを考慮することが重要です.

以下の下でファイルさ: NinjaTrader ヒント, 戦略の取引のアイデア タグが付いて: カーブフィッティング, エントリ効率, 効率を終了します。, ninjatrader, 最適化, リスク調整後リターン

メールで無料の取引戦略

トレンド分析

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

アーカイブ

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

翻訳


無料の取引戦略

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

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